知道为什么会出现这种崩溃吗?跟踪只有本机代码,因此很难追踪。当我在 a中运行动画Fragment
并且动画结束时我调用notifyDataSetChanged
. FragmentStatePagerAdapter
这个问题不是 100% 可重现的。
谢谢。
痕迹:
03-01 11:50:11.836: E/AndroidRuntime(21136): FATAL EXCEPTION: main
03-01 11:50:11.836: E/AndroidRuntime(21136): java.lang.NullPointerException
03-01 11:50:11.836: E/AndroidRuntime(21136): at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3147)
03-01 11:50:11.836: E/AndroidRuntime(21136): at android.view.View.getDisplayList(View.java:12646)
03-01 11:50:11.836: E/AndroidRuntime(21136): at android.view.View.getDisplayList(View.java:12754)
03-01 11:50:11.836: E/AndroidRuntime(21136): at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3151)
03-01 11:50:11.836: E/AndroidRuntime(21136): at android.view.View.getDisplayList(View.java:12646)
03-01 11:50:11.836: E/AndroidRuntime(21136): at android.view.View.getDisplayList(View.java:12754)
03-01 11:50:11.836: E/AndroidRuntime(21136): at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3151)
03-01 11:50:11.836: E/AndroidRuntime(21136): at android.view.View.getDisplayList(View.java:12646)
03-01 11:50:11.836: E/AndroidRuntime(21136): at android.view.View.getDisplayList(View.java:12754)
03-01 11:50:11.836: E/AndroidRuntime(21136): at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3151)
03-01 11:50:11.836: E/AndroidRuntime(21136): at android.view.View.getDisplayList(View.java:12646)
03-01 11:50:11.836: E/AndroidRuntime(21136): at android.view.View.getDisplayList(View.java:12754)
03-01 11:50:11.836: E/AndroidRuntime(21136): at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3151)
03-01 11:50:11.836: E/AndroidRuntime(21136): at android.view.View.getDisplayList(View.java:12646)
03-01 11:50:11.836: E/AndroidRuntime(21136): at android.view.View.getDisplayList(View.java:12754)
03-01 11:50:11.836: E/AndroidRuntime(21136): at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3151)
03-01 11:50:11.836: E/AndroidRuntime(21136): at android.view.View.getDisplayList(View.java:12646)
03-01 11:50:11.836: E/AndroidRuntime(21136): at android.view.View.getDisplayList(View.java:12754)
03-01 11:50:11.836: E/AndroidRuntime(21136): at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3151)
03-01 11:50:11.836: E/AndroidRuntime(21136): at android.view.View.getDisplayList(View.java:12646)
03-01 11:50:11.836: E/AndroidRuntime(21136): at android.view.View.getDisplayList(View.java:12754)
03-01 11:50:11.836: E/AndroidRuntime(21136): at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3151)
03-01 11:50:11.836: E/AndroidRuntime(21136): at android.view.View.getDisplayList(View.java:12646)
03-01 11:50:11.836: E/AndroidRuntime(21136): at android.view.View.getDisplayList(View.java:12754)
03-01 11:50:11.836: E/AndroidRuntime(21136): at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3151)
03-01 11:50:11.836: E/AndroidRuntime(21136): at android.view.View.getDisplayList(View.java:12646)
03-01 11:50:11.836: E/AndroidRuntime(21136): at android.view.View.getDisplayList(View.java:12754)
03-01 11:50:11.836: E/AndroidRuntime(21136): at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3151)
03-01 11:50:11.836: E/AndroidRuntime(21136): at android.view.View.getDisplayList(View.java:12646)
03-01 11:50:11.836: E/AndroidRuntime(21136): at android.view.View.getDisplayList(View.java:12754)
03-01 11:50:11.836: E/AndroidRuntime(21136): at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3151)
03-01 11:50:11.836: E/AndroidRuntime(21136): at android.view.View.getDisplayList(View.java:12646)
03-01 11:50:11.836: E/AndroidRuntime(21136): at android.view.View.getDisplayList(View.java:12754)
03-01 11:50:11.836: E/AndroidRuntime(21136): at android.view.HardwareRenderer$GlRenderer.draw(HardwareRenderer.java:1144)
03-01 11:50:11.836: E/AndroidRuntime(21136): at android.view.ViewRootImpl.draw(ViewRootImpl.java:2273)
03-01 11:50:11.836: E/AndroidRuntime(21136): at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2145)
03-01 11:50:11.836: E/AndroidRuntime(21136): at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1956)
03-01 11:50:11.836: E/AndroidRuntime(21136): at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1112)
03-01 11:50:11.836: E/AndroidRuntime(21136): at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:4472)
03-01 11:50:11.836: E/AndroidRuntime(21136): at android.view.Choreographer$CallbackRecord.run(Choreographer.java:725)
03-01 11:50:11.836: E/AndroidRuntime(21136): at android.view.Choreographer.doCallbacks(Choreographer.java:555)
03-01 11:50:11.836: E/AndroidRuntime(21136): at android.view.Choreographer.doFrame(Choreographer.java:525)
03-01 11:50:11.836: E/AndroidRuntime(21136): at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:711)
03-01 11:50:11.836: E/AndroidRuntime(21136): at android.os.Handler.handleCallback(Handler.java:615)
03-01 11:50:11.836: E/AndroidRuntime(21136): at android.os.Handler.dispatchMessage(Handler.java:92)
03-01 11:50:11.836: E/AndroidRuntime(21136): at android.os.Looper.loop(Looper.java:137)
03-01 11:50:11.836: E/AndroidRuntime(21136): at android.app.ActivityThread.main(ActivityThread.java:4898)
03-01 11:50:11.836: E/AndroidRuntime(21136): at java.lang.reflect.Method.invokeNative(Native Method)
03-01 11:50:11.836: E/AndroidRuntime(21136): at java.lang.reflect.Method.invoke(Method.java:511)
03-01 11:50:11.836: E/AndroidRuntime(21136): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1006)
03-01 11:50:11.836: E/AndroidRuntime(21136): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:773)
03-01 11:50:11.836: E/AndroidRuntime(21136): at dalvik.system.NativeStart.main(Native Method)