godot: 3.4beta2 random crashes on Windows during project load (buildsystem regression with GCC 10.3.1)
Godot version
3.4beta2
System information
Windows 10 Pro, 64-bit, 32GB RAM, i9 @ 2.40GHz, NVIDIA Quadro T2000, Intel UHD Graphics
Issue description
Opening a stable 3.3.2 (large) project crashes Godot randomly during load.
The crash occurs during resource (Re)Import (after deleting the .import folder), after it, during resource loading (scripts, scenes, etc) at random times.
The project loads every time when launching the executable from a DOS box with the -v switch, but the output doesn’t provide any significant info. Hence I suspect something related to output buffering.
The project is GLES2.
FWIW it crashes every time in verbose mode too, with alternating sections of normal resouce load with GL ERRORS:

Steps to reproduce
Open a large project on Windows which loaded okay on 3.3.2.
Minimal reproduction project
No response
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 42 (26 by maintainers)
Commits related to this issue
- Windows: Fix GCC regression in Fedora 34's mingw-gcc Solves the crash reported in https://github.com/godotengine/godot/issues/50970. — committed to godotengine/build-containers by akien-mga 3 years ago
I think I found the upstream GCC bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100402
It was fixed in May but the Fedora packages for Fedora 33 and 34 haven’t been updated yet, I’ll ping the Fedora maintainer. In the meantime I’ll rebuild mingw-gcc with the fix for our containers.
Great work, I can reproduce the crash on Windows with both MRPs 👍
We should have a fix for 3.4 beta 3 😃
Here’s the fixed build with LTO: https://downloads.tuxfamily.org/godotengine/testing/Godot_v3.4-beta-d835b46-fixmingw_win64.exe.zip
Using containers built from https://github.com/godotengine/build-containers/pull/92.
Tested mingw64-gcc-10.2.1-6.fc34 (last revision before 10.3.1-1.fc34) and it works fine, so it’s indeed a regression between GCC 10.2.1 and 10.3.1.
Some more findings: #50951 is indeed the same issue (too bad I missed the connection earlier, might have saved some work isolating reproducers here).
The issue happens only when building with Fedora 34’s MinGW and related components so far. I’ve tried a local build on Windows 10 with MinGW from MSYS2 and so far it’s not crashing.
With MSYS2 I have MinGW 9.0.0.6270.0e0eed623 with GCC 10.3.0 and binutils 2.37.
I did manage to get some stacktrace when running the Fedora compiled binary through GDB on Windows (binary compiled without LTO and with debug symbols):
Other findings:
target=release_debug(at least for the editor, for the template it might also crash intarget=release, not tested).scons p=windows tools=yes target=release_debug(i.e. no LTO) crashes too.Thanks. We won’t come to that as I have bisected it and have an MRP.
Crash_Win64.zip
This is related to the font size and should be investigated. Might be a Godot problem after all…
The project has one label with a dynamic font, sized 100px + 4px outline.
Observations:
(Writing from mobile) I spend some time yesterday trying to reproduce, and later, finding a github project that crash, and it’s not easy. I try a lot of games (from low to big size) from github, from godot wild jams and aplications like pixelorama and non of that crashes, but trying my test scenes i find a way to crash godot compiled with new containers and not with old containers: passing a kinematicbody2D like argument in a signal and getting this argument in a function like a Node2D. I think i can do a scene with this, but i don’t know if the isolated scene, without the autoloads and the “background” stuff will crash…