saintbyte / openbmap

Automatically exported from code.google.com/p/openbmap
Other
1 stars 1 forks source link

Crash after exporting #8

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Record a session and save it
2. Export it

What is the expected output? What do you see instead?
After export completes, a notification appears that Radiobeacon has closed.

What version of the product are you using? On what operating system?
Downloaded APK from revision fdd40e50ccf1, on Cyanogenmod 10.1.3-RC1

Please provide any additional information below.
Logcat shows error:
Activity org.openbmap.activity.SessionActivity has leaked window 
com.android.internal.policy.impl.PhoneWindow$DecorView

Looks like either:
- a dialog is opened twice
- the dialog is not dismissed when the activity that called it is paused or 
destroyed.

See 
http://stackoverflow.com/questions/12000940/android-activity-has-leaked-window-c
om-android-internal-policy-impl-phonewindow

Original issue reported on code.google.com by mich...@vonglasow.com on 30 Aug 2013 at 9:14

GoogleCodeExporter commented 9 years ago
After examing the code I suspect this is bug in not related to the dialogs at 
all but to the underlying exporter. If an expection occurs in the exporter this 
can crash the session activity and will lead to window leak.

As there has been a major rework of the exporter, I temporarily invalidated 
this bug.
If you still find this issue, please re-open. In that case the complete log 
file would be very helpful

Original comment by wish7code on 3 Sep 2013 at 7:32

GoogleCodeExporter commented 9 years ago
I ran into it again with 00.7.00. This time Radiobeacon crashed before the 
upload completed (i.e. the session does not show as exported when I reopen 
Radiobeacon).

Logcat attached, errors begin in line 766. The log agrees with your suspicion 
that there's an uncaught exception in the exporter, which in turn leads to the 
window leak. The exception is:

Caused by: java.lang.NullPointerException: println needs a message
    at android.util.Log.println_native(Native Method)
    at android.util.Log.e(Log.java:231)
    at org.openbmap.soapclient.FileUploader.upload(FileUploader.java:163)
    at org.openbmap.soapclient.FileUploader.doInBackground(FileUploader.java:102)
    at org.openbmap.soapclient.FileUploader.doInBackground(FileUploader.java:1)

Original comment by mich...@vonglasow.com on 4 Sep 2013 at 9:09

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks for the update:

Release 
http://code.google.com/p/openbmap/source/detail?r=172177f29e4fe408fed137669d4095
d7a001f17c handles the NullPointerException which caused the ExportManager to 
crash.

The root cause seems to be a failed upload, so I also added a simple retry 
mechanism if upload fails. Default setting: retry to upload on error 2 times..

Original comment by wish7code on 4 Sep 2013 at 10:17

GoogleCodeExporter commented 9 years ago
Yes, I suspected that. Using my 64kbit UMTS connection (my carrier throttles it 
when the maximum data volume has been exceeded), I got that error on every 
upload. Using my WiFi at home I was able to upload everything.

Original comment by mich...@vonglasow.com on 4 Sep 2013 at 10:07

GoogleCodeExporter commented 9 years ago
When you tried the UMTS upload did you already use r172177f29e4f?

In the mean time there's a new release r3a1568417f21. Could you verify whether 
the problem still exists?

If that doesn't help, we could try to reduce the number simultaneous connection 
when slow network is detected. (rough idea: ServerValidation class checks 
connection speed to openbmap.org, number of connections is reduced, somewhere 
in ExportManager around line 176)

Original comment by wish7code on 4 Sep 2013 at 10:44

GoogleCodeExporter commented 9 years ago
No, I was still running f32ec9f623e3. I'll update and let you know about the 
results.

Original comment by mich...@vonglasow.com on 4 Sep 2013 at 10:54