subscribeEvent makes application crash at startup

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

Sniper Binaire
Just popping in
Just popping in
Posts: 7
Joined: Sat Feb 12, 2011 14:29

subscribeEvent makes application crash at startup

Postby Sniper Binaire » Sat Feb 12, 2011 14:54

Hello everyone, this is my first post on the forum
hopelessly is is to sole an issue I am currently encountering

I have this error when just clicking my exe
Image

I've checked CEGUI and it recompiles flawlessly
My CEGUI code is :

Code: Select all

      // ======================================================================================================================================
      // Set up CEGUI============================================================================================================
      // ===============================================================================================================
          CEGUI::LuaScriptModule* script_module = &CEGUI::LuaScriptModule::create();
      CEGUI::OgreRenderer &mRenderer = CEGUI::OgreRenderer::create();
      CEGUI::OgreResourceProvider &mResourceProvider = CEGUI::OgreRenderer::createOgreResourceProvider();
      CEGUI::OgreImageCodec *mImageCodec = &CEGUI::OgreRenderer::createOgreImageCodec();
      //CEGUI::System::create(mRenderer, 0,0,0, script_module );
      CEGUI::OgreRenderer::bootstrapSystem();
      CEGUI::System &CEGUIsys = CEGUI::System::getSingleton();
      
      CEGUI::WindowManager& winMgr = CEGUI::WindowManager::getSingleton();
        CEGUI::Imageset::setDefaultResourceGroup("Imagesets");
        CEGUI::Font::setDefaultResourceGroup("Fonts");
        CEGUI::Scheme::setDefaultResourceGroup("Schemes");
        CEGUI::WidgetLookManager::setDefaultResourceGroup("LookNFeel");
        CEGUI::WindowManager::setDefaultResourceGroup("Layouts");
      CEGUI::SchemeManager::getSingleton().create("TaharezLook.scheme");
      CEGUI::System::getSingleton().setDefaultMouseCursor("TaharezLook", "MouseArrow");
      CEGUI::MouseCursor::getSingleton().setImage(CEGUI::System::getSingleton().getDefaultMouseCursor());
      
      //CEGUIsys.setScriptingModule(script_module);
      CEGUIsys.executeScriptFile("init_script.lua");
      CEGUI::Window *guiRoot = CEGUI::WindowManager::getSingleton().loadWindowLayout("debugtext.layout");
      CEGUI::System::getSingleton().setGUISheet(guiRoot);

      CEGUI::Window* chatText = winMgr.getWindow("/TextDemo/StaticText");
      chatText->setText("Namuh \nChargement en cours....");


      CEGUI::FrameWindow* frameWindow = static_cast<CEGUI::FrameWindow*>(winMgr.getWindow("xcvt"));
      frameWindow->subscribeEvent(CEGUI::FrameWindow::EventCloseClicked, Handleclose);



(severals lines are just comments)

And this is how i update CEGUI in the main loop of my program :

Code: Select all

         CEGUI::System::getSingleton().injectTimePulse(0.0167);
         CEGUI::System::getSingleton().injectMouseMove(ms.X.rel, ms.Y.rel);
         if(ms.buttonDown( OIS::MB_Right )) CEGUI::System::getSingleton().injectMouseButtonDown(CEGUI::RightButton);
         else CEGUI::System::getSingleton().injectMouseButtonUp(CEGUI::RightButton);
         if(ms.buttonDown( OIS::MB_Left )) CEGUI::System::getSingleton().injectMouseButtonDown(CEGUI::LeftButton);
         else CEGUI::System::getSingleton().injectMouseButtonUp(CEGUI::LeftButton);
         if(ms.buttonDown( OIS::MB_Middle )) CEGUI::System::getSingleton().injectMouseButtonDown(CEGUI::MiddleButton);
         else CEGUI::System::getSingleton().injectMouseButtonUp(CEGUI::MiddleButton);
         


I shall post my log file, but as the crash occurs immediately, the file still empty...
I would say also that if i remove those two last lines

