问题
I'm creating and android game powered by andengine framework the box2d extension
I'm getting "Fatal Signal 11" which seems to happen out of nowhere (I guess you can call it randomly)
there no clues (at least, I don't aware to any clues to help me solve this problem)
my guesses are:
1) I'm creating game's entities using TimerTask class
2) maybe it has something to do with concurrency?
what do you think?
thanks,
socksocket
回答1:
You could still use a TimerTask, you just need to be sure to call anything relating to AndEngine (creating or deleting sprites, etc) on the AndEngine update thread - you can use
runOnUpdateThread(new Runnable() {
@Override
public void run() {
// TODO Auto-generated method stub
// do your stuff in here
}
});
回答2:
I had the same issue and fixed it by taking the TimerTask out of the equation.
回答3:
it says touchEvent...maybe you set your density value of your FixtureDef too high.... try to set the density value <=1000 like below:
FixtureDef wallFixtureDef = PhysicsFactory.createFixtureDef(1000, 0.0f, 1.0f);
Body mGoundBody=PhysicsFactory.createBoxBody(this.mPhysicsWorld, ground, BodyType.StaticBody, wallFixtureDef);
hope this information can help you...
来源:https://stackoverflow.com/questions/11614786/fatal-signal-11-andengine-project