crash during rendering

For help with anything that CEGUI doesn't offer straight out-of-the-box, e.g.:
- Implementation of new features, such as new Core classes, widgets, WindowRenderers, etc. ...
- Modification of any existing features for specific purposes
- Integration of CEGUI in new engines or frameworks and writing of new plugins (Renderer, Parser, ...) or modules

Moderators: CEGUI MVP, CEGUI Team

User avatar
boto
Not too shy to talk
Not too shy to talk
Posts: 26
Joined: Tue May 24, 2005 12:28

crash during rendering

Postby boto » Sat Jul 09, 2005 10:53

hi,

sometimes the application crashs during the gui rendering phase. i use the opengl renderer which is hooked into my 3d post-rendering phase. on some machines (winxp) the crash causes sometimes a blue screen :-(

i dynamically create and destroy gui windgets during the runtime using the windows manager's destroy and create methods or create widgets using xml layout loading mechanism.

i suspect the crash has to do with that widget creation and destruction dynamics in my app. should i consider special issues in order to avoid the crash?


cheers
boto

User avatar
lindquist
CEGUI Team (Retired)
Posts: 770
Joined: Mon Jan 24, 2005 21:20
Location: Copenhagen, Denmark

Re: crash during rendering

Postby lindquist » Sat Jul 09, 2005 10:59

I assume that the functions you are using are:

Code: Select all

WindowManager::createWindow
WindowManager::destroyWindow


in that case it should be fine!

User avatar
boto
Not too shy to talk
Not too shy to talk
Posts: 26
Joined: Tue May 24, 2005 12:28

Re: crash during rendering

Postby boto » Sat Jul 09, 2005 11:17

hi lindquist,

yes i create and destroy the widgets using that methods. or i load an xml layout and release the retrieved main window using WindowManager::destroyWindow. the crash happens in ogl driver, i backtrace the stack and see that it happend during doRender method in ogl renderer. the memory containing the primitive data to be rendered is invalid when the crash happens!?

cheers
boto

User avatar
lindquist
CEGUI Team (Retired)
Posts: 770
Joined: Mon Jan 24, 2005 21:20
Location: Copenhagen, Denmark

Re: crash during rendering

Postby lindquist » Sat Jul 09, 2005 11:28

what version of cegui are you using?
I use the ogl renderer myself, and I have never had any issues.

are you sure that your linking is good?

User avatar
boto
Not too shy to talk
Not too shy to talk
Posts: 26
Joined: Tue May 24, 2005 12:28

Re: crash during rendering

Postby boto » Sat Jul 09, 2005 12:13

i use version 0.3. the slightly adapted ogl renderer is that one of previous version. during debuggin i discovered a weird thing, i don't know if the crash problem is related to this:


in order to retrieve widget elements from a loaded layout i use dynamic_cast. in debug version of the application it works. in release version built with debug information the dynamic_cast fails, the runtime throws an exception about missing rtti on that widget object, e.g.:


_p_wnd = dynamic_cast< CEGUI::Window* >( GuiManager::get()->loadLayout( layoutFile, NULL, CHATLAYOUT_PREFIX ) );
_p_frame = dynamic_cast< CEGUI::Window* >( _p_wnd->getChild( CHATLAYOUT_PREFIX "fr_chatbox" ) );

....

_p_editbox = dynamic_cast< CEGUI::Editbox* >( _p_frame->getChild( CHATLAYOUT_PREFIX "eb_editbox" ) );
_p_editbox->subscribeEvent( CEGUI::MultiLineEditbox::EventCharacterKey, CEGUI::Event::Subscriber( &CTD::PlayerChatGui::onEditboxTextChanged, this ) );

the exception occurs during dyn cast for _p_editbox !?

btw: the vc7.1 project settings in 0.3 has wrong compiler flags! the rtti generation is disabled which can be fatal.

cheers
boto

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: crash during rendering

Postby CrazyEddie » Sat Jul 09, 2005 12:50

btw: the vc7.1 project settings in 0.3 has wrong compiler flags! the rtti generation is disabled which can be fatal.

This is intentional. We do not use RTTI within the system, so it's disabled by default.

In relation to the crash problem, we're going to have to know what exception or assert failure that you're getting. If there are any errors in CEGUI.log, posting those with some context lines would also be helpful in tracking down your issue. Though getting a BSOD under WinXP sounds more like a driver issue.

I also regularly use the OpenGL renderer and get no problems :?

User avatar
boto
Not too shy to talk
Not too shy to talk
Posts: 26
Joined: Tue May 24, 2005 12:28

Re: crash during rendering

Postby boto » Sat Jul 09, 2005 18:13

hmmm, no rtti? is there a reason why cegui does not support that? is it due to performance decrease?

well i gonna change my dynamic_casts now, thanks for the hint. i will also rebuild cegui with no support for rtti ;-)

cheers
boto

User avatar
boto
Not too shy to talk
Not too shy to talk
Posts: 26
Joined: Tue May 24, 2005 12:28

Re: crash during rendering

Postby boto » Sat Jul 09, 2005 18:52

i have discovered something: directly after destroying some widgets using windows manager in next rendering phase the glDrawArrays gets a buffer which is partially destroyed, e.g. i get glDrawArrays called with 17 quats and only the first 11 quad objects in array are valid.

i suspect that dead widgets try to render themselves!? do i have to call a special method such as "update death pool" by myself?

cheers
boto

btw: the exceptions are gone since i use static_cast again ;-)

User avatar
boto
Not too shy to talk
Not too shy to talk
Posts: 26
Joined: Tue May 24, 2005 12:28

Re: crash during rendering

Postby boto » Sat Jul 09, 2005 18:59

if someone is interested, i am on irc channel #cegui

cheers
boto


Return to “Modifications / Integrations / Customisations”

Who is online

Users browsing this forum: No registered users and 7 guests