Access violation while stepping the simulation - Ogre3D
Posted: Mon Aug 11, 2014 6:48 pm
Hello! I am working with Bullet 2.83 and Ogre3D v1.9. I have been following a guide for my project. Most of the code that you should look at are in:
[/url]
I receive an access violation. I have used Visual Studio to track down a more specific area. The function "updateSingleAabb" is called sometime during the stepSimulation. The actual crash occurs with this line:
I read a forum post of a similar issue, but the poster didn't elaborate on the solution. Regardless, I attempted to fix it myself by having a vector of btRigidBodies to call upon, but alas, no dice.
The word for word error is:
and my callstack is as follows:
Any help would be greatly appreciated.
Cheers,
Jacob
Upon runtime, and calling "stepSimulation", as seen inphysics.h
physics.cpp
graphics.cpp in createScene() where I call my "addCubeBody()" and "addRigidBody()" methods
Code: Select all
dynamicsWorld->stepSimulation(btScalar(1.)/btScalar(60.), btScalar(1.)/btScalar(60.)); //60fps
I receive an access violation. I have used Visual Studio to track down a more specific area. The function "updateSingleAabb" is called sometime during the stepSimulation. The actual crash occurs with this line:
Code: Select all
colObj->getCollisionShape()->getAabb(colObj->getWorldTransform(), minAabb,maxAabb);
The word for word error is:
Code: Select all
Unhandled exception at 0x00E8BFAC in Universe.exe: 0xC0000005: Access violation reading location 0xFDFDFDFD.
Code: Select all
> Universe.exe!btCollisionWorld::updateSingleAabb(btCollisionObject * colObj) Line 150 C++
Universe.exe!btCollisionWorld::updateAabbs() Line 204 C++
Universe.exe!btCollisionWorld::performDiscreteCollisionDetection() Line 220 C++
Universe.exe!btDiscreteDynamicsWorld::internalSingleStepSimulation(float timeStep) Line 492 C++
Universe.exe!btDiscreteDynamicsWorld::stepSimulation(float timeStep, int maxSubSteps, float fixedTimeStep) Line 452 C++
Universe.exe!Physics::Prop::frameStarted(const Ogre::FrameEvent & evt) Line 142 C++
Universe.exe!FrameListener::frameStarted(const Ogre::FrameEvent & evt) Line 243 C++
OgreMain_d.dll!10613c97() Unknown
[Frames below may be incorrect and/or missing, no symbols loaded for OgreMain_d.dll]
OgreMain_d.dll!10614047() Unknown
OgreMain_d.dll!106120d6() Unknown
Universe.exe!Video::Render() Line 231 C++
Universe.exe!sf::priv::ThreadMemberFunc<Video>::run() Line 58 C++
Universe.exe!sf::Thread::run(void) Unknown
Universe.exe!sf::priv::ThreadImpl::entryPoint(void *) Unknown
msvcr110d.dll!_callthreadstartex() Line 354 C
msvcr110d.dll!_threadstartex(void * ptd) Line 337 C
kernel32.dll!7562338a() Unknown
ntdll.dll!___RtlUserThreadStart@8() Unknown
ntdll.dll!__RtlUserThreadStart@8() Unknown
Cheers,
Jacob