When I try to destory the object in question in the onContact method I get the following error
#
# An unexpected error has been detected by HotSpot Virtual Machine:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x065c3863, pid=3880, tid=3080
#
# Java VM: Java HotSpot(TM) Client VM (1.5.0_01-b08 mixed mode, sharing)
# Problematic frame:
# C [odejava.dll+0x23863]
#
# An error report file with more information is saved as hs_err_pid3880.log
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
[error occurred during error reporting, step 120, id 0xc0000005]
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
J org.odejava.ode.OdeJNI.dWorldQuickStep(JF)V
J com.jmex.physics.PhysicsWorld.update(F)V
J com.meka.system.GameSystem.update(F)V
J com.meka.app.Game.update(F)V
J com.jme.app.FixedLogicrateGame.start()V
v ~OSRAdapter
j com.meka.app.Game.main([Ljava/lang/String;)V+14
v ~StubRoutines::call_stub
basically, I have a ton of bullets flying around. Each bullet has an onContact method that destroys the PhysicsObject and Geometry for that bullet upon collision with a ship node.. I can imagine how this might be a problem if you destroy the physicsObject in the onContact call since on return ODE probably assumes the object still exists?
Is this a known problem and what's a good work around?
I'm thinking have the ship physics object check to see if a bullet collided with it so the shipObject destorys the bullets rather than the bullets trying to destroy themselves.
EDIT
I tried moving the bullet destruction to the ship's onContact method but it I will get the crash. This is gonna be annoying. It only happens once in a while.