|
Re: Calling LiveWindow::GetInstance() during static initialization causes program cra
There's an issue where statically initialized classes are not created in any specific order. So that means that variables, in particular, lists of the sensors and speed controllers might not have been initialized when the static classes are created.
The best solution is to try to not create WPILib objects statically and instead make them class members. Then you can initialize them from the heap using new or as class members. This makes sure that they don't get initialized before the underlying WPILib code starts up.
But we're looking at the problem now. May be an update.
__________________
Brad Miller
Robotics Resource Center
Worcester Polytechnic Institute
|