Page 1 of 1

Release strangeness

Posted: Sat Apr 18, 2009 13:05
by yuumei
Hi all!

Im using CEGUI for my university project and cant seem to get a piece of release code to work compared to debug... very strange :/

The piece of code is:

Code: Select all

CEGUI::Window * root_window = CEGUI::WindowManager::getSingleton().getWindow("Root");
CEGUI::System::getSingleton().setGUISheet( root_window );
std::cout << root_window << "==" << CEGUI::System::getSingleton().getGUISheet() <<  std::endl;


When run in debug I get "01A53CC0==01A53CC0" as output. In release I get "01A29EB8==00000000". D:

It's in a try/catch and that doesn't get anything and there are no errors in the log.

Anyone have any ideas what's happening here?

Im using CEGUI-SDK-0.6.2-vc9

Thanks alot!

(Very well coded library by the way! (^-^)b)

Re: Release strangeness

Posted: Sat Apr 18, 2009 14:24
by CrazyEddie
Hi, and welcome :)

I moved this to Beginners Help, since whatever the issue is, it will not be a bug - not that we don't have bugs, just that this is 99.9% not one ;)

I agree that it's a very strange issue, can you give any additional information such as the initialisation and creation of "Root", and also whether there are other manifestations of the issue.

Also, did the samples build and run ok for you?

(Very well coded library by the way! (^-^)b)

Thank you - it's not always pretty and never perfect, but we have tried our best :)

CE

Re: Release strangeness

Posted: Sat Apr 18, 2009 15:13
by yuumei
Root is initialised as so:

Code: Select all

CEGUI::WindowManager::getSingleton().loadWindowLayout( "DragDropDemo.layout" );
CEGUI::Window * root_window = CEGUI::WindowManager::getSingleton().getWindow("Root");


It is only happening in release, after the renderer and system are created and all of the resources are loaded.

Thanks!

Re: [solved] Release strangeness

Posted: Sat Apr 18, 2009 19:17
by yuumei
Well, I managed to fix it. I dont have a clue what was causing it but visual studio was doing some straaaange things.

Thanks!

Re: Release strangeness

Posted: Sun Apr 19, 2009 09:38
by CrazyEddie
Cool. I'm aware that sometimes MSVC++ likes you to do a full clean/rebuild, though I think when I saw that it was related to virtual functions. Still very odd ;)

CE.