CompanyGateways / mytracks

Automatically exported from code.google.com/p/mytracks
1 stars 0 forks source link

Race condition in chart activity #508

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Start recording
2. Flip quickly between view modes

What is the expected output? What do you see instead?
Should work, but crashes eventually.

The crash is the following:
07-05 13:04:20.961 E/AndroidRuntime(16826): FATAL EXCEPTION: main
07-05 13:04:20.961 E/AndroidRuntime(16826): java.lang.NullPointerException
07-05 13:04:20.961 E/AndroidRuntime(16826):     at 
com.google.android.apps.mytracks.ChartActivity$1.run(ChartActivity.java:106)
07-05 13:04:20.961 E/AndroidRuntime(16826):     at 
android.os.Handler.handleCallback(Handler.java:587)
07-05 13:04:20.961 E/AndroidRuntime(16826):     at 
android.os.Handler.dispatchMessage(Handler.java:92)
07-05 13:04:20.961 E/AndroidRuntime(16826):     at 
android.os.Looper.loop(Looper.java:130)
07-05 13:04:20.961 E/AndroidRuntime(16826):     at 
android.app.ActivityThread.main(ActivityThread.java:3683)
07-05 13:04:20.961 E/AndroidRuntime(16826):     at 
java.lang.reflect.Method.invokeNative(Native Method)
07-05 13:04:20.961 E/AndroidRuntime(16826):     at 
java.lang.reflect.Method.invoke(Method.java:507)
07-05 13:04:20.961 E/AndroidRuntime(16826):     at 
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
07-05 13:04:20.961 E/AndroidRuntime(16826):     at 
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
07-05 13:04:20.961 E/AndroidRuntime(16826):     at 
dalvik.system.NativeStart.main(Native Method)
07-05 13:04:20.971 W/ActivityManager(   94):   Force finishing activity 
com.google.android.maps.mytracks/com.google.android.apps.mytracks.MyTracks

This suggests that the UI update is running after onPause and not bailing in 
onFinishing(), which shouldn't happen.

Original issue reported on code.google.com by rdama...@google.com on 6 Jul 2011 at 1:14

GoogleCodeExporter commented 9 years ago
Please review:

http://code.google.com/r/rdamazio-mytracks-staging2/source/detail?r=067e3c0b07db
b7762084864c530da59d84368604

Original comment by rdama...@google.com on 6 Jul 2011 at 2:17

GoogleCodeExporter commented 9 years ago

Original comment by rdama...@google.com on 20 Jul 2011 at 4:41