Program become not responsive and no error is pushed at all

godot 4.3 stable

My game always become not responsive at some point without pushing any error in the debugger: I don’t know what’s wrong with which part, and the console log is completely empty making me have no place to work from:
It’s also happening with the project exported, the editor is working fine but the game is becoming not responsive: Profiler says everything is working smoothly, but when the problem happens the profiler just stops there and show no useful sign at all.

For my specific case, I’m trying to make an infinite size world by procedural world generation, when I walk around to trigger generation, at any second it may becomes not responsive. This can happen after a few seconds or ten minutes, no matter how far the map is generated: So I guess it’s not because of memory leak or CPU is exhausted. memory allocated is always less than 300mb and CPU uptake is also quite low.

How can there be no errors log at all? Can anyone give some suggestion

Edit: I learnt to see unshown debug logs when program not responding: go here: “C:\Users/#user_name\AppData\Roaming\Godot\app_userdata/#project_name\logs”.
and my problem now is why at a random time, this would occur:
USER ERROR: Condition “p_elem->_root != this” is true.
at: remove (./core/templates/self_list.h:80)
This and this alone, it suddenly flushes out with no other error log at all.

seems it’s occuring when removing the nodes in the area I just left(maps behind player are queue_freed), at a random point.

have you checked the logs in log folder in the appdata project save data?

2 Likes

Do you output any print() messages yourself, such as when generation starts? It might be useful to do so if it helps you to identify what is happening right before the freeze.

Perhaps you have a loop or recursion in your world generation that is doing something expensive or, down some logical branch, iterating to infinity?

wow, I didn’t know this place exists at all :open_mouth: , just have learnt a useful thing, thanks.
there are tons of error now, all of them is this single error repeated thounds of times:
USER ERROR: Condition “p_elem->_root != this” is true.
at: remove (./core/templates/self_list.h:80)

1 Like

I do have some print() messages, but they can’t help me to find the buggy code when the problem occur, I’ve tried many times, the last message is randomly one of them, so I still can’t locate the point.
But I just leant that there might be unshown debug log in “C:\Users#user_name\AppData\Roaming\Godot\app_userdata#project_name\logs”
and now I can see the error log, seems something in very low level is repeatingly erroring and waiting for something.

1 Like

Thank you guys, now I can see what the problem is, I still don’t understand why some thing low level like this can randomly go wrong, but at least I can start debugging.
Can anyone help with this random-occuring error?
USER ERROR: Condition “p_elem->_root != this” is true.
at: remove (./core/templates/self_list.h:80)

you are generating tilemap tiles with set_tile?