为什么NPE抛出整理活动是什么时候? [英] Why is NPE thrown when finishing Activity?

查看:214
本文介绍了为什么NPE抛出整理活动是什么时候?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个错误,已经快把我逼疯了好几天。不幸的是,我不能告诉你的code两个原因,我的老板不会AP preciate它和codeBase的太大分享。只要在活动结束时,会出现错误。天气这是因为我调用finish()或者因为操作系统会破坏它。

现在的问题是,什么是(或可能)原因execPendingActions()的FragmentManagerImpl抛出一个NPE在行1196。

下面是堆栈跟踪:

  FragmentManagerImpl.execPendingActions()线:1196
FragmentManagerImpl $ 1.运行()线:375
Handler.handleCallback(消息)线:587
Handler.dispatchMessage(消息)线:92
Looper.loop()线:126
ActivityThread.main(字符串[])线:3997
Method.invokeNative(对象,对象[],上课,下课[],类,整型,布尔)行:不可用[本地方法]
Method.invoke(对象,对象...)线:491
ZygoteInit $ MethodAndArgsCaller.run()线:841
ZygoteInit.main(字符串[])线:599
NativeStart.main(字符串[])行:不可用[本地方法]
 

解决方案

您可以尝试使用compat的图书馆和调试的。

或者试图复制在减少示例应用程序。

I have an error that has been driving me crazy for days. Unfortunately, I can not show you the code for two reason, my boss will not appreciate it and the codebase is too large to share. The error occurs whenever the Activity is finishing. Weather it be because I call finish() or because the os destroys it.

The question is, what is (or could) cause execPendingActions() in FragmentManagerImpl to throw a NPE at line 1196.

Here is the stacktrace:

FragmentManagerImpl.execPendingActions() line: 1196 
FragmentManagerImpl$1.run() line: 375   
Handler.handleCallback(Message) line: 587   
Handler.dispatchMessage(Message) line: 92   
Looper.loop() line: 126 
ActivityThread.main(String[]) line: 3997    
Method.invokeNative(Object, Object[], Class, Class[], Class, int, boolean) line: not available [native method]  
Method.invoke(Object, Object...) line: 491  
ZygoteInit$MethodAndArgsCaller.run() line: 841  
ZygoteInit.main(String[]) line: 599 
NativeStart.main(String[]) line: not available [native method]  

解决方案

You could try using the compat library and debugging that.

Alternatively try and reproduce in a cut down sample app.

这篇关于为什么NPE抛出整理活动是什么时候?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