Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App crashes during work #652

Open
Manwtein opened this issue Apr 9, 2019 · 2 comments

Comments

Projects
None yet
3 participants
@Manwtein
Copy link

commented Apr 9, 2019

Hello, i'm trying to use the library and my browser shows me a list of my requests, but when i hide some fragments my app crashes.
My app takes the following steps. Open Activity and Fragment -> Open DialogFragment + send request -> Open nested DialogFragment(into childFragmentManager) -> Close nested DialogFragment -> Close DialogFragment(back to Activity) and i get an error message.
I'm trying to figure out why this doesn't work, but I don't know why one of the children of ElementInfo is null. And I see the same problem in the past, sorry if there is a solution, but I cannot find it.

java.lang.NullPointerException: Attempt to read from field 'java.lang.Object com.facebook.stetho.inspector.elements.ElementInfo.parentElement' on a null object reference at com.facebook.stetho.inspector.elements.ShadowDocument$Update.removeGarbageSubTree(ShadowDocument.java:378) at com.facebook.stetho.inspector.elements.ShadowDocument$Update.removeGarbageSubTree(ShadowDocument.java:386) at com.facebook.stetho.inspector.elements.ShadowDocument$Update.removeGarbageSubTree(ShadowDocument.java:386) at com.facebook.stetho.inspector.elements.ShadowDocument$Update.removeGarbageSubTree(ShadowDocument.java:386) at com.facebook.stetho.inspector.elements.ShadowDocument$Update.commit(ShadowDocument.java:360) at com.facebook.stetho.inspector.elements.Document.applyDocumentUpdate(Document.java:494) at com.facebook.stetho.inspector.elements.Document.updateTree(Document.java:346) at com.facebook.stetho.inspector.elements.Document.access$1200(Document.java:31) at com.facebook.stetho.inspector.elements.Document$ProviderListener.onPossiblyChanged(Document.java:720) at com.facebook.stetho.inspector.elements.android.AndroidDocumentProvider$1.run(AndroidDocumentProvider.java:71) 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(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)

@mathroule

This comment has been minimized.

Copy link

commented Apr 30, 2019

I'm getting the same error while using Stetho 1.5.1.

    java.lang.NullPointerException: Attempt to read from field 'java.lang.Object com.facebook.stetho.inspector.elements.ElementInfo.parentElement' on a null object reference
        at com.facebook.stetho.inspector.elements.ShadowDocument$Update.removeGarbageSubTree(ShadowDocument.java:378)
        at com.facebook.stetho.inspector.elements.ShadowDocument$Update.removeGarbageSubTree(ShadowDocument.java:386)
        at com.facebook.stetho.inspector.elements.ShadowDocument$Update.removeGarbageSubTree(ShadowDocument.java:386)
        at com.facebook.stetho.inspector.elements.ShadowDocument$Update.removeGarbageSubTree(ShadowDocument.java:386)
        at com.facebook.stetho.inspector.elements.ShadowDocument$Update.commit(ShadowDocument.java:360)
        at com.facebook.stetho.inspector.elements.Document.applyDocumentUpdate(Document.java:494)
        at com.facebook.stetho.inspector.elements.Document.updateTree(Document.java:346)
        at com.facebook.stetho.inspector.elements.Document.access$1200(Document.java:31)
        at com.facebook.stetho.inspector.elements.Document$ProviderListener.onPossiblyChanged(Document.java:720)
        at com.facebook.stetho.inspector.elements.android.AndroidDocumentProvider$1.run(AndroidDocumentProvider.java:71)
        at android.os.Handler.handleCallback(Handler.java:873)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loop(Looper.java:193)
        at android.app.ActivityThread.main(ActivityThread.java:6669)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
@e4basil

This comment has been minimized.

Copy link

commented May 3, 2019

I'm getting the same error ( Stetho version 1.5.1)

java.lang.NullPointerException: Attempt to read from field 'java.lang.Object com.facebook.stetho.inspector.elements.ElementInfo.parentElement' on a null object reference
        at com.facebook.stetho.inspector.elements.ShadowDocument$Update.removeGarbageSubTree(ShadowDocument.java:378)
        at com.facebook.stetho.inspector.elements.ShadowDocument$Update.removeGarbageSubTree(ShadowDocument.java:386)
        at com.facebook.stetho.inspector.elements.ShadowDocument$Update.removeGarbageSubTree(ShadowDocument.java:386)
        at com.facebook.stetho.inspector.elements.ShadowDocument$Update.removeGarbageSubTree(ShadowDocument.java:386)
        at com.facebook.stetho.inspector.elements.ShadowDocument$Update.commit(ShadowDocument.java:360)
        at com.facebook.stetho.inspector.elements.Document.applyDocumentUpdate(Document.java:494)
        at com.facebook.stetho.inspector.elements.Document.updateTree(Document.java:346)
        at com.facebook.stetho.inspector.elements.Document.access$1200(Document.java:31)
        at com.facebook.stetho.inspector.elements.Document$ProviderListener.onPossiblyChanged(Document.java:720)
        at com.facebook.stetho.inspector.elements.android.AndroidDocumentProvider$1.run(AndroidDocumentProvider.java:71)
        at android.os.Handler.handleCallback(Handler.java:761)
        at android.os.Handler.dispatchMessage(Handler.java:98)
        at android.os.Looper.loop(Looper.java:156)
        at android.app.ActivityThread.main(ActivityThread.java:6623)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:942)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:832)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.