Application Crash

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

rtr_18
Not too shy to talk
Not too shy to talk
Posts: 21
Joined: Mon Aug 25, 2008 10:02

Application Crash

Postby rtr_18 » Thu Jun 17, 2010 14:54

Hi!
This is my first Program in CEGUI. My application crashes both in debug and release modes.Here is the code:

Code: Select all


#include "irrlicht.h"
#include "CEGUI.h"
#include "CEGUIIrrlichtRenderer.h"
#include "CEGUIWindowManager.h"

using namespace CEGUI;
using namespace irr;
using namespace core;
using namespace scene;
using namespace video;
using namespace io;

int main ()
{
 IrrlichtDevice* device = createDevice(EDT_BURNINGSVIDEO, core::dimension2d<u32>(800, 600), 16, false);
 CEGUI::IrrlichtRenderer &myRenderer = CEGUI::IrrlichtRenderer::bootstrapSystem(*device);
 IVideoDriver* driver = device->getVideoDriver();
 driver->beginScene(true, true, SColor(255, 255, 0, 0));
 ISceneManager* smgr = device->getSceneManager();
 WindowManager* wmgr = WindowManager::getSingletonPtr();
 Window* myRoot = wmgr->createWindow(CEGUI::String("Default Window"), CEGUI::String("root"));
 System::getSingleton().setGUISheet(myRoot);
 FrameWindow* fWnd = (FrameWindow*)wmgr->createWindow("TaharezLook/FrameWindow", "testWindow");
 myRoot->addChildWindow(fWnd);
 while(device->run() && driver)
 {
  if(device->isWindowActive())
  {
  smgr->drawAll();
  CEGUI::System::getSingleton().renderGUI();
  driver->endScene();
  }
 }
 device->drop();
 return 0;
}


I got the following Exception:

Unhandled exception at 0x76aafbae in CricketGUI.exe: Microsoft C++ exception: CEGUI::GenericException at memory location 0x0015dbdc..

When I break the exception, program control goes to CEGUIDynamicModule.cpp file. What to do to run my application?

agamemnus
Just can't stay away
Just can't stay away
Posts: 185
Joined: Sun Mar 14, 2010 04:21

Re: Application Crash

Postby agamemnus » Sun Jun 20, 2010 18:53

Try compiling the source. Make sure to read this:

http://www.cegui.org.uk/wiki/index.php/ ... r_Irrlicht

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

Re: Application Crash

Postby CrazyEddie » Mon Jun 21, 2010 09:21

One thing what will appear when I get back from a short sabbatical is a new, updated and more useful FAQ.

I will just say, learn to program properly. In the face of C++ exceptions, you should be catching the exception and where provision is available, outputting any message that the exception might contain. In this case it will tell you exactly what the issue is.

Alternatively, you could have searched the forum.

CE.


Return to “Help”

Who is online

Users browsing this forum: No registered users and 19 guests