Code: Select all

      CEGUI::FrameWindow* frameWindow = static_cast<CEGUI::FrameWindow*>(winMgr.getWindow("xcvt"));
      frameWindow->subscribeEvent(CEGUI::FrameWindow::EventCloseClicked, Handleclose);


The program runs nicely
(Well in fact just a minor problem : CEGUI windows are blinking when moving them, have you got an idea for that king of issue also ?)

This is some important informations that are in the log generated by the program without those two last lines
12/02/2011 15:22:24 (Std) ********************************************************************************
12/02/2011 15:22:24 (Std) * -------- START OF ESSENTIAL SECTION TO BE POSTED ON THE FORUM -------- *
12/02/2011 15:22:24 (Std) ********************************************************************************
12/02/2011 15:22:24 (Std) ---- Version 0.7.4 (Build: Oct 28 2010 Microsoft Windows MSVC++ 9.0 32 bit) ----
12/02/2011 15:22:24 (Std) ---- Renderer module is: CEGUI::OgreRenderer - Official OGRE based 2nd generation renderer module. ----
12/02/2011 15:22:24 (Std) ---- XML Parser module is: CEGUI::ExpatParser - Official expat based parser module for CEGUI ----
12/02/2011 15:22:24 (Std) ---- Image Codec module is: OgreImageCodec - Integrated ImageCodec using the Ogre engine. ----
12/02/2011 15:22:24 (Std) ---- Scripting module is: None ----
12/02/2011 15:22:24 (Std) ********************************************************************************
12/02/2011 15:22:24 (Std) * -------- END OF ESSENTIAL SECTION TO BE POSTED ON THE FORUM -------- *
12/02/2011 15:22:24 (Std) ********************************************************************************




Nota Bene : I am a french user that have a very bad english (Hope that it wasn't horrible to read), please excuse me i do my best : )

User avatar
Kulik
CEGUI Team
Posts: 1382
Joined: Mon Jul 26, 2010 18:47
Location: Czech Republic
Contact:

Re: subscribeEvent makes application crash at startup

Postby Kulik » Sat Feb 12, 2011 18:25

Header, Lib, DLL mismatch I think. Make sure you are using all the correct files.

Sniper Binaire
Just popping in
Just popping in
Posts: 7
Joined: Sat Feb 12, 2011 14:29

Re: subscribeEvent makes application crash at startup

Postby Sniper Binaire » Sun Feb 13, 2011 10:10

Fixed !
It was effectively an header mismatch
recompiling withs updated headers make it works

And for the blinking windows phenomenon ? Is there a known solution ?

User avatar
Kulik
CEGUI Team
Posts: 1382
Joined: Mon Jul 26, 2010 18:47
Location: Czech Republic
Contact:

Re: subscribeEvent makes application crash at startup

Postby Kulik » Sun Feb 13, 2011 14:09

I have never seen CEGUI windows blinking when moving them. Could you post your hardware? It could also be your Ogre code around CEGUI.

Try turning AutoRenderingSurface off for one of the FrameWindows and see if it will still blink. Could be RTT related problem.

Sniper Binaire
Just popping in
Just popping in
Posts: 7
Joined: Sat Feb 12, 2011 14:29

Re: subscribeEvent makes application crash at startup

Postby Sniper Binaire » Sun Feb 13, 2011 14:33

I am under Windows Xp Sp3
Running a recent DirectX 9
I have the dot net framework V3.5
MSVC9
ATI Radeon 6850
Phenom X3 445
RAM : 3Go

What do you mean precisely by ogre code ?

User avatar
Kulik
CEGUI Team
Posts: 1382
Joined: Mon Jul 26, 2010 18:47
Location: Czech Republic
Contact:

Re: subscribeEvent makes application crash at startup

Postby Kulik » Sun Feb 13, 2011 14:59

You seem to be running decent hardware, I would try turning AutoRenderingSurface off to get more info. Perhaps it will stop blinking. Check OpenGL and DX9 renderers, in OpenGL, check what RTT method you are using.


Return to “Help”

Who is online

Users browsing this forum: No registered users and 8 guests