致命信号11(和引擎项目) [英] Fatal signal 11 (andengine project)
问题描述
我正在创建和由 andengine 框架提供支持的 android 游戏 box2d 扩展
我收到了致命信号 11",它似乎无处不在(我猜你可以随意调用它)
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)
我的猜测是:
1) 我正在使用 TimerTask 类创建游戏实体
2)也许它与并发有关?
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
推荐答案
您仍然可以使用 TimerTask,您只需要确保在 AndEngine 更新线程上调用与 AndEngine 相关的任何内容(创建或删除精灵等) -你可以使用
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
}
});
这篇关于致命信号11(和引擎项目)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!