[CRASH] Game breaks when a Window calls an EventSet function

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

Pint0 Xtreme
Just popping in
Just popping in
Posts: 7
Joined: Sat Sep 17, 2011 07:03

[CRASH] Game breaks when a Window calls an EventSet function

Postby Pint0 Xtreme » Fri Feb 10, 2012 22:14

Hey there,

I've been having issues with CEGUI (version 0.7.5) crashing whenever I invoke any Window function calls that belongs to the EventSet class. It started with this code snippet that crashes:

Code: Select all

WindowManager& wmgr = WindowManager::getSingleton();
   Window* myRoot = wmgr.createWindow( "DefaultWindow", "root" );
   System::getSingleton().setGUISheet( myRoot );

   FrameWindow* fWnd = static_cast<FrameWindow*>(wmgr.createWindow( "TaharezLook/FrameWindow", "testWindow"));
   myRoot->addChildWindow( fWnd );
   // position a quarter of the way in from the top-left of parent.
   fWnd->setPosition( UVector2( UDim( 0.25f, 0 ), UDim( 0.25f, 0 ) ) );
   // set size to be half the size of the parent
   fWnd->setSize( UVector2( UDim( 0.5f, 0 ), UDim( 0.5f, 0 ) ) );
   fWnd->setText( "Hello World!" );
   fWnd->subscribeEvent(Window::EventMouseButtonUp, Event::Subscriber(&CCEGUIManager::HandleMouseButtonUp, this)); <-- CRASHES RIGHT HERE!!


The error I get is: Unhandled exception at 0x1048ee8f (CryGame.dll) in Launcher.exe: 0xC0000005: Access violation reading location 0x00000019.

So I did a bit of investigating and found that any function calls I make that belongs to the EventSet parent of the Window class causes similar crashes. For example, calling fWnd->removeAllEvents() or fWnd->isEventPresent() also does the same thing. I can't tell why this is happening (either the object isn't being created properly or something even deeper).

The CEGUI.log doesn't tell me much but here it is anyways:

Code: Select all

