Unhandled Exception

Anything and everything that's related to OGRE or the wider graphics field that doesn't fit into the other forums.
Post Reply
hari002244
Gnoblar
Posts: 4
Joined: Tue Jan 21, 2014 2:49 pm

Unhandled Exception

Post by hari002244 »

I am trying to create a window window without showing the configuration dialog. I created a windows with configuration window of ogre.

Code: Select all

#include<Ogre.h>

using namespace Ogre;

int main()
{
    Root *root= new Root("plugins_d.cfg","game.cfg","game.log");
    root->loadPlugin("/usr/local/lib/OGRE/RenderSystem_GL");      
    const RenderSystemList& rs = root->getAvailableRenderers();

                 RenderSystem * r=rs[0]; 
                 root->setRenderSystem(r); 

                 r->setConfigOption("Full Screen","No");  
                 r->setConfigOption("Video Mode","800 x 600 @ 32-bit colour"); 

    //root->showConfigDialog();
    //root->initialise(true, "Hello World!","");
                 RenderWindow *window = root->createRenderWindow("Hello",800,600,false);
    SceneManager *smgr = root->createSceneManager(ST_GENERIC, "SceneManager");
    Camera *cam = smgr->createCamera("MainCamera");
    Viewport *vp = window->addViewport(cam);
    vp->setBackgroundColour(ColourValue(0.3, 0.6, 0.9));
    root->startRendering();
    return 0;
}
Showing unhandled internal memory exception when trying to debug. It builds successfully.

The actual exception is:

Code: Select all

Unhandled exception at 0x7486277c in Tutorial.exe: Microsoft C++ exception: Ogre::InternalErrorException at memory location 0x0110f7bc..
Call stack:

Code: Select all

 	OgreMain_d.dll!0f7626b6() 	
 	[Frames below may be incorrect and/or missing, no symbols loaded for OgreMain_d.dll]	
>	Tutorial.exe!WinMain(HINSTANCE__ * hInst=0x01120000, HINSTANCE__ * __formal=0x00000000, char * strCmdLine=0x007922b0, HINSTANCE__ * __formal=0x00000000)  Line 10 + 0x30 bytes	C++
 	Tutorial.exe!__tmainCRTStartup()  Line 547 + 0x2c bytes	C
 	Tutorial.exe!WinMainCRTStartup()  Line 371	C
 	kernel32.dll!74c81866() 	
 	ntdll.dll!770668f1() 	
 	ntdll.dll!7706689d() 	
What wrong i did in this? I am a newbie to ogre...
Last edited by hari002244 on Tue Jan 21, 2014 3:40 pm, edited 1 time in total.
User avatar
c6burns
Beholder
Posts: 1512
Joined: Fri Feb 22, 2013 4:44 am
Location: Deep behind enemy lines
x 138

Re: Unhandled Exception

Post by c6burns »

No one is going to be able to look at two memory addresses and tell you where the crash in your program is. Run the program through the debugger and you will see where it is getting the exception.
hari002244
Gnoblar
Posts: 4
Joined: Tue Jan 21, 2014 2:49 pm

Re: Unhandled Exception

Post by hari002244 »

Is there any error in my program..I am using ogre 1.9...

What details needed to check where the error?
User avatar
tod
Troll
Posts: 1394
Joined: Wed Aug 02, 2006 9:41 am
Location: Bucharest
x 94
Contact:

Re: Unhandled Exception

Post by tod »

Check Ogre.log
hari002244
Gnoblar
Posts: 4
Joined: Tue Jan 21, 2014 2:49 pm

Re: Unhandled Exception

Post by hari002244 »

Thanks to all for helping me...Thanks to Tod and c6burns...I had checked my log and saw that rendersystem_gl not loaded...That was causing the exception...
Post Reply