Error - Maximum Recursion Depth Exceeded In Comparison

Use this forum for general user support and related questions.
Racleborg
Posts: 460
Joined: Sat Apr 07, 2018 10:31 am
Location: UK

Re: Error - Maximum Recursion Depth Exceeded In Comparison

Post by Racleborg » Sat Sep 14, 2019 7:07 pm

Here is a copy of the file with everything deleted and a default cube added. The error is still occurring. I hope it helps.

https://1drv.ms/u/s!AhdwgLaw01tLomwg5nb ... V?e=slN6De

Thanks

User avatar
B.Y.O.B.
Developer
Developer
Posts: 2970
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: Error - Maximum Recursion Depth Exceeded In Comparison

Post by B.Y.O.B. » Sat Sep 14, 2019 9:25 pm

This is the problem:
Capture.PNG

I have improved the recovery from a dependency cycle and now it adds an error message to the error log (not only the console) and marks the faulty nodes in red:
Capture2.PNG
Support LuxCoreRender project with salts and bounties

Racleborg
Posts: 460
Joined: Sat Apr 07, 2018 10:31 am
Location: UK

Re: Error - Maximum Recursion Depth Exceeded In Comparison

Post by Racleborg » Sun Sep 15, 2019 8:03 am

@BYOB
I have improved the recovery from a dependency cycle and now it adds an error message to the error log (not only the console) and marks the faulty nodes in red
Thank you. It will be a very helpful feature.

How is it possible to see the materials when all the objects have been deleted?

So, even if I delete all the objects in a scene their materials are still calculated? and if I take an old scene and decide to rebuild some objects with new materials , then the old materials are still calculated. Is that correct? I often switch objects OFF from rendering to speed up a preview which has presumably not been the correct thing to do?

User avatar
B.Y.O.B.
Developer
Developer
Posts: 2970
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: Error - Maximum Recursion Depth Exceeded In Comparison

Post by B.Y.O.B. » Sun Sep 15, 2019 9:07 am

There are materials and custom node trees.
Each material has one custom node tree, which has the "fake user" enabled because Blender doesn't do the user count for custom node trees correctly in some cases. This means that when you delete an object, the material is deleted along if it's not used elsewhere, but the node tree is not deleted because it has the "fake user" enabled. This is not really a problem usually, the node tree will just exist in the scene and is only touched by rare cases where we iterate over all node trees in the scene (like the compatibility function which throws the errors we have seen in this thread).

You can check out any custom node tree by enabling the "pin" option in the node editor and then using the dropdown to the left of the pin button. This way you can see all node trees, even those without a corresponding material, and you can disable their "fake user" so they get deleted when you save and reload the .blend.
Racleborg wrote:
Sun Sep 15, 2019 8:03 am
So, even if I delete all the objects in a scene their materials are still calculated?
Depends what you mean with "calculated". The only thing I can think of that iterates over all of them is the compatibility function, which is run when you open a .blend file and when you start a render. But this function doesn't take more than a few milliseconds, even with hundreds of node trees.
LuxCore itself doesn't see these unused node trees anymore, they don't affect render performance at all.
Support LuxCoreRender project with salts and bounties

Racleborg
Posts: 460
Joined: Sat Apr 07, 2018 10:31 am
Location: UK

Re: Error - Maximum Recursion Depth Exceeded In Comparison

Post by Racleborg » Sun Sep 15, 2019 9:20 am

@BYOB

Many thanks for your very detailed response from which I've learned loads.
Depends what you mean with "calculated".
You've answered all the questions, thank you, I just hadn't worded them all quite correctly.

Post Reply