10/02/2012 14:02:29 (Std)    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
10/02/2012 14:02:29 (Std)    +                     Crazy Eddie's GUI System - Event log                    +
10/02/2012 14:02:29 (Std)    +                          (http://www.cegui.org.uk/)                         +
10/02/2012 14:02:29 (Std)    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

10/02/2012 14:02:29 (Std)    CEGUI::Logger singleton created. (02C2A050)
10/02/2012 14:02:29 (Std)    
10/02/2012 14:02:29 (Std)    ********************************************************************************
10/02/2012 14:02:29 (Std)    * Important:                                                                   *
10/02/2012 14:02:29 (Std)    *     To get support at the CEGUI forums, you must post _at least_ the section *
10/02/2012 14:02:29 (Std)    *     of this log file indicated below.  Failure to do this will result in no  *
10/02/2012 14:02:29 (Std)    *     support being given; please do not waste our time.                       *
10/02/2012 14:02:29 (Std)    ********************************************************************************
10/02/2012 14:02:29 (Std)    ********************************************************************************
10/02/2012 14:02:29 (Std)    * -------- START OF ESSENTIAL SECTION TO BE POSTED ON THE FORUM       -------- *
10/02/2012 14:02:29 (Std)    ********************************************************************************
10/02/2012 14:02:29 (Std)    ---- Version 0.7.5 (Build: Feb 10 2012 Microsoft Windows MSVC++ 9.0 32 bit) ----
10/02/2012 14:02:29 (Std)    ---- Renderer module is: CEGUI::Direct3D9Renderer - Official Direct3D 9 based 2nd generation renderer module. ----
10/02/2012 14:02:29 (Std)    ---- XML Parser module is: CEGUI::ExpatParser - Official expat based parser module for CEGUI ----
10/02/2012 14:02:29 (Std)    ---- Image Codec module is: SILLYImageCodec - Official SILLY based image codec ----
10/02/2012 14:02:29 (Std)    ---- Scripting module is: None ----
10/02/2012 14:02:29 (Std)    ********************************************************************************
10/02/2012 14:02:29 (Std)    * -------- END OF ESSENTIAL SECTION TO BE POSTED ON THE FORUM         -------- *
10/02/2012 14:02:29 (Std)    ********************************************************************************
10/02/2012 14:02:29 (Std)    
10/02/2012 14:02:29 (Std)    ---- Begining CEGUI System initialisation ----
10/02/2012 14:02:29 (Std)    CEGUI::ImagesetManager singleton created (02C32090)
10/02/2012 14:02:29 (Std)    CEGUI::FontManager singleton created. (02C33A10)
10/02/2012 14:02:29 (Std)    CEGUI::WindowFactoryManager singleton created
10/02/2012 14:02:29 (Std)    CEGUI::WindowManager singleton created (02C31C40)
10/02/2012 14:02:29 (Std)    CEGUI::SchemeManager singleton created. (02C34700)
10/02/2012 14:02:29 (Std)    CEGUI::MouseCursor singleton created. (02C347D0)
10/02/2012 14:02:29 (Std)    CEGUI::GlobalEventSet singleton created. (02C31040)
10/02/2012 14:02:29 (Std)    CEGUI::AnimationManager singleton created (02C343C0)
10/02/2012 14:02:29 (Std)    CEGUI::WidgetLookManager singleton created. (02C31AA0)
10/02/2012 14:02:29 (Std)    CEGUI::WindowRendererManager singleton created (02C35330)
10/02/2012 14:02:29 (Std)    CEGUI::RenderEffectManager singleton created (02C31C00)
10/02/2012 14:02:29 (Std)    Created WindowFactory for 'DefaultWindow' windows.
10/02/2012 14:02:29 (Std)    WindowFactory for 'DefaultWindow' windows added. (02C36F50)
10/02/2012 14:02:29 (Std)    Created WindowFactory for 'DragContainer' windows.
10/02/2012 14:02:29 (Std)    WindowFactory for 'DragContainer' windows added. (02C36DE0)
10/02/2012 14:02:29 (Std)    Created WindowFactory for 'ScrolledContainer' windows.
10/02/2012 14:02:29 (Std)    WindowFactory for 'ScrolledContainer' windows added. (02C36C70)
10/02/2012 14:02:29 (Std)    Created WindowFactory for 'ClippedContainer' windows.
10/02/2012 14:02:29 (Std)    WindowFactory for 'ClippedContainer' windows added. (02C36B00)
10/02/2012 14:02:29 (Std)    Created WindowFactory for 'CEGUI/Checkbox' windows.
10/02/2012 14:02:29 (Std)    WindowFactory for 'CEGUI/Checkbox' windows added. (02C36990)
10/02/2012 14:02:29 (Std)    Created WindowFactory for 'CEGUI/PushButton' windows.
10/02/2012 14:02:29 (Std)    WindowFactory for 'CEGUI/PushButton' windows added. (02C36820)
10/02/2012 14:02:29 (Std)    Created WindowFactory for 'CEGUI/RadioButton' windows.
10/02/2012 14:02:29 (Std)    WindowFactory for 'CEGUI/RadioButton' windows added. (02C366B0)
10/02/2012 14:02:29 (Std)    Created WindowFactory for 'CEGUI/Combobox' windows.
10/02/2012 14:02:29 (Std)    WindowFactory for 'CEGUI/Combobox' windows added. (02C36540)
10/02/2012 14:02:29 (Std)    Created WindowFactory for 'CEGUI/ComboDropList' windows.
10/02/2012 14:02:29 (Std)    WindowFactory for 'CEGUI/ComboDropList' windows added. (02C363D0)
10/02/2012 14:02:29 (Std)    Created WindowFactory for 'CEGUI/Editbox' windows.
10/02/2012 14:02:29 (Std)    WindowFactory for 'CEGUI/Editbox' windows added. (02C36260)
10/02/2012 14:02:29 (Std)    Created WindowFactory for 'CEGUI/FrameWindow' windows.
10/02/2012 14:02:29 (Std)    WindowFactory for 'CEGUI/FrameWindow' windows added. (02C360F0)
10/02/2012 14:02:29 (Std)    Created WindowFactory for 'CEGUI/ItemEntry' windows.
10/02/2012 14:02:29 (Std)    WindowFactory for 'CEGUI/ItemEntry' windows added. (02C37F50)
10/02/2012 14:02:29 (Std)    Created WindowFactory for 'CEGUI/Listbox' windows.
10/02/2012 14:02:29 (Std)    WindowFactory for 'CEGUI/Listbox' windows added. (02C37DE0)
10/02/2012 14:02:29 (Std)    Created WindowFactory for 'CEGUI/ListHeader' windows.
10/02/2012 14:02:29 (Std)    WindowFactory for 'CEGUI/ListHeader' windows added. (02C37C70)
10/02/2012 14:02:29 (Std)    Created WindowFactory for 'CEGUI/ListHeaderSegment' windows.
10/02/2012 14:02:29 (Std)    WindowFactory for 'CEGUI/ListHeaderSegment' windows added. (02BE5E30)
10/02/2012 14:02:29 (Std)    Created WindowFactory for 'CEGUI/Menubar' windows.
10/02/2012 14:02:29 (Std)    WindowFactory for 'CEGUI/Menubar' windows added. (02BED140)
10/02/2012 14:02:29 (Std)    Created WindowFactory for 'CEGUI/PopupMenu' windows.
10/02/2012 14:02:29 (Std)    WindowFactory for 'CEGUI/PopupMenu' windows added. (02BE6150)
10/02/2012 14:02:29 (Std)    Created WindowFactory for 'CEGUI/MenuItem' windows.
10/02/2012 14:02:29 (Std)    WindowFactory for 'CEGUI/MenuItem' windows added. (02BF2100)
10/02/2012 14:02:29 (Std)    Created WindowFactory for 'CEGUI/MultiColumnList' windows.
10/02/2012 14:02:29 (Std)    WindowFactory for 'CEGUI/MultiColumnList' windows added. (02BE5160)
10/02/2012 14:02:29 (Std)    Created WindowFactory for 'CEGUI/MultiLineEditbox' windows.
10/02/2012 14:02:29 (Std)    WindowFactory for 'CEGUI/MultiLineEditbox' windows added. (02BFF510)
10/02/2012 14:02:29 (Std)    Created WindowFactory for 'CEGUI/ProgressBar' windows.
10/02/2012 14:02:29 (Std)    WindowFactory for 'CEGUI/ProgressBar' windows added. (02BFE0A0)
10/02/2012 14:02:29 (Std)    Created WindowFactory for 'CEGUI/ScrollablePane' windows.
10/02/2012 14:02:29 (Std)    WindowFactory for 'CEGUI/ScrollablePane' windows added. (02BFBB70)
10/02/2012 14:02:29 (Std)    Created WindowFactory for 'CEGUI/Scrollbar' windows.
10/02/2012 14:02:29 (Std)    WindowFactory for 'CEGUI/Scrollbar' windows added. (02BFF0C0)
10/02/2012 14:02:29 (Std)    Created WindowFactory for 'CEGUI/Slider' windows.
10/02/2012 14:02:29 (Std)    WindowFactory for 'CEGUI/Slider' windows added. (02BFF010)
10/02/2012 14:02:29 (Std)    Created WindowFactory for 'CEGUI/Spinner' windows.
10/02/2012 14:02:29 (Std)    WindowFactory for 'CEGUI/Spinner' windows added. (02BE4D30)
10/02/2012 14:02:29 (Std)    Created WindowFactory for 'CEGUI/TabButton' windows.
10/02/2012 14:02:29 (Std)    WindowFactory for 'CEGUI/TabButton' windows added. (02BFA810)
10/02/2012 14:02:29 (Std)    Created WindowFactory for 'CEGUI/TabControl' windows.
10/02/2012 14:02:29 (Std)    WindowFactory for 'CEGUI/TabControl' windows added. (02C027E0)
10/02/2012 14:02:29 (Std)    Created WindowFactory for 'CEGUI/Thumb' windows.
10/02/2012 14:02:29 (Std)    WindowFactory for 'CEGUI/Thumb' windows added. (02C02730)
10/02/2012 14:02:29 (Std)    Created WindowFactory for 'CEGUI/Titlebar' windows.
10/02/2012 14:02:29 (Std)    WindowFactory for 'CEGUI/Titlebar' windows added. (02C02160)
10/02/2012 14:02:29 (Std)    Created WindowFactory for 'CEGUI/Tooltip' windows.
10/02/2012 14:02:29 (Std)    WindowFactory for 'CEGUI/Tooltip' windows added. (02C0B0B0)
10/02/2012 14:02:29 (Std)    Created WindowFactory for 'CEGUI/ItemListbox' windows.
10/02/2012 14:02:29 (Std)    WindowFactory for 'CEGUI/ItemListbox' windows added. (02C0D370)
10/02/2012 14:02:29 (Std)    Created WindowFactory for 'CEGUI/GroupBox' windows.
10/02/2012 14:02:29 (Std)    WindowFactory for 'CEGUI/GroupBox' windows added. (02C0C8F0)
10/02/2012 14:02:29 (Std)    Created WindowFactory for 'CEGUI/Tree' windows.
10/02/2012 14:02:29 (Std)    WindowFactory for 'CEGUI/Tree' windows added. (02C020B0)
10/02/2012 14:02:29 (Std)    Created WindowFactory for 'HorizontalLayoutContainer' windows.
10/02/2012 14:02:29 (Std)    WindowFactory for 'HorizontalLayoutContainer' windows added. (02C14030)
10/02/2012 14:02:29 (Std)    Created WindowFactory for 'VerticalLayoutContainer' windows.
10/02/2012 14:02:29 (Std)    WindowFactory for 'VerticalLayoutContainer' windows added. (02C12050)
10/02/2012 14:02:29 (Std)    Created WindowFactory for 'GridLayoutContainer' windows.
10/02/2012 14:02:29 (Std)    WindowFactory for 'GridLayoutContainer' windows added. (02C11050)
10/02/2012 14:02:29 (Std)    Window type alias named 'DefaultGUISheet' added for window type 'DefaultWindow'.
10/02/2012 14:02:29 (Std)    CEGUI::System singleton created. (02C2F390)
10/02/2012 14:02:29 (Std)    ---- CEGUI System initialisation completed ----
10/02/2012 14:02:29 (Std)    
10/02/2012 14:02:29 (Std)    Started creation of Scheme from XML specification:
10/02/2012 14:02:29 (Std)    ---- CEGUI GUIScheme name: TaharezLook
10/02/2012 14:02:29 (Std)    Started creation of Imageset from XML specification:
10/02/2012 14:02:29 (Std)    ---- CEGUI Imageset name: TaharezLook
10/02/2012 14:02:29 (Std)    ---- Source texture file: TaharezLook.tga in resource group: (Default)
10/02/2012 14:02:29 (Std)    Started creation of Font from XML specification:
10/02/2012 14:02:29 (Std)    ---- CEGUI font name: DejaVuSans-10
10/02/2012 14:02:29 (Std)    ----       Font type: FreeType
10/02/2012 14:02:29 (Std)    ----     Source file: DejaVuSans.ttf in resource group: (Default)
10/02/2012 14:02:29 (Std)    ---- Real point size: 10
10/02/2012 14:02:29 (Std)    ===== Falagard 'root' element: look and feel parsing begins =====
10/02/2012 14:02:29 (Std)    ===== Look and feel parsing completed =====
10/02/2012 14:02:29 (Std)    No window renderer factories specified for module 'CEGUIFalagardWRBase' - adding all available factories...
10/02/2012 14:02:29 (Std)    Created WindowRendererFactory for 'Falagard/Button' WindowRenderers.
10/02/2012 14:02:29 (Std)    WindowRendererFactory 'Falagard/Button' added. (125A9CE0)
10/02/2012 14:02:29 (Std)    Created WindowRendererFactory for 'Falagard/Default' WindowRenderers.
10/02/2012 14:02:29 (Std)    WindowRendererFactory 'Falagard/Default' added. (125A9AF0)
10/02/2012 14:02:29 (Std)    Created WindowRendererFactory for 'Falagard/Editbox' WindowRenderers.
10/02/2012 14:02:29 (Std)    WindowRendererFactory 'Falagard/Editbox' added. (125AADC0)
10/02/2012 14:02:29 (Std)    Created WindowRendererFactory for 'Falagard/FrameWindow' WindowRenderers.
10/02/2012 14:02:29 (Std)    WindowRendererFactory 'Falagard/FrameWindow' added. (125AA8C0)
10/02/2012 14:02:29 (Std)    Created WindowRendererFactory for 'Falagard/ItemEntry' WindowRenderers.
10/02/2012 14:02:29 (Std)    WindowRendererFactory 'Falagard/ItemEntry' added. (125AA210)
10/02/2012 14:02:29 (Std)    Created WindowRendererFactory for 'Falagard/ListHeader' WindowRenderers.
10/02/2012 14:02:29 (Std)    WindowRendererFactory 'Falagard/ListHeader' added. (125A8720)
10/02/2012 14:02:29 (Std)    Created WindowRendererFactory for 'Falagard/ListHeaderSegment' WindowRenderers.
10/02/2012 14:02:29 (Std)    WindowRendererFactory 'Falagard/ListHeaderSegment' added. (125A85B0)
10/02/2012 14:02:29 (Std)    Created WindowRendererFactory for 'Falagard/Listbox' WindowRenderers.
10/02/2012 14:02:29 (Std)    WindowRendererFactory 'Falagard/Listbox' added. (125A8440)
10/02/2012 14:02:29 (Std)    Created WindowRendererFactory for 'Falagard/Menubar' WindowRenderers.
10/02/2012 14:02:29 (Std)    WindowRendererFactory 'Falagard/Menubar' added. (125A82D0)
10/02/2012 14:02:29 (Std)    Created WindowRendererFactory for 'Falagard/MenuItem' WindowRenderers.
10/02/2012 14:02:29 (Std)    WindowRendererFactory 'Falagard/MenuItem' added. (125A8160)
10/02/2012 14:02:29 (Std)    Created WindowRendererFactory for 'Falagard/MultiColumnList' WindowRenderers.
10/02/2012 14:02:29 (Std)    WindowRendererFactory 'Falagard/MultiColumnList' added. (125A95A0)
10/02/2012 14:02:29 (Std)    Created WindowRendererFactory for 'Falagard/MultiLineEditbox' WindowRenderers.
10/02/2012 14:02:29 (Std)    WindowRendererFactory 'Falagard/MultiLineEditbox' added. (125A9430)
10/02/2012 14:02:29 (Std)    Created WindowRendererFactory for 'Falagard/PopupMenu' WindowRenderers.
10/02/2012 14:02:29 (Std)    WindowRendererFactory 'Falagard/PopupMenu' added. (125AB770)
10/02/2012 14:02:29 (Std)    Created WindowRendererFactory for 'Falagard/ProgressBar' WindowRenderers.
10/02/2012 14:02:29 (Std)    WindowRendererFactory 'Falagard/ProgressBar' added. (125AB600)
10/02/2012 14:02:29 (Std)    Created WindowRendererFactory for 'Falagard/ScrollablePane' WindowRenderers.
10/02/2012 14:02:29 (Std)    WindowRendererFactory 'Falagard/ScrollablePane' added. (125AB490)
10/02/2012 14:02:29 (Std)    Created WindowRendererFactory for 'Falagard/Scrollbar' WindowRenderers.
10/02/2012 14:02:29 (Std)    WindowRendererFactory 'Falagard/Scrollbar' added. (12582B60)
10/02/2012 14:02:29 (Std)    Created WindowRendererFactory for 'Falagard/Slider' WindowRenderers.
10/02/2012 14:02:29 (Std)    WindowRendererFactory 'Falagard/Slider' added. (12582430)
10/02/2012 14:02:29 (Std)    Created WindowRendererFactory for 'Falagard/Static' WindowRenderers.
10/02/2012 14:02:29 (Std)    WindowRendererFactory 'Falagard/Static' added. (1257B110)
10/02/2012 14:02:29 (Std)    Created WindowRendererFactory for 'Falagard/StaticImage' WindowRenderers.
10/02/2012 14:02:29 (Std)    WindowRendererFactory 'Falagard/StaticImage' added. (125A5490)
10/02/2012 14:02:29 (Std)    Created WindowRendererFactory for 'Falagard/StaticText' WindowRenderers.
10/02/2012 14:02:29 (Std)    WindowRendererFactory 'Falagard/StaticText' added. (125A2AE0)
10/02/2012 14:02:29 (Std)    Created WindowRendererFactory for 'Falagard/SystemButton' WindowRenderers.
10/02/2012 14:02:29 (Std)    WindowRendererFactory 'Falagard/SystemButton' added. (125A2400)
10/02/2012 14:02:29 (Std)    Created WindowRendererFactory for 'Falagard/TabButton' WindowRenderers.
10/02/2012 14:02:29 (Std)    WindowRendererFactory 'Falagard/TabButton' added. (125A2D40)
10/02/2012 14:02:29 (Std)    Created WindowRendererFactory for 'Falagard/TabControl' WindowRenderers.
10/02/2012 14:02:29 (Std)    WindowRendererFactory 'Falagard/TabControl' added. (125A5770)
10/02/2012 14:02:29 (Std)    Created WindowRendererFactory for 'Falagard/Titlebar' WindowRenderers.
10/02/2012 14:02:29 (Std)    WindowRendererFactory 'Falagard/Titlebar' added. (125A30C0)
10/02/2012 14:02:29 (Std)    Created WindowRendererFactory for 'Falagard/ToggleButton' WindowRenderers.
10/02/2012 14:02:29 (Std)    WindowRendererFactory 'Falagard/ToggleButton' added. (1257C890)
10/02/2012 14:02:29 (Std)    Created WindowRendererFactory for 'Falagard/Tooltip' WindowRenderers.
10/02/2012 14:02:29 (Std)    WindowRendererFactory 'Falagard/Tooltip' added. (1257D360)
10/02/2012 14:02:29 (Std)    Created WindowRendererFactory for 'Falagard/ItemListbox' WindowRenderers.
10/02/2012 14:02:29 (Std)    WindowRendererFactory 'Falagard/ItemListbox' added. (125A3B20)
10/02/2012 14:02:29 (Std)    Created WindowRendererFactory for 'Falagard/Tree' WindowRenderers.
10/02/2012 14:02:29 (Std)    WindowRendererFactory 'Falagard/Tree' added. (125A3A70)
10/02/2012 14:02:29 (Std)    Creating falagard mapping for type 'TaharezLook/Button' using base type 'CEGUI/PushButton', window renderer 'Falagard/Button' Look'N'Feel 'TaharezLook/Button' and RenderEffect ''. (0018BFD0)
10/02/2012 14:02:29 (Std)    Creating falagard mapping for type 'TaharezLook/Checkbox' using base type 'CEGUI/Checkbox', window renderer 'Falagard/ToggleButton' Look'N'Feel 'TaharezLook/Checkbox' and RenderEffect ''. (0018BFD0)
10/02/2012 14:02:29 (Std)    Creating falagard mapping for type 'TaharezLook/ImageButton' using base type 'CEGUI/PushButton', window renderer 'Falagard/Button' Look'N'Feel 'TaharezLook/ImageButton' and RenderEffect ''. (0018BFD0)
10/02/2012 14:02:29 (Std)    Creating falagard mapping for type 'TaharezLook/RadioButton' using base type 'CEGUI/RadioButton', window renderer 'Falagard/ToggleButton' Look'N'Feel 'TaharezLook/RadioButton' and RenderEffect ''. (0018BFD0)
10/02/2012 14:02:29 (Std)    Creating falagard mapping for type 'TaharezLook/FrameWindow' using base type 'CEGUI/FrameWindow', window renderer 'Falagard/FrameWindow' Look'N'Feel 'TaharezLook/FrameWindow' and RenderEffect ''. (0018BFD0)
10/02/2012 14:02:29 (Std)    Creating falagard mapping for type 'TaharezLook/Titlebar' using base type 'CEGUI/Titlebar', window renderer 'Falagard/Titlebar' Look'N'Feel 'TaharezLook/Titlebar' and RenderEffect ''. (0018BFD0)
10/02/2012 14:02:29 (Std)    Creating falagard mapping for type 'TaharezLook/SystemButton' using base type 'CEGUI/PushButton', window renderer 'Falagard/Button' Look'N'Feel 'TaharezLook/Button' and RenderEffect ''. (0018BFD0)
10/02/2012 14:02:29 (Std)    Creating falagard mapping for type 'TaharezLook/Editbox' using base type 'CEGUI/Editbox', window renderer 'Falagard/Editbox' Look'N'Feel 'TaharezLook/Editbox' and RenderEffect ''. (0018BFD0)
10/02/2012 14:02:29 (Std)    Creating falagard mapping for type 'TaharezLook/MultiLineEditbox' using base type 'CEGUI/MultiLineEditbox', window renderer 'Falagard/MultiLineEditbox' Look'N'Feel 'TaharezLook/MultiLineEditbox' and RenderEffect ''. (0018BFD0)
10/02/2012 14:02:29 (Std)    Creating falagard mapping for type 'TaharezLook/Menubar' using base type 'CEGUI/Menubar', window renderer 'Falagard/Menubar' Look'N'Feel 'TaharezLook/Menubar' and RenderEffect ''. (0018BFD0)
10/02/2012 14:02:29 (Std)    Creating falagard mapping for type 'TaharezLook/PopupMenu' using base type 'CEGUI/PopupMenu', window renderer 'Falagard/PopupMenu' Look'N'Feel 'TaharezLook/PopupMenu' and RenderEffect ''. (0018BFD0)
10/02/2012 14:02:29 (Std)    Creating falagard mapping for type 'TaharezLook/MenuItem' using base type 'CEGUI/MenuItem', window renderer 'Falagard/MenuItem' Look'N'Feel 'TaharezLook/MenuItem' and RenderEffect ''. (0018BFD0)
10/02/2012 14:02:29 (Std)    Creating falagard mapping for type 'TaharezLook/AlternateProgressBar' using base type 'CEGUI/ProgressBar', window renderer 'Falagard/ProgressBar' Look'N'Feel 'TaharezLook/AltProgressBar' and RenderEffect ''. (0018BFD0)
10/02/2012 14:02:29 (Std)    Creating falagard mapping for type 'TaharezLook/ProgressBar' using base type 'CEGUI/ProgressBar', window renderer 'Falagard/ProgressBar' Look'N'Feel 'TaharezLook/ProgressBar' and RenderEffect ''. (0018BFD0)
10/02/2012 14:02:29 (Std)    Creating falagard mapping for type 'TaharezLook/VUMeter' using base type 'CEGUI/ProgressBar', window renderer 'Falagard/ProgressBar' Look'N'Feel 'TaharezLook/VUMeter' and RenderEffect ''. (0018BFD0)
10/02/2012 14:02:29 (Std)    Creating falagard mapping for type 'TaharezLook/VerticalScrollbar' using base type 'CEGUI/Scrollbar', window renderer 'Falagard/Scrollbar' Look'N'Feel 'TaharezLook/VerticalScrollbar' and RenderEffect ''. (0018BFD0)
10/02/2012 14:02:29 (Std)    Creating falagard mapping for type 'TaharezLook/HorizontalScrollbar' using base type 'CEGUI/Scrollbar', window renderer 'Falagard/Scrollbar' Look'N'Feel 'TaharezLook/HorizontalScrollbar' and RenderEffect ''. (0018BFD0)
10/02/2012 14:02:29 (Std)    Creating falagard mapping for type 'TaharezLook/VerticalScrollbarThumb' using base type 'CEGUI/Thumb', window renderer 'Falagard/Button' Look'N'Feel 'TaharezLook/VerticalScrollbarThumb' and RenderEffect ''. (0018BFD0)
10/02/2012 14:02:29 (Std)    Creating falagard mapping for type 'TaharezLook/HorizontalScrollbarThumb' using base type 'CEGUI/Thumb', window renderer 'Falagard/Button' Look'N'Feel 'TaharezLook/HorizontalScrollbarThumb' and RenderEffect ''. (0018BFD0)
10/02/2012 14:02:29 (Std)    Creating falagard mapping for type 'TaharezLook/LargeVerticalScrollbar' using base type 'CEGUI/Scrollbar', window renderer 'Falagard/Scrollbar' Look'N'Feel 'TaharezLook/LargeVerticalScrollbar' and RenderEffect ''. (0018BFD0)
10/02/2012 14:02:29 (Std)    Creating falagard mapping for type 'TaharezLook/LargeVerticalScrollbarThumb' using base type 'CEGUI/Thumb', window renderer 'Falagard/Button' Look'N'Feel 'TaharezLook/LargeVerticalScrollbarThumb' and RenderEffect ''. (0018BFD0)
10/02/2012 14:02:29 (Std)    Creating falagard mapping for type 'TaharezLook/TabButton' using base type 'CEGUI/TabButton', window renderer 'Falagard/TabButton' Look'N'Feel 'TaharezLook/TabButton' and RenderEffect ''. (0018BFD0)
10/02/2012 14:02:29 (Std)    Creating falagard mapping for type 'TaharezLook/TabControl' using base type 'CEGUI/TabControl', window renderer 'Falagard/TabControl' Look'N'Feel 'TaharezLook/TabControl' and RenderEffect ''. (0018BFD0)
10/02/2012 14:02:29 (Std)    Creating falagard mapping for type 'TaharezLook/TabContentPane' using base type 'DefaultWindow', window renderer 'Falagard/Default' Look'N'Feel 'TaharezLook/TabContentPane' and RenderEffect ''. (0018BFD0)
10/02/2012 14:02:29 (Std)    Creating falagard mapping for type 'TaharezLook/TabButtonPane' using base type 'DefaultWindow', window renderer 'Falagard/Default' Look'N'Feel 'TaharezLook/TabButtonPane' and RenderEffect ''. (0018BFD0)
10/02/2012 14:02:29 (Std)    Creating falagard mapping for type 'TaharezLook/ComboDropList' using base type 'CEGUI/ComboDropList', window renderer 'Falagard/Listbox' Look'N'Feel 'TaharezLook/ComboDropList' and RenderEffect ''. (0018BFD0)
10/02/2012 14:02:29 (Std)    Creating falagard mapping for type 'TaharezLook/ComboEditbox' using base type 'CEGUI/Editbox', window renderer 'Falagard/Editbox' Look'N'Feel 'TaharezLook/ComboEditbox' and RenderEffect ''. (0018BFD0)
10/02/2012 14:02:29 (Std)    Creating falagard mapping for type 'TaharezLook/Combobox' using base type 'CEGUI/Combobox', window renderer 'Falagard/Default' Look'N'Feel 'TaharezLook/Combobox' and RenderEffect ''. (0018BFD0)
10/02/2012 14:02:29 (Std)    Creating falagard mapping for type 'TaharezLook/Listbox' using base type 'CEGUI/Listbox', window renderer 'Falagard/Listbox' Look'N'Feel 'TaharezLook/Listbox' and RenderEffect ''. (0018BFD0)
10/02/2012 14:02:29 (Std)    Creating falagard mapping for type 'TaharezLook/ListHeader' using base type 'CEGUI/ListHeader', window renderer 'Falagard/ListHeader' Look'N'Feel 'TaharezLook/ListHeader' and RenderEffect ''. (0018BFD0)
10/02/2012 14:02:29 (Std)    Creating falagard mapping for type 'TaharezLook/ListHeaderSegment' using base type 'CEGUI/ListHeaderSegment', window renderer 'Falagard/ListHeaderSegment' Look'N'Feel 'TaharezLook/ListHeaderSegment' and RenderEffect ''. (0018BFD0)
10/02/2012 14:02:29 (Std)    Creating falagard mapping for type 'TaharezLook/MultiColumnList' using base type 'CEGUI/MultiColumnList', window renderer 'Falagard/MultiColumnList' Look'N'Feel 'TaharezLook/MultiColumnList' and RenderEffect ''. (0018BFD0)
10/02/2012 14:02:29 (Std)    Creating falagard mapping for type 'TaharezLook/Slider' using base type 'CEGUI/Slider', window renderer 'Falagard/Slider' Look'N'Feel 'TaharezLook/Slider' and RenderEffect ''. (0018BFD0)
10/02/2012 14:02:29 (Std)    Creating falagard mapping for type 'TaharezLook/SliderThumb' using base type 'CEGUI/Thumb', window renderer 'Falagard/Button' Look'N'Feel 'TaharezLook/SliderThumb' and RenderEffect ''. (0018BFD0)
10/02/2012 14:02:29 (Std)    Creating falagard mapping for type 'TaharezLook/ScrollablePane' using base type 'CEGUI/ScrollablePane', window renderer 'Falagard/ScrollablePane' Look'N'Feel 'TaharezLook/ScrollablePane' and RenderEffect ''. (0018BFD0)
10/02/2012 14:02:29 (Std)    Creating falagard mapping for type 'TaharezLook/Spinner' using base type 'CEGUI/Spinner', window renderer 'Falagard/Default' Look'N'Feel 'TaharezLook/Spinner' and RenderEffect ''. (0018BFD0)
10/02/2012 14:02:29 (Std)    Creating falagard mapping for type 'TaharezLook/Tooltip' using base type 'CEGUI/Tooltip', window renderer 'Falagard/Tooltip' Look'N'Feel 'TaharezLook/Tooltip' and RenderEffect ''. (0018BFD0)
10/02/2012 14:02:29 (Std)    Creating falagard mapping for type 'TaharezLook/StaticImage' using base type 'DefaultWindow', window renderer 'Falagard/StaticImage' Look'N'Feel 'TaharezLook/StaticImage' and RenderEffect ''. (0018BFD0)
10/02/2012 14:02:29 (Std)    Creating falagard mapping for type 'TaharezLook/StaticText' using base type 'DefaultWindow', window renderer 'Falagard/StaticText' Look'N'Feel 'TaharezLook/StaticText' and RenderEffect ''. (0018BFD0)
10/02/2012 14:02:29 (Std)    Creating falagard mapping for type 'TaharezLook/ItemListbox' using base type 'CEGUI/ItemListbox', window renderer 'Falagard/ItemListbox' Look'N'Feel 'TaharezLook/ItemListbox' and RenderEffect ''. (0018BFD0)
10/02/2012 14:02:29 (Std)    Creating falagard mapping for type 'TaharezLook/ListboxItem' using base type 'CEGUI/ItemEntry', window renderer 'Falagard/ItemEntry' Look'N'Feel 'TaharezLook/ListboxItem' and RenderEffect ''. (0018BFD0)
10/02/2012 14:02:29 (Std)    Creating falagard mapping for type 'TaharezLook/GroupBox' using base type 'CEGUI/GroupBox', window renderer 'Falagard/Default' Look'N'Feel 'TaharezLook/GroupBox' and RenderEffect ''. (0018BFD0)
10/02/2012 14:02:29 (Std)    Creating falagard mapping for type 'TaharezLook/Tree' using base type 'CEGUI/Tree', window renderer 'Falagard/Tree' Look'N'Feel 'TaharezLook/Tree' and RenderEffect ''. (0018BFD0)
10/02/2012 14:02:29 (Std)    Started creation of Font from XML specification:
10/02/2012 14:02:29 (Std)    ---- CEGUI font name: DejaVuSans-10
10/02/2012 14:02:29 (Std)    ----       Font type: FreeType
10/02/2012 14:02:29 (Std)    ----     Source file: DejaVuSans.ttf in resource group: (Default)
10/02/2012 14:02:29 (Std)    ---- Real point size: 10
10/02/2012 14:02:29 (Std)    ---- Returning existing instance of Font named 'DejaVuSans-10'.


I don't know if this makes any difference but function calls belonging to the PropertySet parent seem to work just fine.

Pint0 Xtreme
Just popping in
Just popping in
Posts: 7
Joined: Sat Sep 17, 2011 07:03

Re: [CRASH] Game breaks when a Window calls an EventSet func

Postby Pint0 Xtreme » Fri Feb 10, 2012 23:46

I was playing around with the CEGUI code base and tried flipping the order in which the class Window inherited its parents.

So I changed:

Code: Select all

class CEGUIEXPORT Window : public PropertySet, public EventSet

to

Code: Select all

class CEGUIEXPORT Window : public EventSet, public PropertySet


I built it and behold, the EventSet functions work but the PropertySet ones do not. Hmmm...

Pint0 Xtreme
Just popping in
Just popping in
Posts: 7
Joined: Sat Sep 17, 2011 07:03

Re: [CRASH] Game breaks when a Window calls an EventSet func

Postby Pint0 Xtreme » Sat Feb 11, 2012 00:30

On further investigation, I've found that when the EventSet class is inherited second, the game is crashing when attempting to access the d_events EventMap. Still not sure why this is happening.

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

Re: [CRASH] Game breaks when a Window calls an EventSet func

Postby CrazyEddie » Sat Feb 11, 2012 08:43

Issues of this nature will be one of two things...

1) There is some heap corruption going on. This is perhaps unlikely, especially if it's consistently reproducible and if the same issue were to happen in the same way on multiple different Window instances (still not impossible though).

