Logger ms_Singleton assertion fails

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

ichijoji
Just popping in
Just popping in
Posts: 9
Joined: Fri Jun 23, 2006 19:09
Contact:

Logger ms_Singleton assertion fails

Postby ichijoji » Thu May 17, 2007 03:26

I'm having problems initializing cegui with ogre. My initialization code looks like this:

Code: Select all

guiRenderer = new CEGUI::OgreCEGUIRenderer(window);
guiRenderer->setTargetRenderQueue( Ogre::RENDER_QUEUE_OVERLAY, true );
guiRenderer->setTargetSceneManager(sceneManager);
guiSystem = new CEGUI::System(guiRenderer);
CEGUI::Logger::getSingleton().setLoggingLevel(CEGUI::Informative);
CEGUI::SchemeManager::getSingleton().loadScheme("TaharezLook.scheme"); //crashes here

But when it tries to load the scheme it crashes with this error:

Code: Select all

../../include/CEGUISingleton.h:79: static T& CEGUI::Singleton<T>::getSingleton() [with T = CEGUI::Logger]: Assertion `ms_Singleton' failed.
Aborted (core dumped)

Only the thing is, I know that the CEGUI::Logger singleton is there because the system is logging away happily before this error. The end of my CEGUI log looks like this:

Code: Select all

16/05/2007 20:16:49 (InfL1)     CEGUI::System singleton created.
16/05/2007 20:16:49 (InfL1)     ---- CEGUI System initialisation completed ----
16/05/2007 20:16:49 (InfL1)     ---- Version 0.5.0 ----
16/05/2007 20:16:49 (InfL1)     ---- Renderer module is: CEGUI::OgreRenderer - Official Ogre based renderer module for CEGUI ----
16/05/2007 20:16:49 (InfL1)     ---- XML Parser module is: CEGUI::XercesParser - Official Xerces-C++ based parser module for CEGUI ----
16/05/2007 20:16:49 (InfL1)     ---- Scripting module is: None ----
16/05/2007 20:16:49 (InfL1)     Attempting to load Scheme from file 'SleekSpace.scheme'.

Could something be deleting the ms_Singleton pointer? Or could it be a problem with the schemeManager not looking at the same static object, or am I doing this completely wrong, or what? Any comments are appreciated.

Rackle
CEGUI Team (Retired)
Posts: 534
Joined: Mon Jan 16, 2006 11:59
Location: Montréal

Postby Rackle » Thu May 17, 2007 09:22

The "traditional" approach is with this constructor:

mGUIRenderer = new CEGUI::OgreCEGUIRenderer(mWindow, Ogre::RENDER_QUEUE_OVERLAY, false, 3000, mSceneMgr);

What's this 3000 parameter and what's the impact of not specifying it?

Try with this code and see if your environment works (version of Ogre code and version of Cegui code).

ichijoji
Just popping in
Just popping in
Posts: 9
Joined: Fri Jun 23, 2006 19:09
Contact:

Postby ichijoji » Fri May 18, 2007 06:40

I get the same error using that code. I'm starting to think this might be a complete version mismatch. I'm using Ogre 1.4.1 and CEGUI 0.5.0b. This is right, right?

Rackle
CEGUI Team (Retired)
Posts: 534
Joined: Mon Jan 16, 2006 11:59
Location: Montréal

Postby Rackle » Fri May 18, 2007 09:58

If my test code does not work then you either have incompatible sources or incompatible resources. I recommend doing a full recompile of Ogre. There's also a stickied post on the Ogre forums about upgrading Ogre 1.2's Cegui with the latest version of Cegui. It's still worth a read with Ogre v1.4.

zissakos2
Just popping in
Just popping in
Posts: 3
Joined: Mon May 28, 2007 18:22
Location: Stuttgart, Germany

Postby zissakos2 » Wed May 30, 2007 00:29

Hi guys,

the CEGUI Skin sleekspace is no more available for download (Error 404). Does anybody happen to have a copy of that skin? Could you post a link/send it to me please?

Thanks a lot!


Return to “Help”

Who is online

Users browsing this forum: No registered users and 22 guests