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

java.lang.NullPointerException: Attempt to invoke virtual method 'void android.view.ViewGroup.removeView(android.view.View)' on a null object reference #450

Closed
5 tasks done
toda-bps opened this issue Jul 10, 2020 · 2 comments
Labels
bug Something isn't working

Comments

@toda-bps
Copy link

Environment

Technology Version
Flutter version 1.20.0-8.0.pre.41
Plugin version 4.0.0+4
Android version 9.1.0.325
iOS version
Xcode version

Device information:

SHT-W09

Description

Expected behavior:

App does not crash.

Current behavior:

Crash with 'void android.view.ViewGroup.removeView(android.view.View)' on a null object reference.

Steps to reproduce

  1. Repeatedly open and close InAppBrowser.
  2. Sometimes my app crashes.

Stacktrace/Logcat

E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.example.myapp, PID: 27791
    java.lang.RuntimeException: Unable to destroy activity {com.example.myapp/com.pichillilorenzo.flutter_inappwebview.InAppBrowser.InAppBrowserActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.view.ViewGroup.removeView(android.view.View)' on a null object reference
        at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:5176)
        at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:5195)
        at android.app.servertransaction.DestroyActivityItem.execute(DestroyActivityItem.java:39)
        at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:145)
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:70)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2199)
        at android.os.Handler.dispatchMessage(Handler.java:112)
        at android.os.Looper.loop(Looper.java:216)
        at android.app.ActivityThread.main(ActivityThread.java:7625)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:524)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:987)
     Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.view.ViewGroup.removeView(android.view.View)' on a null object reference
        at com.pichillilorenzo.flutter_inappwebview.InAppBrowser.InAppBrowserActivity.t(Unknown Source:34)
        at com.pichillilorenzo.flutter_inappwebview.InAppBrowser.InAppBrowserActivity.onDestroy(Unknown Source:0)
        at android.app.Activity.performDestroy(Activity.java:7737)
        at android.app.Instrumentation.callActivityOnDestroy(Instrumentation.java:1327)
        at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:5161)
        at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:5195) 
        at android.app.servertransaction.DestroyActivityItem.execute(DestroyActivityItem.java:39) 
        at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:145) 
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:70) 
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2199) 
        at android.os.Handler.dispatchMessage(Handler.java:112) 
        at android.os.Looper.loop(Looper.java:216) 
        at android.app.ActivityThread.main(ActivityThread.java:7625) 
        at java.lang.reflect.Method.invoke(Native Method) 
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:524) 
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:987) 
@toda-bps toda-bps added the bug Something isn't working label Jul 10, 2020
@samin-fs
Copy link

@pichillilorenzo I have the same issue, would you please help?

Copy link

github-actions bot commented Nov 8, 2024

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants