什么是Android Logcat中的致命信号6 [英] What is fatal signal 6 in android logcat
问题描述
我是android开发的新手 当我从活动中切换11次后,我的应用程序就被不断杀死,而且它只会说
Im new to android development my app gets constantly killed when switching 11 times from activity and than it only says
致命信号6(SIGABRT),在tid 9485(Thread-141585)中的代码-6
Fatal signal 6 (SIGABRT), code -6 in tid 9485 (Thread-141585)
在我的logcat中.
in my logcat.
这是什么意思?
推荐答案
没有更多详细信息(例如查看一些代码).
Without more details (like seeing some code).
1)不要阻塞UI线程,因为操作系统将杀死无响应的应用程序,因此可能会导致SIGABRT
.
1) Do not block the UI thread, this can cause a SIGABRT
as the OS will kill a non-responsive app.
当我切换11次时,每次活动都会绑定和取消绑定,这会使我的应用程序崩溃
bind and unbind on every activity when i switch for like 11 times it crashes my app
2)确保在Activity
中的OnDestroy
中您正在清理自己.即删除所有Listeners
/Events
,然后调用Base.OnDestory
.
2) Make sure that in your OnDestroy
within your Activity
you are cleaning up after yourself. i.e. Removing all your Listeners
/Events
and then calling the Base.OnDestory
.
3)外部(即BluetoothLeService
)服务使用侦听器回调到您的应用中,而现在的null/nil会导致挂起,从而导致挂起SIGABRT
,请参阅#2
3) An external (i.e. BluetoothLeService
) service calling back into your app with listeners that now null/nil will cause hangs and thus a SIGABRT
, see #2
这篇关于什么是Android Logcat中的致命信号6的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!