bmcano / ResistanceCalculatorApp

Resistance color code calculator Android app
https://play.google.com/store/apps/details?id=com.brandoncano.resistancecalculator
MIT License
1 stars 0 forks source link

Bad Token Exception Crash #25

Closed bmcano closed 1 year ago

bmcano commented 1 year ago

In the latest version of the app there is a crash that has occurred once at the moment. Screenshot below.

image

bmcano commented 1 year ago

Stack trace

Exception android.view.WindowManager$BadTokenException: Unable to add window -- token null is not valid; is your activity running?
  at android.view.ViewRootImpl.setView (ViewRootImpl.java:925)
  at android.view.WindowManagerGlobal.addView (WindowManagerGlobal.java:384)
  at android.view.WindowManagerImpl.addView (WindowManagerImpl.java:94)
  at android.widget.PopupWindow.invokePopup (PopupWindow.java:1437)
  at android.widget.PopupWindow.showAsDropDown (PopupWindow.java:1284)
  at android.widget.ListPopupWindow.show (ListPopupWindow.java:706)
  at android.widget.AutoCompleteTextView.showDropDown (AutoCompleteTextView.java:1217)
  at com.google.android.material.textfield.MaterialAutoCompleteTextView.showDropDown (MaterialAutoCompleteTextView.java:151)
  at com.google.android.material.textfield.DropdownMenuEndIconDelegate.showHideDropdown (DropdownMenuEndIconDelegate.java:332)
  at com.google.android.material.textfield.DropdownMenuEndIconDelegate.access$500 (DropdownMenuEndIconDelegate.java:71)
  at com.google.android.material.textfield.DropdownMenuEndIconDelegate$8.onClick (DropdownMenuEndIconDelegate.java:294)
  at android.view.View.performClick (View.java:6392)
  at com.google.android.material.textfield.TextInputLayout$2.run (TextInputLayout.java:3003)
  at android.os.Handler.handleCallback (Handler.java:790)
  at android.os.Handler.dispatchMessage (Handler.java:99)
  at android.os.Looper.loop (Looper.java:198)
  at android.app.ActivityThread.main (ActivityThread.java:7055)
  at java.lang.reflect.Method.invoke
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:523)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:836)
bmcano commented 1 year ago

Have not been able to reproduce this yet, but this link has potential solutions for when I am able to do so. https://stackoverflow.com/questions/27087983/unable-to-add-window-token-null-is-not-valid-is-your-activity-running

bmcano commented 1 year ago

Has only happened once, closing issue until this crash becomes an issue again