runnerup icon indicating copy to clipboard operation
runnerup copied to clipboard

NullPointerException at RunActivity

Open anlalalu opened this issue 6 years ago • 3 comments

Stack Trace

E/AndroidRuntime( 6125): FATAL EXCEPTION: main E/AndroidRuntime( 6125): Process: org.runnerup, PID: 6125 E/AndroidRuntime( 6125): java.lang.NullPointerException E/AndroidRuntime( 6125): at org.runnerup.view.RunActivity$4.onClick(RunActivity.java:357) E/AndroidRuntime( 6125): at android.view.View.performClick(View.java:4438) E/AndroidRuntime( 6125): at android.view.View$PerformClick.run(View.java:18422) E/AndroidRuntime( 6125): at android.os.Handler.handleCallback(Handler.java:733) E/AndroidRuntime( 6125): at android.os.Handler.dispatchMessage(Handler.java:95) E/AndroidRuntime( 6125): at android.os.Looper.loop(Looper.java:136) E/AndroidRuntime( 6125): at android.app.ActivityThread.main(ActivityThread.java:5001) E/AndroidRuntime( 6125): at java.lang.reflect.Method.invokeNative(Native Method) E/AndroidRuntime( 6125): at java.lang.reflect.Method.invoke(Method.java:515) E/AndroidRuntime( 6125): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785) E/AndroidRuntime( 6125): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601) E/AndroidRuntime( 6125): at dalvik.system.NativeStart.main(Native Method) F/ActivityManager( 589): Service ServiceRecord{52a785f8 u0 org.runnerup/.tracker.Tracker} in process ProcessRecord{5295d588 6125:org.runnerup/u0a62} not same as in map: null

Debug info

App Version = 2.0.3.0

Android Version = 7.1.0

anlalalu avatar Jan 05 '20 07:01 anlalalu

I cannot see how this occurs, workout should not be null here. Were you trying to pause or resume?

gerhardol avatar Jan 05 '20 08:01 gerhardol

This crash is triggered by an automatic testing tool and is related to this shell instruction:

adb shell am start -n org.runnerup/org.runnerup.view.RunActivity

anlalalu avatar Jan 05 '20 09:01 anlalalu

For some other event handlers there are "Should not happen checks" for null workout. That is hiding the real problem though. In this case I cannot see how this occurs. If the automated testing and starting RunActivity without being started from StartActivity when the GPS is connected, not much will work anyway and I am a little hesitant just to patch the problem, unless it helps testing.

newLap button (line 375) should have the same behavior

gerhardol avatar Jan 05 '20 23:01 gerhardol