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

Rare chrashes where mArgs causes a null pointer exception #234

Open
sithwarrior opened this issue Apr 3, 2023 · 0 comments
Open

Rare chrashes where mArgs causes a null pointer exception #234

sithwarrior opened this issue Apr 3, 2023 · 0 comments

Comments

@sithwarrior
Copy link

For our App, we are seeing some crashes in our Android ANR console, and they point to mArgs being null.

You can see it points to onCreate line 67

Exception java.lang.RuntimeException: at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:3751) at android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:3919) at android.app.servertransaction.LaunchActivityItem.execute (LaunchActivityItem.java:103) at android.app.servertransaction.TransactionExecutor.executeCallbacks (TransactionExecutor.java:135) at android.app.servertransaction.TransactionExecutor.execute (TransactionExecutor.java:95) at android.app.ActivityThread$H.handleMessage (ActivityThread.java:2311) at android.os.Handler.dispatchMessage (Handler.java:111) at android.os.Looper.loopOnce (Looper.java:238) at android.os.Looper.loop (Looper.java:357) at android.app.ActivityThread.main (ActivityThread.java:8090) at java.lang.reflect.Method.invoke at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:548) at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1026) Caused by java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String org.json.JSONArray.getString(int)' on a null object reference at com.sarriaroman.PhotoViewer.PhotoActivity.onCreate (PhotoActivity.java:67) at android.app.Activity.performCreate (Activity.java:8232) at android.app.Activity.performCreate (Activity.java:8212) at android.app.Instrumentation.callActivityOnCreate (Instrumentation.java:1331) at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:3724)

com.sarriaroman.PhotoViewer.PhotoActivity.onCreate (PhotoActivity.java:67

I think this might be cause by how mArgs is being assigned, so I did a PR where mArgs are assigned by putExtra instead.

#233

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant