favreau / bullet

Automatically exported from code.google.com/p/bullet
0 stars 0 forks source link

why btconvexshape.cpp crash in ios4.1 ogre1.8 iphonesdk4.2? #478

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
i have a app , use bullet ,mygui , ogrebullet . 
when i build the app on ogre1.7.1 for device ipod touch 3.1.3 and ipad 3.2.1 on 
iphonesdk4.0.1 , the app is runing good.
but when i build the app on ogre1.8 from trunk for device ipod 4.1 on 
iphonesdk4.2 , the app crash . 
i got a error of "GDB:Program receive signal:"SIGABRT". " 

the following is my exception stack. any suggestion or any hint to help me ?

the following is call stack 

#0   0x34a36ac8 in __kill
#1   0x34a36abe in kill
#2   0x34a36ab0 in raise
#3   0x34a4b040 in abort
#4   0x34a39142 in __assert_rtn
#5   0x008977e4 in convexHullSupport at btConvexShape.cpp:108
#6   0x00898b88 in btConvexShape::localGetSupportVertexWithoutMarginNonVirtual 
at btConvexShape.cpp:267
#7   0x008bcbbc in btGjkPairDetector::getClosestPointsNonVirtual at 
btGjkPairDetector.cpp:147
#8   0x008bdac0 in btGjkPairDetector::getClosestPoints at 
btGjkPairDetector.cpp:76
#9   0x008817a4 in btConvexConvexAlgorithm::processCollision at 
btConvexConvexAlgorithm.cpp:368
#10   0x0086b64c in btCollisionDispatcher::defaultNearCallback at 
btCollisionDispatcher.cpp:268
#11   0x0086c400 in btCollisionPairCallback::processOverlap at 
btCollisionDispatcher.cpp:224
#12   0x00858c70 in btHashedOverlappingPairCache::processAllOverlappingPairs at 
btOverlappingPairCache.cpp:387
#13   0x0086af08 in btCollisionDispatcher::dispatchAllCollisionPairs at 
btCollisionDispatcher.cpp:238
#14   0x0087378c in btCollisionWorld::performDiscreteCollisionDetection at 
btCollisionWorld.cpp:214
#15   0x008d6704 in btDiscreteDynamicsWorld::internalSingleStepSimulation at 
btDiscreteDynamicsWorld.cpp:318
#16   0x008d71f4 in btDiscreteDynamicsWorld::stepSimulation at 
btDiscreteDynamicsWorld.cpp:281
#17   0x008f8b48 in OgreBulletDynamics::DynamicsWorld::stepSimulation at 
OgreBulletDynamicsWorld.cpp:102
#18   0x0097da94 in XXX::BulletManager::frameStarted at 
XXXBulletManager.cpp:1036
#19   0x00097914 in XXX::Application::renderOneFrame at XXXXApplication.cpp:358
#20   0x0002ddcc in -[AppDelegate renderOneFrame:] at XXXMain.cpp:192
#21   0x33be84f8 in __NSFireTimer
#22   0x32e417fa in __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__
#23   0x32e412ac in __CFRunLoopDoTimer
#24   0x32e127a4 in __CFRunLoopRun
#25   0x32e12276 in CFRunLoopRunSpecific
#26   0x32e1217e in CFRunLoopRunInMode
#27   0x338b75f2 in GSEventRunModal
#28   0x338b769e in GSEventRun
#29   0x313cc122 in -[UIApplication _run]
#30   0x313ca12e in UIApplicationMain
#31   0x0002e17c in main at XXXXMain.cpp:59

Original issue reported on code.google.com by lin...@gmail.com on 27 Jan 2011 at 5:30

GoogleCodeExporter commented 9 years ago
crash when the main loop stepSimulation()

Original comment by lin...@gmail.com on 27 Jan 2011 at 5:51

GoogleCodeExporter commented 9 years ago
This happens when there are no points in the convex hull shape, or 
uninitialized data.

Can you double check your input, or attach a .bullet file to this topic?
See here how to create a .bullet file:
http://bulletphysics.org/mediawiki-1.5.8/index.php/Bullet_binary_serialization

Original comment by erwin.coumans on 27 Jan 2011 at 7:31

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
i had initilized data.
what no points in the convex hull shape means?

Original comment by lin...@gmail.com on 30 Jan 2011 at 1:43

Attachments:

GoogleCodeExporter commented 9 years ago
thanks for you reply. i had upload my bullet file. 

Original comment by lin...@gmail.com on 30 Jan 2011 at 1:44

GoogleCodeExporter commented 9 years ago
It means that there is an empty btConvexHullShape, that contains 0 
points/vertices.

Original comment by erwin.coumans on 3 Feb 2011 at 6:29

GoogleCodeExporter commented 9 years ago
but how to find this shape?

Original comment by lin...@gmail.com on 6 Feb 2011 at 12:10

GoogleCodeExporter commented 9 years ago
Can you add an assert in the btConvexHullShape.cpp, like this

btConvexHullShape ::btConvexHullShape (const btScalar* points,int numPoints,int 
stride) : btPolyhedralConvexAabbCachingShape ()
{
    btAssert(numPoints>0);

Then run your app in debug mode. You can also add the assert for numpoints>0 in 
your code.

Original comment by erwin.coumans on 21 Feb 2011 at 7:35

GoogleCodeExporter commented 9 years ago
Please discuss it in the forums, this is not a bug in the SDK but in user code.

Original comment by erwin.coumans on 27 Feb 2011 at 3:36