wistein / TourCount

TourCount is an Android App that supports species-specific counting of butterflies in nature.
4 stars 3 forks source link

The app crashes when clicked on multiple times in the feature "Select the Butterfly" #19

Closed ahyar92 closed 6 years ago

ahyar92 commented 6 years ago

Expected behavior

Supposedly, when I clicked a few times on the feature of select a butterfly, the app does not crash.

Actual behavior

Initially, when I go to the "Counting" page, and select the type of butterfly, but the page not appears or experience a lag, and I try to click the feature multiple times and the application crashes. Finally I try to track down errors by trying to do the same thing by clicking a few times on features "Select the Butterfly" and the app still crashes.

How to reproduce

  1. Install and open the app
  2. Go to page "Counting"
  3. Next click on the "Select the Butterfly" feature several times quickly. Then you will find the error as I experienced.

Recording Of The Bug

https://www.youtube.com/watch?v=jptRleeyXO0&feature=youtu.be

Logcat

05-27 02:38:25.427 22822 22822 E AndroidRuntime: FATAL EXCEPTION: main
05-27 02:38:25.427 22822 22822 E AndroidRuntime: Process: com.wmstein.tourcount, PID: 22822
05-27 02:38:25.427 22822 22822 E AndroidRuntime: java.lang.NullPointerException: Attempt to invoke virtual method 'android.transition.Transition android.transition.Transition.removeListener(android.transition.Transition$TransitionListener)' on a null object reference
05-27 02:38:25.427 22822 22822 E AndroidRuntime:    at android.widget.PopupWindow$PopupDecorView$3.onTransitionEnd(PopupWindow.java:2380)
05-27 02:38:25.427 22822 22822 E AndroidRuntime:    at android.widget.PopupWindow$PopupDecorView.cancelTransitions(PopupWindow.java:2414)
05-27 02:38:25.427 22822 22822 E AndroidRuntime:    at android.widget.PopupWindow.preparePopup(PopupWindow.java:1289)
05-27 02:38:25.427 22822 22822 E AndroidRuntime:    at android.widget.PopupWindow.showAsDropDown(PopupWindow.java:1227)
05-27 02:38:25.427 22822 22822 E AndroidRuntime:    at android.widget.ListPopupWindow.show(ListPopupWindow.java:671)
05-27 02:38:25.427 22822 22822 E AndroidRuntime:    at android.widget.Spinner$DropdownPopup.show(Spinner.java:1235)
05-27 02:38:25.427 22822 22822 E AndroidRuntime:    at android.widget.Spinner.performClick(Spinner.java:770)
05-27 02:38:25.427 22822 22822 E AndroidRuntime:    at android.support.v7.widget.AppCompatSpinner.performClick(AppCompatSpinner.java:442)
05-27 02:38:25.427 22822 22822 E AndroidRuntime:    at android.view.View$PerformClick.run(View.java:22462)
05-27 02:38:25.427 22822 22822 E AndroidRuntime:    at android.os.Handler.handleCallback(Handler.java:754)
05-27 02:38:25.427 22822 22822 E AndroidRuntime:    at android.os.Handler.dispatchMessage(Handler.java:95)
05-27 02:38:25.427 22822 22822 E AndroidRuntime:    at android.os.Looper.loop(Looper.java:163)
05-27 02:38:25.427 22822 22822 E AndroidRuntime:    at android.app.ActivityThread.main(ActivityThread.java:6361)
05-27 02:38:25.427 22822 22822 E AndroidRuntime:    at java.lang.reflect.Method.invoke(Native Method)
05-27 02:38:25.427 22822 22822 E AndroidRuntime:    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904)
05-27 02:38:25.427 22822 22822 E AndroidRuntime:    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:794)
wistein commented 6 years ago

Thanks for testing. Could reproduce the problem.

The crash is not caused within TourCount-Code. It is a problem of the Spinner function of the Android SDK (see your logcat: all references are made to SDK-sources). So this is not fixable by me without reprogramming the Spinner functionality which is not worth it as there is no data loss and it is not likely to be encountered by intended use).

Finally, the fix should be done by Google!