Jan
Topic Author
Posts: 5
Joined: 23 May 2017, 17:09

Noesis::GUI::Init failing after Noesis::GUI::Shutdown

01 Sep 2017, 10:38

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:
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();
}
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?
 
User avatar
jsantos
Site Admin
Posts: 2899
Joined: 20 Jan 2012, 17:18
Contact:

Re: Noesis::GUI::Init failing after Noesis::GUI::Shutdown

02 Sep 2017, 15:13

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.
 
Jan
Topic Author
Posts: 5
Joined: 23 May 2017, 17:09

Re: Noesis::GUI::Init failing after Noesis::GUI::Shutdown

12 Sep 2017, 15:38

Great! Thanks for the info. Fixed the problem.
 
User avatar
jsantos
Site Admin
Posts: 2899
Joined: 20 Jan 2012, 17:18
Contact:

Re: Noesis::GUI::Init failing after Noesis::GUI::Shutdown

12 Sep 2017, 18:52

I have improved the documentation in IntegrationAPI.h to inform about this.

Marking this as solved! Thanks!

Who is online

Users browsing this forum: No registered users and 1 guest