[solved, not cegui's fault] Crash when ... on linux.

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

Pompei2
Home away from home
Home away from home
Posts: 489
Joined: Tue May 23, 2006 16:31

[solved, not cegui's fault] Crash when ... on linux.

Postby Pompei2 » Wed Mar 14, 2007 22:34

Hello. On linux I get this crash, but not on windows.

I was able to follow the crash up to the throw of a new UnknownObjectException in WindowManager::getWindow, where two strings get concatenated:

Code: Select all

throw UnknownObjectException("WindowManager::getWindow - A Window object with the name '" + name +"' does not exist within the system");


The crash happens inside a strlen, IIRC. So I assume the string 'name' gets messed up somewhere ?

My actual code is similar to this:

Code: Select all

char buff[1024];
memset( buff, '\0', 1024 );
strcpy( buff, "blub" );

try {
   CEGUI::WindowManager::getSingleton( ).getWindow( buff );
} catch( CEGUI::Exception& e ) {
   // ...
   return true;
}


The code goes into the throw I described earlyer, but never reaches my catch :/

I'm looking more deeply into this, but if somebody has an idea that could save me time and grey hairs, it's welcome :)

EDIT: Solved, sorry for this post, but the bug isn't CEGUI's fault, it was me overwriting memory ...

Return to “Help”

Who is online

Users browsing this forum: No registered users and 19 guests