Page 1 of 1

Application Crash

Posted: Thu Jun 17, 2010 14:54
by rtr_18
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?

Re: Application Crash

Posted: Sun Jun 20, 2010 18:53
by agamemnus
Try compiling the source. Make sure to read this:

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

Re: Application Crash

Posted: Mon Jun 21, 2010 09:21
by CrazyEddie
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.