ATimeTracker icon indicating copy to clipboard operation
ATimeTracker copied to clipboard

Crashes when toggling activities when sound is enabled

Open netmackan opened this issue 5 years ago • 1 comments

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:

  1. Make sound is enabled in Settings of ATimeTracker.
  2. Go to Android main view/screen (i.e. making sure ATimeTracker is not in the foreground).
  3. Start ATimeTracker.
  4. 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)

netmackan avatar Sep 15 '19 13:09 netmackan

Workaround:

  • Disable sound in Settings

netmackan avatar Sep 15 '19 13:09 netmackan