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
Segfault trying to print error in SelfList<DynamicFont>::List::~List() while closing #21060
Comments
I assume that this should be investigated in:
|
Ran into the same issue. (Windows, 3.0.6) I wonder what causes the error printed in the first place? The error message "Condition ' _first != 0 ' is true." isn't very descriptive, and it always happens in a Edit - When running my project I have two more errors of the same kind, before OS is deinitalized. One for Edit 2 - Found the culprit. scene/resources/dynamic_font.h:288 static SelfList<DynamicFont>::List dynamic_fonts; Due to being static it will be deinitalized too late. That said, I think the error message is misplaced, since there isn't really anything special going on here that could have been done wrong. |
Somehow it seems this error is back.. this is quite an interesting challenge due to everything seeming fine with it. |
Got these assertion failures on the console in Godot 3.0.6 on Windows 64 bit while working on reducing the resolution of images inside my project:
Godot did not crash, but it was frozen for 20+ seconds when I deleted a folder in Godot's UI. I got the above errors on the console before I attempted to delete the folder. I will post here if/when I will have a systematic way to reproduce it. |
It's related (potentially a duplicate, but not sure yet) to #18429. Whenever we leak resources on close (as apparently the case here with dynamic fonts), the logger can crash because it tries to print errors after the deletion of the |
Simple project that reproduces the bug: CleanupSegfault-DynamicFont.zip On Linux, if you run via a debug binary, it hangs on close. |
I'm pretty confident that this is a duplicate of #18429 now (or a subset of it at least), so closing. |
Godot version:
3.0.6, master (1c17c2b)
OS/device including version:
Mageia 6 x86_64
Issue description:
Under certain conditions, Godot (both editor and runtime) can segfault when closing with this kind of backtrace:
The issue seems to be a race condition where
OS
can get freed beforeSelfList<DynamicFont>::List::~List()
runs, and as the latter tries to emit an error message viaOS::print_error
, it crashes.Steps to reproduce:
(Weird test case but that's what you get with good QA testers :)).
godot "2D Kinematic Collision Demo"
, it should crash:Minimal reproduction project:
Demo, see above steps to reproduce for one way to trigger this issue (there are more).
The text was updated successfully, but these errors were encountered: