Initialization order: SetEnvironmentDefaults
Commit 143f35b1 (fix: set environment defaults before initializing environment and don't stop creating controllers on non-controllable entities) is incompatible with opSimulation.
// initialization
SetEnvironmentDefaults(); // SegFault
ParseScenarioFile();
LoadRoadNetwork();
...
The reason is that LoadRoadNetwork()
is now executed after SetEnvironmentDefaults()
, which tries to set the weather before our world (= road network) is being instantiated.
Does anybody see any potential (also in the future) dependency between SetEnvironmentDefaults()
and the calls to ParseScenarioFile()
and LoadRoadNetwork
. Or would this be a valid fix?
// initialization
ParseScenarioFile();
LoadRoadNetwork();
SetEnvironmentDefaults();
...