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

Window leaked exception while uploading instances #1361

Closed
shobhitagarwal1612 opened this issue Aug 21, 2017 · 4 comments
Closed

Window leaked exception while uploading instances #1361

shobhitagarwal1612 opened this issue Aug 21, 2017 · 4 comments

Comments

@shobhitagarwal1612
Copy link
Contributor

Problem discovered while testing #1348

I got the following stacktrace in debugger, although no crashes:

08-19 03:24:08.080 5281-5281/org.odk.collect.android E/WindowManager: android.view.WindowLeaked: Activity org.odk.collect.android.activities.InstanceUploaderActivity has leaked window DecorView@44c68a0[Upload Results] that was originally added here
                                                                          at android.view.ViewRootImpl.<init>(ViewRootImpl.java:418)
                                                                          at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:331)
                                                                          at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:93)
                                                                          at android.app.Dialog.show(Dialog.java:322)
                                                                          at org.odk.collect.android.activities.InstanceUploaderActivity.createAlertDialog(InstanceUploaderActivity.java:402)
                                                                          at org.odk.collect.android.activities.InstanceUploaderActivity.uploadingComplete(InstanceUploaderActivity.java:278)
                                                                          at org.odk.collect.android.tasks.InstanceUploader.onPostExecute(InstanceUploader.java:51)
                                                                          at org.odk.collect.android.tasks.InstanceUploader.onPostExecute(InstanceUploader.java:40)
                                                                          at android.os.AsyncTask.finish(AsyncTask.java:667)
                                                                          at android.os.AsyncTask.-wrap1(AsyncTask.java)
                                                                          at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:684)
                                                                          at android.os.Handler.dispatchMessage(Handler.java:102)
                                                                          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)

Steps to reproduce -

  1. Select multiple instances and click the send selected button
  2. Minimize the app
  3. Keep a track on debugger to know when all instances have been uploaded
  4. After all of the instances have been uploaded, reopen the app

Possible solution: Dismiss the progress dialog when the activity gets paused and redisplay it on resuming the activity.

@dr0pdb
Copy link
Contributor

dr0pdb commented Aug 22, 2017

Working on it !

@lognaturel
Copy link
Member

Was able to get the stack trace following the repro steps this time but I didn't get it previously. There's no crash and the forms send successfully. @shobhitagarwal1612 does it hard crash for you?

@shobhitagarwal1612
Copy link
Contributor Author

@lognaturel I did not experience a hard crash. The stack trace is generated because of the memory leaks.

@shobhitagarwal1612
Copy link
Contributor Author

Unable to reproduce the bug!
Android 7.0
Device : Redmi Note 3
Collect v1.13

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

3 participants