Problem with Character Controller

ihar3d
Posts: 25
Joined: Wed Jan 23, 2008 11:28 am

Problem with Character Controller

Post by ihar3d »

Hi. I have just tested of Character Controller and got "Unhandled exception at 0x004cc045 in DebugCharacterDemo.exe: 0xC0000005: Access violation reading location 0x00000004." after placing lines with addition of ghost object and character to world after initializing of BSP level - test file is in attachment. Any ideas how to fix this? Thanks!
You do not have the required permissions to view the files attached to this post.
mickey
Posts: 107
Joined: Fri Sep 19, 2008 6:08 pm

Re: Problem with Character Controller

Post by mickey »

Yes its strange, can you try adding the ground shape after adding the character to the dynamics world? This should fix it.
ihar3d
Posts: 25
Joined: Wed Jan 23, 2008 11:28 am

Re: Problem with Character Controller

Post by ihar3d »

works ok in this case, but it is imposible to add new controller after initializing\adding other objects, and it's strongly necessary to be able manage controllers during game.
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Re: Problem with Character Controller

Post by Erwin Coumans »

We will look into it this week, check progress here.

Can you provide a callstack at the time of crash, and also provide a zipped .cpp file (instead of patch)?

Thanks for the feedback,
Erwin
ihar3d
Posts: 25
Joined: Wed Jan 23, 2008 11:28 am

Re: Problem with Character Controller

Post by ihar3d »

Erwin, thanks for the quick answer! Please find modified demo's code is in attachment.

and call stack:

> DebugCharacterDemo.exe!btHashedOverlappingPairCache::needsBroadphaseCollision(btBroadphaseProxy * proxy0=0x00000000, btBroadphaseProxy * proxy1=0x02831b10) Line 111 + 0x3 bytes C++
DebugCharacterDemo.exe!btHashedOverlappingPairCache::addOverlappingPair(btBroadphaseProxy * proxy0=0x00000000, btBroadphaseProxy * proxy1=0x02831b10) Line 123 + 0x10 bytes C++
DebugCharacterDemo.exe!btPairCachingGhostObject::addOverlappingObject(btBroadphaseProxy * otherProxy=0x02831b10) Line 77 C++
DebugCharacterDemo.exe!btGhostPairCallback::addOverlappingPair(btBroadphaseProxy * proxy0=0x02831b10, btBroadphaseProxy * proxy1=0x02832050) Line 145 C++
DebugCharacterDemo.exe!btHashedOverlappingPairCache::internalAddPair(btBroadphaseProxy * proxy0=0x02831b10, btBroadphaseProxy * proxy1=0x02832050) Line 246 C++
DebugCharacterDemo.exe!btHashedOverlappingPairCache::addOverlappingPair(btBroadphaseProxy * proxy0=0x02832050, btBroadphaseProxy * proxy1=0x02831b10) Line 127 C++
DebugCharacterDemo.exe!btAxisSweep3Internal<unsigned short>::sortMinDown(int axis=2, unsigned short edge=255, btDispatcher * __formal=0x024600c0, bool updateOverlaps=true) Line 801 C++
DebugCharacterDemo.exe!btAxisSweep3Internal<unsigned short>::addHandle(const btVector3 & aabbMin={...}, const btVector3 & aabbMax={...}, void * pOwner=0x02534430, short collisionFilterGroup=32, short collisionFilterMask=3, btDispatcher * dispatcher=0x024600c0, void * multiSapProxy=0x00000000) Line 525 C++
DebugCharacterDemo.exe!btAxisSweep3Internal<unsigned short>::createProxy(const btVector3 & aabbMin={...}, const btVector3 & aabbMax={...}, int shapeType=10, void * userPtr=0x02534430, short collisionFilterGroup=32, short collisionFilterMask=3, btDispatcher * dispatcher=0x024600c0, void * multiSapProxy=0x00000000) Line 231 + 0x26 bytes C++
DebugCharacterDemo.exe!btCollisionWorld::addCollisionObject(btCollisionObject * collisionObject=, short collisionFilterGroup=, short collisionFilterMask=) Line 111 + 0x44 bytes C++
DebugCharacterDemo.exe!CharacterDemo::initPhysics() Line 142 C++
You do not have the required permissions to view the files attached to this post.
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Re: Problem with Character Controller

Post by Erwin Coumans »

It has been fixed in the latest trunk:
http://code.google.com/p/bullet/source/detail?r=1527

Thanks again for the report,
Erwin
ihar3d
Posts: 25
Joined: Wed Jan 23, 2008 11:28 am

Re: Problem with Character Controller [SOLVED]

Post by ihar3d »

Erwin, thanks a lot for the bugfix!!!