bluelinelabs / Conductor

A small, yet full-featured framework that allows building View-based Android applications
Apache License 2.0
3.89k stars 342 forks source link

Fatal Exception: java.lang.NullPointerException #633

Closed TikTak123 closed 3 years ago

TikTak123 commented 3 years ago

Conductor version: implementation 'com.bluelinelabs:conductor:3.0.0' crash started happening before stable version 3.0.0

API level: Android 6, 7, 8, 9, 10

Error log:

Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.ViewParent android.view.View.getParent()' on a null object reference
       at com.bluelinelabs.conductor.Controller.attach(Controller.java:895)
       at com.bluelinelabs.conductor.Controller.attach(Controller.java:931)
       at com.bluelinelabs.conductor.Controller$1.onAttached(Controller.java:1044)
       at com.bluelinelabs.conductor.internal.ViewAttachHandler.reportAttached(ViewAttachHandler.java:84)
       at com.bluelinelabs.conductor.internal.ViewAttachHandler.lambda$onViewAttachedToWindow$0$ViewAttachHandler(ViewAttachHandler.java:45)
       at com.bluelinelabs.conductor.internal.-$$Lambda$ViewAttachHandler$Gqky6XFsDH98TNhxM4DJWZsPvvM.onAttached(lambda)
       at com.bluelinelabs.conductor.internal.ViewAttachHandler$1.onViewAttachedToWindow(ViewAttachHandler.java:123)
       at android.view.View.dispatchAttachedToWindow(View.java:15520)
       at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2916)
       at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2923)
       at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2923)
       at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2923)
       at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2923)
       at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2923)
       at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2923)
       at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2923)
       at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2923)
       at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1526)
       at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1254)
       at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6337)
       at android.view.Choreographer$CallbackRecord.run(Choreographer.java:874)
       at android.view.Choreographer.doCallbacks(Choreographer.java:686)
       at android.view.Choreographer.doFrame(Choreographer.java:621)
       at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:860)
       at android.os.Handler.handleCallback(Handler.java:751)
       at android.os.Handler.dispatchMessage(Handler.java:95)
       at android.os.Looper.loop(Looper.java:154)
       at android.app.ActivityThread.main(ActivityThread.java:6119)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
EricKuck commented 3 years ago

@TikTak123 I have not been able to reproduce this one, but I believe it has been fixed in the latest snapshot. If you're able to reproduce at all, please try it out!

dimsuz commented 3 years ago

Hi @EricKuck! I'm curious, do you plan to cut the release soon(-ish) with all the bugfixes you (and others) have fixed?

EricKuck commented 3 years ago

@dimsuz Yes, a new release will be cut within a week. I'd like to hear if the issue is fixed for @TikTak123 first if possible, but I'm not sure if he's actually able to repro or if these are just random crashlytics logs.

TikTak123 commented 3 years ago

@EricKuck This is random crashlitycs logs. Today we will release a new version on Google Play. I'll give you feedback in a few days.

TikTak123 commented 3 years ago

The new version runs for 3 days on prod. So far, I haven't seen a single crash regarding this.