Fatal signal 11 (andengine project)

风格不统一 提交于 2019-12-20 06:24:07

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!