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 triggers NullPointerExpcetions and crashes #30

Open
Marukohe opened this issue Apr 12, 2023 · 0 comments
Open

App triggers NullPointerExpcetions and crashes #30

Marukohe opened this issue Apr 12, 2023 · 0 comments

Comments

@Marukohe
Copy link

App will crash due to some concurrency bugs.

Trace

// CRASH: hu.vsza.adsdroid (pid 6126)
// Short Msg: java.lang.NullPointerException
// Long Msg: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.app.ProgressDialog.dismiss()' on a null object reference
// Build Label: google/sdk_gphone_x86_arm/generic_x86_arm:9/PSR1.180720.122/6736742:userdebug/dev-keys
// Build Changelist: 6736742
// Build Time: 1596587219000
java.lang.NullPointerException: Attempt to invoke virtual method 'void android.app.ProgressDialog.dismiss()' on a null object reference
 	at hu.vsza.adsdroid.c.a(Unknown Source:8)
 	at hu.vsza.adsdroid.c.onPostExecute(Unknown Source:2)
 	at android.os.AsyncTask.finish(AsyncTask.java:695)
 	at android.os.AsyncTask.access$600(AsyncTask.java:180)
 	at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:712)
 	at android.os.Handler.dispatchMessage(Handler.java:106)
 	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)

Reason

SearchPanel class will post some AsyncTasks. If the first task invoke its onPostExecute() method, the field mProgressDialog will be set to null. At the same time, the second task uses this field, and NPE is triggered.

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