Error - Maximum Recursion Depth Exceeded In Comparison

Use this forum for general user support and related questions.
Forum rules
Please upload a testscene that allows developers to reproduce the problem, and attach some images.
Racleborg
Posts: 621
Joined: Sat Apr 07, 2018 10:31 am
Location: UK

Error - Maximum Recursion Depth Exceeded In Comparison

Post by Racleborg »

What does this error message mean? 'Maximum Recursion Depth Exceeded In Comparison'

I'm loaded an old scene and this appears when switching to realistic viewport.

Thank you
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Error - Maximum Recursion Depth Exceeded In Comparison

Post by Dade »

Racleborg wrote: Fri Sep 13, 2019 2:54 pm What does this error message mean? 'Maximum Recursion Depth Exceeded In Comparison'
Is it a Blender message, console message ? A screenshot may help.
Support LuxCoreRender project with salts and bounties
Racleborg
Posts: 621
Joined: Sat Apr 07, 2018 10:31 am
Location: UK

Re: Error - Maximum Recursion Depth Exceeded In Comparison

Post by Racleborg »

Blender is now crashing as soon as I try and open the scene. :o As soon as I see the message again I'll grab a console output. In fact, from now onwards I'll try and always get the console output before posting :oops: Sorry.
Racleborg
Posts: 621
Joined: Sat Apr 07, 2018 10:31 am
Location: UK

Re: Error - Maximum Recursion Depth Exceeded In Comparison

Post by Racleborg »

Console Output:

Read prefs: C:\Users\Racleborg\AppData\Roaming\Blender Foundation\Blender\2.80\config\userpref.blend
found bundled python: C:\Program Files\Blender Foundation\Blender\2.80\python
BlendLuxCore registered (2.2beta4)
archipack: ready
Read blend: D:\BLENDER\Studio from Stable\Room Challenge from Wifey\Promotional\Redish Fabric2 .blend
Updating OpenCL device list
Updated LuxCoreNodeTexImagemap node "Imagemap.001" in tree "Bottle Glass" to new version
Updated LuxCoreNodeTexImagemap node "Imagemap" in tree "Bottle Glass" to new version
Updated LuxCoreNodeTexImagemap node "Imagemap.002" in tree "Bottle Glass" to new version
Updated LuxCoreNodeTexImagemap node "Imagemap" in tree "Cushion Right Fabric.001" to new version
Updated LuxCoreNodeTexImagemap node "Imagemap.002" in tree "Cushion Right Fabric.001" to new version
Updated LuxCoreNodeTexImagemap node "Imagemap.001" in tree "Cushion Right Fabric.001" to new version
Updated LuxCoreNodeTexImagemap node "Imagemap" in tree "electric box" to new version
Updated LuxCoreNodeTexImagemap node "Imagemap" in tree "Fabric and Velvet .001" to new version
Updated LuxCoreNodeTexImagemap node "Imagemap.001" in tree "Finish.002" to new version
Updated LuxCoreNodeTexImagemap node "Imagemap" in tree "Floor_alt7.002" to new version
Updated LuxCoreNodeTexImagemap node "Imagemap.001" in tree "Floor_alt7.002" to new version
Updated LuxCoreNodeTexImagemap node "Imagemap" in tree "Floor_alt7.003" to new version
Updated LuxCoreNodeTexImagemap node "Imagemap.001" in tree "Floor_alt7.003" to new version
Updated LuxCoreNodeTexImagemap node "Imagemap" in tree "glass.BLUE" to new version
Updated LuxCoreNodeTexImagemap node "Imagemap.002" in tree "glass.BLUE" to new version
Updated LuxCoreNodeTexImagemap node "Imagemap.001" in tree "glass.BLUE" to new version
Updated LuxCoreNodeTexImagemap node "Imagemap" in tree "grill" to new version
Updated LuxCoreNodeTexImagemap node "Imagemap" in tree "HDRI" to new version
Updated LuxCoreNodeTexImagemap node "Imagemap" in tree "knobs" to new version
Updated LuxCoreNodeTexImagemap node "Imagemap" in tree "main box" to new version
Updated LuxCoreNodeTexImagemap node "Imagemap.001" in tree "main box" to new version
Updated LuxCoreNodeTexImagemap node "Imagemap.002" in tree "main box" to new version
Updated LuxCoreNodeTexImagemap node "Imagemap" in tree "main case" to new version
Updated LuxCoreNodeTexImagemap node "Imagemap.001" in tree "main part" to new version
Updated LuxCoreNodeTexImagemap node "Imagemap" in tree "mETAL FOOT PART.001" to new version
Updated LuxCoreNodeTexImagemap node "Imagemap" in tree "Piping.001" to new version
Traceback (most recent call last):
File "C:\Users\Racleborg\AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons\BlendLuxCore\handlers\load_post.py", line 48, in handler
compatibility.run()
File "C:\Users\Racleborg\AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons\BlendLuxCore\utils\compatibility.py", line 13, in run
update_output_nodes_volume_change(node_tree)
File "C:\Users\Racleborg\AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons\BlendLuxCore\utils\compatibility.py", line 37, in update_output_nodes_volume_change
for old_output in find_nodes(node_tree, "LuxCoreNodeMatOutput"):
File "C:\Users\Racleborg\AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons\BlendLuxCore\utils\node.py", line 134, in find_nodes
result += find_nodes(node.node_tree, bl_idname)
File "C:\Users\Racleborg\AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons\BlendLuxCore\utils\node.py", line 134, in find_nodes
result += find_nodes(node.node_tree, bl_idname)
File "C:\Users\Racleborg\AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons\BlendLuxCore\utils\node.py", line 134, in find_nodes
result += find_nodes(node.node_tree, bl_idname)
[Previous line repeated 992 more times]
File "C:\Users\Racleborg\AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons\BlendLuxCore\utils\node.py", line 133, in find_nodes
if node.bl_idname == "LuxCoreNodeTreePointer" and node.node_tree:
RecursionError: maximum recursion depth exceeded in comparison
==================================================
[Engine/Viewport] New session
[Exporter] Creating session
ERROR: maximum recursion depth exceeded in comparison
Traceback (most recent call last):
File "C:\Users\Racleborg\AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons\BlendLuxCore\engine\viewport.py", line 44, in view_update
engine.session = engine.exporter.create_session(depsgraph, context, engine=engine)
File "C:\Users\Racleborg\AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons\BlendLuxCore\export\__init__.py", line 89, in create_session
utils_compatibility.run()
File "C:\Users\Racleborg\AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons\BlendLuxCore\utils\compatibility.py", line 13, in run
update_output_nodes_volume_change(node_tree)
File "C:\Users\Racleborg\AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons\BlendLuxCore\utils\compatibility.py", line 37, in update_output_nodes_volume_change
for old_output in find_nodes(node_tree, "LuxCoreNodeMatOutput"):
File "C:\Users\Racleborg\AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons\BlendLuxCore\utils\node.py", line 134, in find_nodes
result += find_nodes(node.node_tree, bl_idname)
File "C:\Users\Racleborg\AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons\BlendLuxCore\utils\node.py", line 134, in find_nodes
result += find_nodes(node.node_tree, bl_idname)
File "C:\Users\Racleborg\AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons\BlendLuxCore\utils\node.py", line 134, in find_nodes
result += find_nodes(node.node_tree, bl_idname)
[Previous line repeated 990 more times]
File "C:\Users\Racleborg\AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons\BlendLuxCore\utils\node.py", line 133, in find_nodes
if node.bl_idname == "LuxCoreNodeTreePointer" and node.node_tree:
RecursionError: maximum recursion depth exceeded in comparison
new framebuffer


