realXtend / tundra

realXtend Tundra SDK, a 3D virtual world application platform.
www.realxtend.org
Apache License 2.0
84 stars 70 forks source link

crash in EC_RigidBody::PhysicsCollision (in combination with scene manipulations from script?) #752

Closed antont closed 10 years ago

antont commented 10 years ago
#0  0x00007ffff381f02d in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#1  0x00007fffbe9fe89f in EC_RigidBody::PhysicsCollision (
    this=<optimized out>, _t1=0x2b4eb40, _t2=..., _t3=..., _t4=-1.25112152, 
    _t5=148.588165, _t6=true)
    at /home/playsign/src/fiware/naali/src/Core/PhysicsModule/moc_EC_RigidBody.cxx:298
#2  0x00007fffbe9f45d9 in EC_RigidBody::EmitPhysicsCollision (this=0x2efb250, 
    otherEntity=0x2b4eb40, position=..., normal=..., distance=-1.25112152, 
    impulse=148.588165, newCollision=true)
    at /home/playsign/src/fiware/naali/src/Core/PhysicsModule/EC_RigidBody.cpp:1051
#3  0x00007fffbe9e8fae in PhysicsWorld::ProcessPostTick (this=0x8bacf0, 
    substeptime=0.0166666675)
    at /home/playsign/src/fiware/naali/src/Core/PhysicsModule/PhysicsWorld.cpp:319
#4  0x00007fffbe9e936d in (anonymous namespace)::TickCallback (
    world=<optimized out>, timeStep=<optimized out>)
    at /home/playsign/src/fiware/naali/src/Core/PhysicsModule/PhysicsWorld.cpp:66
#5  0x00007fffbea23efb in btDiscreteDynamicsWorld::internalSingleStepSimulation
    (this=0x2aae0d0, timeStep=0.0166666675)
    at /home/playsign/src/fiware/naali-deps/build/bullet-2.81-rev2613/src/BulletDynamics/Dynamics/btDiscreteDynamicsWorld.cpp:512
#6  0x00007fffbea2400a in btDiscreteDynamicsWorld::stepSimulation (
    this=0x2aae0d0, timeStep=<optimized out>, maxSubSteps=<optimized out>, 
    fixedTimeStep=0.0166666675)
    at /home/playsign/src/fiware/naali-deps/build/bullet-2.81-rev2613/src/BulletDynamics/Dynamics/btDiscreteDynamicsWorld.cpp:448
#7  0x00007fffbe9e82b8 in PhysicsWorld::Simulate (this=0x8bacf0, 
    frametime=0.016640905000000001)
    at /home/playsign/src/fiware/naali/src/Core/PhysicsModule/PhysicsWorld.cpp:215
#8  0x00007fffbe9dfc04 in PhysicsModule::Update (this=0xa38f80, 
    frametime=0.016640905000000001)
    at /home/playsign/src/fiware/naali/src/Core/PhysicsModule/PhysicsModule.cpp:177
#9  0x00007ffff79f2a5d in Framework::ProcessOneFrame (this=0x7fffffffdf70)
    at /home/playsign/src/fiware/naali/src/Core/TundraCore/Framework/Framework.c
antont commented 10 years ago

this may be due to scene manipulations being done in a physics collision callback handler, we'll probably workaround now.

ah and that 'manipulations' involves deleting all objects first, so not too surprising :p

antont commented 10 years ago

ok i think this can be done here, i can try if have time soon .. but do feel free anyone -- just check if the first signal emit on bodyA resulted in removal of bodyB (just do getentity for it), or? worth a try it seems to me.

https://github.com/realXtend/tundra/blob/tundra2/src/Core/PhysicsModule/PhysicsWorld.cpp#L319

Stinkfist0 commented 10 years ago

@antont (et al.), please remember to edit the crash dumps prior posting (f.ex. simply use the markdown syntax for code/text) - they mess up the issue tracker by causing lots of references to ancient issues. I have fixed your OP for now.