-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Core] Prevent further infinite recursion when printing errors #89490
Conversation
bdfb77e
to
4ec01eb
Compare
Realized there were more cases in this so replacing them all |
4ec01eb
to
634e463
Compare
The issue is more than that, so I wouldn't close it yet. |
634e463
to
0786082
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can confirm it prevents Godot from taking infinite RAM in my case, but I can't say if the engine is doing anything else than printing errors forever. But at least it doesn't freeze the OS anymore.
0786082
to
db96826
Compare
Reworked the original error messages, converted one more Got a crash when printing so will look at that first Edit: I'll push the format fixes to this and look at the weird issue with the callable error separately, it's unrelated to this specific detail |
db96826
to
5e6ee51
Compare
There's a crash when flooding the queue with deferred calls, will investigate this weekend probably, related to custom callables being broken somewhere, probably a frees memory issue, but will do some digging when I can and open an issue |
ad5d915
to
a0d346b
Compare
I'll switch to using |
a0d346b
to
14897f6
Compare
Thanks! |
Thank you! |
Cherry-picked for 4.2.2. |
Doesn't apply to |
it does apply to 4.1... |
What I meant is that it does not cherry-pick trivially on the Given that I'm about to release 4.1.4-stable which may be the last release in that branch, I think it's not necessarily worth the trouble. |
I'll take a quick look at the 4.1 code this afternoon and see how trivial a fix might be |
Can make a 4.1 specific fix for the statistics part, but I don't think it's critical enough generally Edit: I've made a dedicated fix for 4.1, can open a PR if desired |
Similar to:
The
statistics
method is only called when the queue runs out of memory anyway so it would always break things, while you can call it from elsewhere it's only called from within the queue at the moment, there's also a possible interlock issue as the mutex isn't unlocked until after thestatistics
method is called.We could add some form of check to print differently if you call it manually, but I think it's fine this way, only unsure if it should be
stdout
orstderr