KyleKatarn
17-08-2009 16:10:12
Hey. I've just completed Tutorial 7 on the NxOgre portal, and when I compile, it compiles and runs fine, but when I get into the program, Visual Studio throws me a warning box saying:
If I click break it pops up with:
While clicking on Continue twice (the same message as the first pops up again), I get:
This is baffling me, because I've never had this happen before, and all the previous tutorials compiled and worked fine.
Here's the source code:
And here's what I get in the output Window:
Please help me =\
Thanks a bunch, in advance
~Kyle
Edit
I probably should let you know what my setup is:
Im using Visual Studio 2008, with Ogre 1.6.3 (Shoggoth), with PhysX SDK 2.8.1 and NxOgre BloodyMess 1.5.5
Windows has triggered a breakpoint in the BloodyMessTutorial6.exe
This may be due to a corruption of the heap, which indicates a bug in
BloodyMessTutorial6.exe or any of the DLLs it has loaded.
This may also be due to the user pressing F12 while BloodyMessTutorial6.exe has
focus.
The output window may have more diagnostic information.
[Break] [Continue] [Ignore]
If I click break it pops up with:
There is no source code available for this current location.
[OK] [Show Disassembly]
While clicking on Continue twice (the same message as the first pops up again), I get:
Unhandled exception at 0x0030fdf5 (NxOgre.dll) in BloodyMessTutorial6.exe:
0xC0000005: Access violation reading location 0x00000000
[Break] [Continue]
This is baffling me, because I've never had this happen before, and all the previous tutorials compiled and worked fine.
Here's the source code:
#include "ExampleApplication.h"
#include <NxOgre.h>
#include <NxOgreOGRE3D.h>
class BloodyMessTutorial6Listener : public ExampleFrameListener
{
public:
BloodyMessTutorial6Listener(RenderWindow *win, Camera *cam)
: ExampleFrameListener(win, cam)
{
mTimeController = NxOgre::TimeController::getSingleton();
}
bool frameStarted(const FrameEvent& evt)
{
mTimeController->advance(evt.timeSinceLastFrame);
return ExampleFrameListener::frameStarted(evt);
}
protected:
NxOgre::TimeController* mTimeController;
};
class BloodyMessTutorial6 : public ExampleApplication
{
protected:
NxOgre::World* mWorld;
NxOgre::Scene* mScene;
NxOgre::TimeController* mTimeController;
OGRE3DRenderSystem* mRenderSystem;
void createScene()
{
// Set ambient light
mSceneMgr->setAmbientLight(ColourValue(0.5f, 0.5f, 0.5f));
// Create a light
Light* l = mSceneMgr->createLight("MainLight");
l->setPosition(20, 80, 50);
// Position the camera
mCamera->setPosition(0, 20, 80);
mCamera->lookAt(0, 20, 0);
// Create the world
mWorld = NxOgre::World::createWorld();
// Create scene description
NxOgre::SceneDescription sceneDesc;
sceneDesc.mGravity = NxOgre::Real3(0, -9.8f, 0);
sceneDesc.mName = "DemoScene";
// Create scene
mScene = mWorld->createScene(sceneDesc);
// Set some physical scene values
mScene->getMaterial(0)->setStaticFriction(0.5);
mScene->getMaterial(0)->setDynamicFriction(0.5);
mScene->getMaterial(0)->setRestitution(0.1);
// Create render system
mRenderSystem = new OGRE3DRenderSystem(mScene);
//Create time controller
mTimeController = NxOgre::TimeController::getSingleton();
// Create floor plane (BloodyMess)
mScene->createSceneGeometry(new NxOgre::PlaneGeometry(0, NxOgre::Real3(0, 1, 0)), NxOgre::Matrix44( Matrix44_Identity));
// Create floor plane (Ogre)
MovablePlane *plane = new MovablePlane("Plane");
plane->d = 0;
plane->normal = Vector3::UNIT_Y;
Ogre::MeshManager::getSingleton().createPlane("PlaneMesh",
ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME,
*plane, 120, 120, 1, 1, true, 1, 3, 3, Vector3::UNIT_Z);
Entity *planeEnt = mSceneMgr->createEntity("PlaneEntity", "PlaneMesh");
planeEnt->setMaterialName("PlaneMat");
Ogre::SceneNode* mPlaneNode = mSceneMgr->getRootSceneNode()->createChildSceneNode();
mPlaneNode->attachObject(planeEnt);
// open and load meshes from the ResourceSystem
NxOgre::ResourceSystem::getSingleton()->openArchive( "media", "file:media/physics/models" );
NxOgre::Mesh* pConvexMesh = NxOgre::MeshManager::getSingleton()->load( "media:barrelnewt.nxs" );
NxOgre::Mesh* pTriangleMesh = NxOgre::MeshManager::getSingleton()->load( "media:ramp.nxs" );
// create the convex and triangle geometry
NxOgre::Convex* pConvex = new NxOgre::Convex( pConvexMesh );
NxOgre::TriangleGeometry* pTriangleGeometry = new NxOgre::TriangleGeometry( pTriangleMesh );
// create the OGRE3D Body with the convex as its shape
OGRE3DBody* pConvexBody = mRenderSystem->createBody( pConvex, NxOgre::Real3( 0, 30, 0 ), "barrelnewt.mesh" );
pConvexBody->setGlobalOrientation( NxOgre::Matrix33( NxOgre::Real4( 0, 45, 0, 45 )));
mScene->createSceneGeometry( pTriangleGeometry, NxOgre::Matrix44( NxOgre::Real3( 0, 5, 0 )));
Ogre::Entity* pTriangleEntity = mSceneMgr->createEntity( "triangleEntity", "ramp.mesh" );
Ogre::SceneNode* pTriangleNode = mSceneMgr->getRootSceneNode()->createChildSceneNode();
pTriangleNode->attachObject( pTriangleEntity );
pTriangleNode->setPosition( Vector3( 0, 5, 0 ));
}
// Create a new frame listener
void createFrameListener()
{
mFrameListener = new BloodyMessTutorial6Listener(mWindow, mCamera);
mRoot->addFrameListener(mFrameListener);
}
};
#if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
#define WIN32_LEAN_AND_MEAN
#include "windows.h"
#endif
#ifdef __cplusplus
extern "C" {
#endif
#if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
INT WINAPI WinMain(HINSTANCE hInst, HINSTANCE, LPSTR strCmdLine, INT)
#else
int main(int argc, char **argv)
#endif
{
// Create application object
BloodyMessTutorial6 app;
try {
app.go();
} catch(Exception& e) {
#if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
MessageBoxA(NULL, e.getFullDescription().c_str(),
"An exception has occurred!", MB_OK | MB_ICONERROR | MB_TASKMODAL);
#else
std::cerr << "An exception has occurred: " << e.getFullDescription();
#endif
}
return 0;
}
#ifdef __cplusplus
}
#endif
And here's what I get in the output Window:
'BloodyMessTutorial6.exe': Loaded 'C:\CPP-Y2\Code\Visual Studio 2008\Ogre\BloodyMessTutorial6\BloodyMessTutorial6\bin\Release\BloodyMessTutorial6.exe', Binary was not built with debug information.
'BloodyMessTutorial6.exe': Loaded 'C:\Windows\SysWOW64\ntdll.dll'
'BloodyMessTutorial6.exe': Loaded 'C:\Windows\SysWOW64\kernel32.dll'
'BloodyMessTutorial6.exe': Loaded 'C:\Windows\SysWOW64\KernelBase.dll'
'BloodyMessTutorial6.exe': Loaded 'C:\CPP-Y2\Code\Visual Studio 2008\Ogre\BloodyMessTutorial6\BloodyMessTutorial6\bin\Release\OgreMain.dll'
'BloodyMessTutorial6.exe': Loaded 'C:\Windows\SysWOW64\user32.dll'
'BloodyMessTutorial6.exe': Loaded 'C:\Windows\SysWOW64\gdi32.dll'
'BloodyMessTutorial6.exe': Loaded 'C:\Windows\SysWOW64\lpk.dll'
'BloodyMessTutorial6.exe': Loaded 'C:\Windows\SysWOW64\usp10.dll'
'BloodyMessTutorial6.exe': Loaded 'C:\Windows\SysWOW64\msvcrt.dll'
'BloodyMessTutorial6.exe': Loaded 'C:\Windows\SysWOW64\advapi32.dll'
'BloodyMessTutorial6.exe': Loaded 'C:\Windows\SysWOW64\sechost.dll'
'BloodyMessTutorial6.exe': Loaded 'C:\Windows\SysWOW64\rpcrt4.dll'
'BloodyMessTutorial6.exe': Loaded 'C:\Windows\SysWOW64\sspicli.dll'
'BloodyMessTutorial6.exe': Loaded 'C:\Windows\SysWOW64\cryptbase.dll'
'BloodyMessTutorial6.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.4918_none_508da958bcbd2845\msvcp90.dll'
'BloodyMessTutorial6.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.4918_none_508da958bcbd2845\msvcr90.dll'
'BloodyMessTutorial6.exe': Loaded 'C:\CPP-Y2\Code\Visual Studio 2008\Ogre\BloodyMessTutorial6\BloodyMessTutorial6\bin\Release\OIS.dll'
'BloodyMessTutorial6.exe': Loaded 'C:\Windows\SysWOW64\dinput8.dll'
'BloodyMessTutorial6.exe': Loaded 'C:\CPP-Y2\Libraries\bin\NxOgre.dll', Symbols loaded.
'BloodyMessTutorial6.exe': Loaded 'C:\Windows\SysWOW64\PhysXLoader.dll'
'BloodyMessTutorial6.exe': Loaded 'C:\Windows\SysWOW64\IPHLPAPI.DLL'
'BloodyMessTutorial6.exe': Loaded 'C:\Windows\SysWOW64\nsi.dll'
'BloodyMessTutorial6.exe': Loaded 'C:\Windows\SysWOW64\winnsi.dll'
'BloodyMessTutorial6.exe': Loaded 'C:\Windows\SysWOW64\imm32.dll'
'BloodyMessTutorial6.exe': Loaded 'C:\Windows\SysWOW64\msctf.dll'
'BloodyMessTutorial6.exe': Loaded 'C:\CPP-Y2\Code\Visual Studio 2008\Ogre\BloodyMessTutorial6\BloodyMessTutorial6\bin\Release\RenderSystem_Direct3D9.dll'
'BloodyMessTutorial6.exe': Loaded 'C:\Windows\SysWOW64\d3d9.dll'
'BloodyMessTutorial6.exe': Loaded 'C:\Windows\SysWOW64\version.dll'
'BloodyMessTutorial6.exe': Loaded 'C:\Windows\SysWOW64\d3d8thk.dll'
'BloodyMessTutorial6.exe': Loaded 'C:\Windows\SysWOW64\dwmapi.dll'
'BloodyMessTutorial6.exe': Loaded 'C:\Windows\SysWOW64\D3DX9_38.dll'
'BloodyMessTutorial6.exe': Loaded 'C:\Windows\SysWOW64\uxtheme.dll'
'BloodyMessTutorial6.exe': Loaded 'C:\Windows\SysWOW64\nvd3dum.dll'
'BloodyMessTutorial6.exe': Loaded 'C:\CPP-Y2\Code\Visual Studio 2008\Ogre\BloodyMessTutorial6\BloodyMessTutorial6\bin\Release\RenderSystem_GL.dll', Binary was not built with debug information.
'BloodyMessTutorial6.exe': Loaded 'C:\Windows\SysWOW64\opengl32.dll'
'BloodyMessTutorial6.exe': Loaded 'C:\Windows\SysWOW64\glu32.dll'
'BloodyMessTutorial6.exe': Loaded 'C:\Windows\SysWOW64\ddraw.dll'
'BloodyMessTutorial6.exe': Loaded 'C:\Windows\SysWOW64\dciman32.dll'
'BloodyMessTutorial6.exe': Loaded 'C:\Windows\SysWOW64\setupapi.dll'
'BloodyMessTutorial6.exe': Loaded 'C:\Windows\SysWOW64\cfgmgr32.dll'
'BloodyMessTutorial6.exe': Loaded 'C:\Windows\SysWOW64\oleaut32.dll'
'BloodyMessTutorial6.exe': Loaded 'C:\Windows\SysWOW64\ole32.dll'
'BloodyMessTutorial6.exe': Loaded 'C:\Windows\SysWOW64\devobj.dll'
'BloodyMessTutorial6.exe': Loaded 'C:\Windows\SysWOW64\nvoglv32.dll'
The thread 'Win32 Thread' (0xce0) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0xc38) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0xf74) has exited with code 0 (0x0).
'BloodyMessTutorial6.exe': Loaded 'C:\CPP-Y2\Code\Visual Studio 2008\Ogre\BloodyMessTutorial6\BloodyMessTutorial6\bin\Release\Plugin_ParticleFX.dll', Binary was not built with debug information.
'BloodyMessTutorial6.exe': Loaded 'C:\CPP-Y2\Code\Visual Studio 2008\Ogre\BloodyMessTutorial6\BloodyMessTutorial6\bin\Release\Plugin_BSPSceneManager.dll'
'BloodyMessTutorial6.exe': Loaded 'C:\CPP-Y2\Code\Visual Studio 2008\Ogre\BloodyMessTutorial6\BloodyMessTutorial6\bin\Release\Plugin_CgProgramManager.dll'
'BloodyMessTutorial6.exe': Loaded 'C:\CPP-Y2\Code\Visual Studio 2008\Ogre\BloodyMessTutorial6\BloodyMessTutorial6\bin\Release\cg.dll', Binary was not built with debug information.
'BloodyMessTutorial6.exe': Loaded 'C:\CPP-Y2\Code\Visual Studio 2008\Ogre\BloodyMessTutorial6\BloodyMessTutorial6\bin\Release\Plugin_PCZSceneManager.dll', Binary was not built with debug information.
'BloodyMessTutorial6.exe': Loaded 'C:\CPP-Y2\Code\Visual Studio 2008\Ogre\BloodyMessTutorial6\BloodyMessTutorial6\bin\Release\Plugin_OctreeZone.dll', Binary was not built with debug information.
'BloodyMessTutorial6.exe': Loaded 'C:\CPP-Y2\Code\Visual Studio 2008\Ogre\BloodyMessTutorial6\BloodyMessTutorial6\bin\Release\Plugin_OctreeSceneManager.dll'
'BloodyMessTutorial6.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.7100.19_none_b6a32c7c247ee542\comctl32.dll'
'BloodyMessTutorial6.exe': Loaded 'C:\Windows\SysWOW64\shlwapi.dll'
'BloodyMessTutorial6.exe': Loaded 'C:\Windows\SysWOW64\clbcatq.dll'
'BloodyMessTutorial6.exe': Loaded 'C:\Windows\SysWOW64\powrprof.dll'
First-chance exception at 0x776b98f6 in BloodyMessTutorial6.exe: Microsoft C++ exception: Ogre::InvalidParametersException at memory location 0x0015f564..
First-chance exception at 0x776b98f6 in BloodyMessTutorial6.exe: Microsoft C++ exception: Ogre::InvalidParametersException at memory location 0x0015f564..
First-chance exception at 0x776b98f6 in BloodyMessTutorial6.exe: Microsoft C++ exception: Ogre::InternalErrorException at memory location 0x0015d5b0..
First-chance exception at 0x776b98f6 in BloodyMessTutorial6.exe: Microsoft C++ exception: Ogre::InternalErrorException at memory location 0x0015d5b0..
First-chance exception at 0x776b98f6 in BloodyMessTutorial6.exe: Microsoft C++ exception: Ogre::InternalErrorException at memory location 0x0015d5b0..
'BloodyMessTutorial6.exe': Loaded 'C:\Windows\SysWOW64\dhcpcsvc.dll'
'BloodyMessTutorial6.exe': Loaded 'C:\Windows\SysWOW64\ws2_32.dll'
'BloodyMessTutorial6.exe': Loaded 'C:\Program Files (x86)\AGEIA Technologies\v2.8.1\PhysXCooking.dll'
'BloodyMessTutorial6.exe': Loaded 'C:\Windows\SysWOW64\wsock32.dll'
'BloodyMessTutorial6.exe': Loaded 'C:\Program Files (x86)\AGEIA Technologies\v2.8.1\PhysXCore.dll'
'BloodyMessTutorial6.exe': Loaded 'C:\Windows\SysWOW64\physxcudart_20.dll', Binary was not built with debug information.
'BloodyMessTutorial6.exe': Loaded 'C:\Windows\SysWOW64\PhysXDevice.dll', Binary was not built with debug information.
'BloodyMessTutorial6.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.4918_none_d089094c442eb5ff\msvcr80.dll'
'BloodyMessTutorial6.exe': Loaded 'C:\Windows\SysWOW64\nvcuda.dll', Binary was not built with debug information.
'BloodyMessTutorial6.exe': Loaded 'C:\Windows\SysWOW64\nvapi.dll'
'BloodyMessTutorial6.exe': Loaded 'C:\Windows\SysWOW64\shell32.dll'
'BloodyMessTutorial6.exe': Unloaded 'C:\Windows\SysWOW64\PhysXDevice.dll'
'BloodyMessTutorial6.exe': Unloaded 'C:\Windows\winsxs\x86_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.4918_none_d089094c442eb5ff\msvcr80.dll'
'BloodyMessTutorial6.exe': Loaded 'C:\Windows\SysWOW64\PhysXDevice.dll', Binary was not built with debug information.
'BloodyMessTutorial6.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.4918_none_d089094c442eb5ff\msvcr80.dll'
'BloodyMessTutorial6.exe': Unloaded 'C:\Windows\SysWOW64\PhysXDevice.dll'
'BloodyMessTutorial6.exe': Unloaded 'C:\Windows\winsxs\x86_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.4918_none_d089094c442eb5ff\msvcr80.dll'
'BloodyMessTutorial6.exe': Loaded 'C:\Windows\SysWOW64\PhysXDevice.dll', Binary was not built with debug information.
'BloodyMessTutorial6.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.4918_none_d089094c442eb5ff\msvcr80.dll'
'BloodyMessTutorial6.exe': Unloaded 'C:\Windows\SysWOW64\PhysXDevice.dll'
'BloodyMessTutorial6.exe': Unloaded 'C:\Windows\winsxs\x86_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.4918_none_d089094c442eb5ff\msvcr80.dll'
HEAP[BloodyMessTutorial6.exe]: Heap block at 00978438 modified at 00978469 past requested size of 29
Windows has triggered a breakpoint in BloodyMessTutorial6.exe.
This may be due to a corruption of the heap, which indicates a bug in BloodyMessTutorial6.exe or any of the DLLs it has loaded.
This may also be due to the user pressing F12 while BloodyMessTutorial6.exe has focus.
The output window may have more diagnostic information.
HEAP[BloodyMessTutorial6.exe]: Invalid address specified to RtlFreeHeap( 00970000, 00978440 )
Windows has triggered a breakpoint in BloodyMessTutorial6.exe.
This may be due to a corruption of the heap, which indicates a bug in BloodyMessTutorial6.exe or any of the DLLs it has loaded.
This may also be due to the user pressing F12 while BloodyMessTutorial6.exe has focus.
The output window may have more diagnostic information.
First-chance exception at 0x0030fdf5 (NxOgre.dll) in BloodyMessTutorial6.exe: 0xC0000005: Access violation reading location 0x00000000.
Unhandled exception at 0x0030fdf5 (NxOgre.dll) in BloodyMessTutorial6.exe: 0xC0000005: Access violation reading location 0x00000000.
First-chance exception at 0x0030fdf5 (NxOgre.dll) in BloodyMessTutorial6.exe: 0xC0000005: Access violation reading location 0x00000000.
Unhandled exception at 0x0030fdf5 (NxOgre.dll) in BloodyMessTutorial6.exe: 0xC0000005: Access violation reading location 0x00000000.
First-chance exception at 0x0030fdf5 (NxOgre.dll) in BloodyMessTutorial6.exe: 0xC0000005: Access violation reading location 0x00000000.
Unhandled exception at 0x0030fdf5 (NxOgre.dll) in BloodyMessTutorial6.exe: 0xC0000005: Access violation reading location 0x00000000.
First-chance exception at 0x0030fdf5 (NxOgre.dll) in BloodyMessTutorial6.exe: 0xC0000005: Access violation reading location 0x00000000.
Unhandled exception at 0x0030fdf5 (NxOgre.dll) in BloodyMessTutorial6.exe: 0xC0000005: Access violation reading location 0x00000000.
The program '[4016] BloodyMessTutorial6.exe: Native' has exited with code -1073741819 (0xc0000005).
Please help me =\
Thanks a bunch, in advance
~Kyle
Edit
I probably should let you know what my setup is:
Im using Visual Studio 2008, with Ogre 1.6.3 (Shoggoth), with PhysX SDK 2.8.1 and NxOgre BloodyMess 1.5.5