osgEarth::Config copy-ctor crash in release mode before main is reached
When using including and using osgEarth 2.8 in an application project, we experience crach in osgEarth::Config copy constructor at application start up before main() is reached. However, this only happens when the project (and osgEarth ) is compiled in release mode. In debug mode, it behaves as expected. Stack trace is pasted below.
Re: osgEarth::Config copy-ctor crash in release mode before main is reached
Thanks for your reply. Your suggestion sounded promissing, but it unfortunately it did not help. The crash and stack trace in release mode is still the same (debug works). First I tried to make s_defaultTerrainOptions a static member of MapNodeOptions instead of a static global, but it did not help. I also tried to make s_defaultTerrainOptions a static local in MapNodeOptions::getTerrainOptions(), but that did not help either. I also tried to connect out both the definition and implementation of the static MapNodeOptions::OPTIONS_TAG since it is not in use, but still no luck.
In release mode the application still crashes before main is reached:
10 _Rb_tree stl_tree.h 659 0x7ffff60a431d
11 map stl_map.h 181 0x7ffff60a431d
12 osgEarth::Config::Config Config 66 0x7ffff60a431d
13 _GLOBAL__sub_I_MapNodeOptions.cpp 0x7ffff0012c19
14 _dl_init_internal 0x7ffff7dec1e3
15 _dl_start_user 0x7ffff7dde21a