Thanks
User avatar
B.Y.O.B.
Developer
Developer
Posts: 4146
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. »

It looks like there's a dependency cycle in some of the node trees:
In node tree A, there's a material output pointing to a volume node tree B, which itself contains a pointer node to A. This leads to infinite recursion when traversing the tree.
At least that's my theory, can you upload the file?
Racleborg
Posts: 621
Joined: Sat Apr 07, 2018 10:31 am
Location: UK

Re: Error - Maximum Recursion Depth Exceeded In Comparison

Post by Racleborg »

'BYOB

The scene is quite large (295mb) so I'll look for the points you mentioned, and if no joy I'll start stripping the scene down to upload.

Thanks
User avatar
B.Y.O.B.
Developer
Developer
Posts: 4146
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. »

You could also open this file with a text editor: https://github.com/LuxCoreRender/BlendL ... ity.py#L36
In the highlighted line (36), add the following code:

Code: Select all

print("Updating tree:", node_tree.name)
Then when the error is thrown, you'll find out what the name of the offending node tree is and you can check it in detail.
Racleborg
Posts: 621
Joined: Sat Apr 07, 2018 10:31 am
Location: UK

Re: Error - Maximum Recursion Depth Exceeded In Comparison

Post by Racleborg »

by B.Y.O.B. » Sat Sep 14, 2019 1:48 pm
You could also open this file with a text editor: https://github.com/LuxCoreRender/BlendL ... ity.py#L36
In the highlighted line (36), add the following code:
Code: Select all
print("Updating tree:", node_tree.name)
Then when the error is thrown, you'll find out what the name of the offending node tree is and you can check it in detail.
That is so cool! After my initial panic of how to do this :? it is now working and throwing out what appears to be quite a few errors.

Many thanks and when I've nailed down the problem I'll repot back :)
Racleborg
Posts: 621
Joined: Sat Apr 07, 2018 10:31 am
Location: UK

Re: Error - Maximum Recursion Depth Exceeded In Comparison

Post by Racleborg »

I hav'nt been able to find the exact problem. In fact, even after deleting all objects that appeared to contain errors, I was still getting the same errors.

So, I (CTR-A) copied and pasted everything into a new project and it's now ok. :?
User avatar
B.Y.O.B.
Developer
Developer
Posts: 4146
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. »

I think you would have to delete the node trees (or at least the nodes that cause the cycle).
Post Reply