Any idea on this crash report?

From what I can gather, crashes like this are caused by the order of static initializers. However, the class that it is crashing in doesn’t use any static objects as far as I can tell. Possibly an earlier static initializer is corrupting memory, causing it to crash here. Any tips on tracking this down?

Thread 0 Crashed:: Dispatch queue:
0                	0x00000001537aaf18 0x153773000 + 229144 _GLOBAL__sub_I_GUI_EqControl.cpp (in Nexus) (GUI_EqControl.cpp:0)
1   dyld                          	0x0000000109e16592 ImageLoaderMachO::doModInitFunctions(ImageLoader::LinkContext const&) + 506
2   dyld                          	0x0000000109e16798 ImageLoaderMachO::doInitialization(ImageLoader::LinkContext const&) + 40
3   dyld                          	0x0000000109e11bea ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, char const*, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) + 362
4   dyld                          	0x0000000109e10d73 ImageLoader::processInitializers(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) + 133
5   dyld                          	0x0000000109e10e05 ImageLoader::runInitializers(ImageLoader::LinkContext const&, ImageLoader::InitializerTimingList&) + 73
6   dyld                          	0x0000000109e03cb2 dyld::runInitializers(ImageLoader*) + 82
7   dyld                          	0x0000000109e0d3dc dlopen_internal + 607
8   libdyld.dylib                 	0x00007fff6570cd43 dlopen + 200

Hey @g-mon,
Did you ever get the bottom of this one? I love the obscurity of “line:0” in the symbolicated report, which is exactly the same type of crash I have here! And of course we’ll investigate the static initialization stuff (but we’d been pretty careful about that knowing the “fiasco” issue for statics).

No. I think it has to do with using ‘static constexpr’ for variables in header files. I’ve never been able to reproduce it on my machine.

Thanks for this. Can you recall if these were simple types (int, float, etc) or more complex types that were constexpr? (It sounds like you just removed or refactored them in your case and this fixed it for whomever had the problem?)

Stumbled upon this post, because a tester reported the same type of crash.
I do use a lot of “static constexpr” in various headers. Should I remove all of them?
I like them, because they are very convenient for initialising e.g. floats or const char*. :smiley:

I am also wondering about the “static constexpr”. Are they only a problem, if they lead to the “static initialisation order fiasco”? Or are they generally a problem, even outside of a “static initialisation order fiasco”?