Noesis::GUI::Init failing after Noesis::GUI::Shutdown
Hi,
we have successfully integrated Noesis into our project, but now we have problems with our Google Tests. Some of our tests start the whole engine and shut it down again. And then the next test, that wants to start the engine again fails with this error on Noesis::GUI::Init(NoesisErrorHandler) (all tests run on the same thread):
Already initialized - Gui\Core\Src\IntegrationAPI.cpp:60
The shutdown runs through without any problems. This is our uninit method:
Can someone give me a hint what the source of this problem might be? Are there more methods to call on shutdown which I might have missed?
we have successfully integrated Noesis into our project, but now we have problems with our Google Tests. Some of our tests start the whole engine and shut it down again. And then the next test, that wants to start the engine again fails with this error on Noesis::GUI::Init(NoesisErrorHandler) (all tests run on the same thread):
Already initialized - Gui\Core\Src\IntegrationAPI.cpp:60
The shutdown runs through without any problems. This is our uninit method:
Code: Select all
void NoesisGuiLayer::uninitialize()
{
// Not sure if we need to explicitly unregister our components
NsUnregisterComponent<EnscapeUiDescription::MiniMapControl>();
NsUnregisterComponent<EnscapeUiDescription::MultiplyConverter>();
NsUnregisterComponent<EnscapeUiDescription::RadToDegreeConverter>();
m_mainDataContext.Reset();
m_xamlView.Reset();
m_glRenderDevice.Reset();
Noesis::GUI::Shutdown();
}
Re: Noesis::GUI::Init failing after Noesis::GUI::Shutdown
Init() and Shutdown() can only be called once. I recommend doing it as part of your testing framework initialization. The rest of objects (views, devices) can be created and destroyed accordingly.
Re: Noesis::GUI::Init failing after Noesis::GUI::Shutdown
Great! Thanks for the info. Fixed the problem.
Re: Noesis::GUI::Init failing after Noesis::GUI::Shutdown
I have improved the documentation in IntegrationAPI.h to inform about this.
Marking this as solved! Thanks!
Marking this as solved! Thanks!
Who is online
Users browsing this forum: No registered users and 1 guest