-
-
Notifications
You must be signed in to change notification settings - Fork 195
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
API CreateMarkerActivity ShowMarkerActivity App crashes when called #2030
Comments
Do you have a stack trace? |
App information
Device information
Firmware
Cause of errorException in thread "main": java.lang.RuntimeException: Unable to start activity ComponentInfo{de.dennisguse.opentracks/de.dennisguse.opentracks.ui.markers.MarkerEditActivity}: java.lang.IllegalStateException: TrackId and Location must be provided or an existing markerId
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3993)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4173)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:114)
at android.app.servertransaction.TransactionExecutor.executeNonLifecycleItem(TransactionExecutor.java:231)
at android.app.servertransaction.TransactionExecutor.executeTransactionItems(TransactionExecutor.java:152)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:93)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2595)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loopOnce(Looper.java:232)
at android.os.Looper.loop(Looper.java:317)
at android.app.ActivityThread.main(ActivityThread.java:8592)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:580)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:878)
Caused by: java.lang.IllegalStateException: TrackId and Location must be provided or an existing markerId
at de.dennisguse.opentracks.ui.markers.MarkerEditActivity.onCreate(MarkerEditActivity.java:101)
at android.app.Activity.performCreate(Activity.java:8960)
at android.app.Activity.performCreate(Activity.java:8938)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1526)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3975)
... 13 more |
Thanks. Can you describe the steps to reproduce this? |
Steps to reproduce this situation:
This happens every time after following the above steps |
The crash is correct. We can improve the API documentation, but the behavior will still be the same. Only the error message would be nicer. And this part of the API was meant for OSMDashboard. @pstorch FYI |
@tch123 by the way: what did you try to do? |
i try : App information
Device information
Firmware
Cause of errorException in thread "main": java.lang.RuntimeException: Unable to start activity ComponentInfo{de.dennisguse.opentracks/de.dennisguse.opentracks.io.file.exporter.ExportActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.util.List android.net.Uri.getPathSegments()' on a null object reference
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3540)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3700)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2136)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:236)
at android.app.ActivityThread.main(ActivityThread.java:8060)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:656)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:967)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.util.List android.net.Uri.getPathSegments()' on a null object reference
at android.provider.DocumentsContract.getTreeDocumentId(DocumentsContract.java:1274)
at androidx.documentfile.provider.DocumentFile.fromTreeUri(DocumentFile.java:136)
at de.dennisguse.opentracks.io.file.exporter.ExportActivity.onCreate(ExportActivity.java:164)
at android.app.Activity.performCreate(Activity.java:8143)
at android.app.Activity.performCreate(Activity.java:8114)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1310)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3513)
... 11 more bug2: App information
Device information
Firmware
Cause of errorException in thread "main": java.lang.RuntimeException: Unable to start activity ComponentInfo{de.dennisguse.opentracks/de.dennisguse.opentracks.io.file.importer.ImportActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.util.List android.net.Uri.getPathSegments()' on a null object reference
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3540)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3700)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2136)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:236)
at android.app.ActivityThread.main(ActivityThread.java:8060)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:656)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:967)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.util.List android.net.Uri.getPathSegments()' on a null object reference
at android.provider.DocumentsContract.getTreeDocumentId(DocumentsContract.java:1274)
at androidx.documentfile.provider.DocumentFile.fromTreeUri(DocumentFile.java:136)
at de.dennisguse.opentracks.io.file.importer.ImportActivity.onCreate(ImportActivity.java:101)
at android.app.Activity.performCreate(Activity.java:8143)
at android.app.Activity.performCreate(Activity.java:8114)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1310)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3513)
... 11 more bug3:### App information
Device information
Firmware
Cause of errorException in thread "main": java.lang.RuntimeException: Unable to start activity ComponentInfo{de.dennisguse.opentracks/de.dennisguse.opentracks.io.file.importer.ImportActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.util.List android.net.Uri.getPathSegments()' on a null object reference
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3540)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3700)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2136)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:236)
at android.app.ActivityThread.main(ActivityThread.java:8060)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:656)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:967)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.util.List android.net.Uri.getPathSegments()' on a null object reference
at android.provider.DocumentsContract.getTreeDocumentId(DocumentsContract.java:1274)
at androidx.documentfile.provider.DocumentFile.fromTreeUri(DocumentFile.java:136)
at de.dennisguse.opentracks.io.file.importer.ImportActivity.onCreate(ImportActivity.java:101)
at android.app.Activity.performCreate(Activity.java:8143)
at android.app.Activity.performCreate(Activity.java:8114)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1310)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3513)
... 11 more bug4 App information
Device information
Firmware
Cause of errorException in thread "main": java.lang.RuntimeException: Unable to start activity ComponentInfo{de.dennisguse.opentracks/de.dennisguse.opentracks.io.file.importer.ImportActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.util.List android.net.Uri.getPathSegments()' on a null object reference
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3540)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3700)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2136)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:236)
at android.app.ActivityThread.main(ActivityThread.java:8060)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:656)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:967)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.util.List android.net.Uri.getPathSegments()' on a null object reference
at android.provider.DocumentsContract.getTreeDocumentId(DocumentsContract.java:1274)
at androidx.documentfile.provider.DocumentFile.fromTreeUri(DocumentFile.java:136)
at de.dennisguse.opentracks.io.file.importer.ImportActivity.onCreate(ImportActivity.java:101)
at android.app.Activity.performCreate(Activity.java:8143)
at android.app.Activity.performCreate(Activity.java:8114)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1310)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3513)
... 11 more bug5? App information
Device information
Firmware
Cause of errorException in thread "main": java.lang.RuntimeException: Unable to start activity ComponentInfo{de.dennisguse.opentracks/de.dennisguse.opentracks.TrackRecordedActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'long de.dennisguse.opentracks.data.models.Track$Id.id()' on a null object reference
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3540)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3700)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2136)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:236)
at android.app.ActivityThread.main(ActivityThread.java:8060)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:656)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:967)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'long de.dennisguse.opentracks.data.models.Track$Id.id()' on a null object reference
at de.dennisguse.opentracks.data.ContentProviderUtils.getTrack(ContentProviderUtils.java:263)
at de.dennisguse.opentracks.TrackRecordedActivity.onCreate(TrackRecordedActivity.java:104)
at android.app.Activity.performCreate(Activity.java:8143)
at android.app.Activity.performCreate(Activity.java:8114)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1310)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3513)
... 11 more App information
Device information
Firmware
Cause of errorException in thread "main": java.lang.RuntimeException: Unable to start activity ComponentInfo{de.dennisguse.opentracks/de.dennisguse.opentracks.TrackRecordedActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'long de.dennisguse.opentracks.data.models.Track$Id.id()' on a null object reference
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3540)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3700)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2136)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:236)
at android.app.ActivityThread.main(ActivityThread.java:8060)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:656)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:967)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'long de.dennisguse.opentracks.data.models.Track$Id.id()' on a null object reference
at de.dennisguse.opentracks.data.ContentProviderUtils.getTrack(ContentProviderUtils.java:263)
at de.dennisguse.opentracks.TrackRecordedActivity.onCreate(TrackRecordedActivity.java:104)
at android.app.Activity.performCreate(Activity.java:8143)
at android.app.Activity.performCreate(Activity.java:8114)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1310)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3513)
... 11 more bug* App information
Device information
Firmware
Cause of errorException in thread "main": java.lang.RuntimeException: Unable to start activity ComponentInfo{de.dennisguse.opentracks/de.dennisguse.opentracks.TrackStoppedActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'long de.dennisguse.opentracks.data.models.Track$Id.id()' on a null object reference
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3540)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3700)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2136)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:236)
at android.app.ActivityThread.main(ActivityThread.java:8060)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:656)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:967)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'long de.dennisguse.opentracks.data.models.Track$Id.id()' on a null object reference
at de.dennisguse.opentracks.data.ContentProviderUtils.getTrack(ContentProviderUtils.java:263)
at de.dennisguse.opentracks.TrackStoppedActivity.onCreate(TrackStoppedActivity.java:48)
at android.app.Activity.performCreate(Activity.java:8143)
at android.app.Activity.performCreate(Activity.java:8114)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1310)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3513)
... 11 more |
@dennisguse Use Tasker to get home (specify Wi-Fi and call StopRecording API to stop recording). This will prevent me from forgetting to stop recording. If Tasker can directly call the mark location API, this operation can be bound to the volume keys, which is easy to operate while wearing gloves in the cold winter. This is the usage scenario I have in mind. |
@tch123 that's a case the API was not meant to be used for :D @dopdo can you please create a new issue for this and also describe how to reproduce the issue. |
@dennisguse I've created a new issue for the feature request to add quick marking functionality via Tasker. Please take a look when you get a chance. Thank you! |
Follow-up is: #2031 |
API CreateMarkerActivity, ShowMarkerActivity App crashes when called
OpenTracks version 4.16
Android 14 LineageOS 21
The text was updated successfully, but these errors were encountered: