Files
test/source
Omar Emara a0cfb0b142 Fix #130134: Double Edge Mask uses too much memory
The Double Edge Mask node uses too much memory when it is not connected
to anything in the Full-Frame compositor. That's because it tries to
allocate a buffer of size 131072x131072, which is due to the cumulation
of multiple issues.

1. The Full-Frame compositor evaluates nodes that are not connected to
   the output.
2. The constant folder assigns a bounds of +-65536 to its output memory
   buffers as a maximum possible value.
3. Then the MemoryBuffer::inflate method doesn't know about the constant
   folder special value, so it tries to allocate a buffer of that size.

The safest fix for now is to clear the output and return early if all
inputs are single value.

The problem is that this issue might happen for other nodes that also
satisfy the 3 issues above, that is, uses inflate and can be constant
folded. I manually checked for such nodes and there are no nodes that
satisfy all three, so hopefully this is isolated to the Double Edge Mask
node.

Pull Request: https://projects.blender.org/blender/blender/pulls/130163
2024-11-12 12:53:23 +01:00
..