Layers crashed hard

Steps causing the bug to occur

  1. Adding the 9th layer suddenly blew up the sizes of small layers and VuoCompositionLoader went unresponsive.

How did the result differ from what you expected?

It crashed

Other notes

  • Vuo version: 1.2.0
  • macOS version: OS X 10.10

Huge crash report, so huge I can’t upload it(1.02MB!).

More info: The loader hangs, and has to be force closed. It’s the eight duplicate of a layer with logic based movement that seems to trigger it. Removing the layer/logic makes the comp work again It seems like it’s the presence of the eight logic block that triggers it, as it also hangs if it isn’t connected.

The culprit with dependencies.

ColorWalkerWithoutFailsafe.vuo (13.9 KB)

Magneson.restrictedColorWalker.vuo (6.1 KB)

Magneson.sampleSurroundingColors.vuo (13.7 KB)

Magneson.4Options.vuo (5.13 KB)

Magneson.limitToScreen.vuo (2.01 KB)

I can add that removing the last Walker logic block makes it work again, but if I add any other node containing evaluations it seems to hang again. Is there a limit to evaluations per frame? As far as I’ve seen, it is also already dropping events, but the rendering node is about the only one containing nodes with this option.

I created a somewhat reduced version of the composition, deleting all of the Make Oval Layer nodes except the uppermost one. The composition hangs immediately upon starting, and I have to force-quit it.

If I delete the lowermost of the Restricted Color Walker nodes, the composition still hangs.

If I delete enough Restricted Color Walker nodes, the composition no longer hangs. Still, it seems to be getting bogged down, since the composition takes several seconds to stop.

If I delete all but the uppermost Restricted Color Walker node, the composition is able to stop immediately.

The only thing in Activity Monitor > Sample Process that stands out to me as being problematic is the large number of threads. In one case where it hung, Activity Monitor reported 77 threads.

Is there a limit to evaluations per frame?

No. At least, there’s not supposed to be :) It seems that Vuo is compiling this composition in such a way that the composition is trying to do too much stuff at once. We’ll look into it some more.

Thanks for looking into it! I think I got a message in the console mentioning a possible “leak” at some point, so perhaps it is memory related. I have 16GB RAM on this mac, so if you have less it could also be an explanation to why it hangs with even fewer of them on your side.

Great to know that about the evaluations. I love being able to make a bit to many conditions for stuff :D

Fixed in Vuo 1.2.4.

The problem did turn out to involve the large number of threads. Whenever the composition had a branch/scatter (node A has output cables to node B and node C), the branches would each be allowed their own thread to execute concurrently. That’s fine until you have branches of branches of branches (they accumulate quickly with multiple levels of subcompositions) and eventually there are too many threads hanging around and macOS busts them for loitering. The fix was to impose a (high) limit on how many threads the composition can use at a time. This still allows independent parts of the composition to execute concurrently (for example, the Load Image Asynchronously example composition still works), but keeps the total number of threads within the legal limit.