2) More likely, is that the CEGUI code was compiled with different compiler options to those used when building the code that calls into CEGUI. Here we are talking about any and all options that affect memory layout, memory alignment, anything related to the way objects are composed and so on... These must all match for all libraries and components - especially when using C++ code - otherwise you're entering a world of pain.

CE.

Pint0 Xtreme
Just popping in
Just popping in
Posts: 7
Joined: Sat Sep 17, 2011 07:03

Re: [CRASH] Game breaks when a Window calls an EventSet func

Postby Pint0 Xtreme » Mon Feb 13, 2012 20:37

So I've attempted to do a side-by-side review of both the CEGUIBase project settings and the project settings of my application (in this case, the CryEngine GameDll). I went through each line item in the C++ and Linker properties and removed any discrepancy I found but unfortunately, it didn't solve the issue. I tried a few more things and discovered that while the game was crashing when an EventSet function was using an EventSet member object (such as d_events), if the same member objects were accessed within the scope of the Window class, it would NOT crash! I still am perplexed as to what's going on in the background but for the time being, I've added my own Window-class public function that more or less serves the same purpose:

Code: Select all

Event::Connection Window::SubscribeEvent(const String& name, Event::Subscriber subscriber)
{
   Event *pNewEvent = NULL;
   EventMap::iterator pos = d_events.find(name);

    // if event did not exist, add it and then find it.
    if (pos == d_events.end())
    {
        addEvent(name);
        pNewEvent = d_events.find(name)->second;
    }
   else
       pNewEvent = pos->second;

   return pNewEvent->subscribe(subscriber);
}


So (strangely) this works for me as the EventSet member object d_events is being used within the scope of the Window class instead of the EventSet class. However, I'm concerned that this is merely a symptom of a deeper issue I have yet to resolve, which might come up again in a different form. Does this shed any light at all to what's happening internally?

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

Re: [CRASH] Game breaks when a Window calls an EventSet func

Postby CrazyEddie » Tue Feb 14, 2012 08:12

I agree that fixing symptoms is bad - you're almost certain to have the root cause come back and bite you. This said, I can not shed any additional light on the issue - it still seems likely that the compiler is accessing the base class members at the 'wrong' location for whatever reason, of course, the issue is that I have no additional suggestions as to what might cause that.

You can be sure that the issue is not inherent to CEGUI itself - you will likely find that the CEGUI samples run ok.

The specific set up you have - with the CryEngine and such - is also seeming not unique, since others have had it running and working correctly (after some issues), you probably already saw this: viewtopic.php?f=10&t=5974

I don't like not being able to give a solution - or even a decent suggestion - to get people up and running, but in this case, I'm coming up with nothing useful :?

CE


Return to “Help”

Who is online

Users browsing this forum: No registered users and 5 guests