本文介绍了致命的信号11(andengine项目)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要创建和Android游戏,由andengine框架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?

你有什么感想?
谢谢,
socksocket

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(andengine项目)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-30 01:37