ATimeTracker
ATimeTracker copied to clipboard
Crashes when toggling activities when sound is enabled
Describe the bug The app crashes when starting or stopping activities after being away from the main view.
To Reproduce Steps to reproduce the behavior:
- Make sound is enabled in Settings of ATimeTracker.
- Go to Android main view/screen (i.e. making sure ATimeTracker is not in the foreground).
- Start ATimeTracker.
- Start or stop an existing activity
Expected behavior The activity state changes.
Actual behavior The app crashes.
Smartphone (please complete the following information):
- Samsung Galaxy S5
- OS: Android 9 (LineageOS)
Additional context From adb logcat:
java.lang.NullPointerException: Attempt to invoke virtual method 'void android.media.MediaPlayer.start()' on a null object reference
at com.markuspage.android.atimetracker.Activities.onListItemClick(Activities.java:1234)
at android.app.ListActivity$2.onItemClick(ListActivity.java:319)
at android.widget.AdapterView.performItemClick(AdapterView.java:318)
Workaround:
- Disable sound in Settings