TimePicker crashes app on Pixel7 android 14

Pressing the + or - buttons in TimePicker to change time setting minimizes app, and second time causes Android to notice app "keeps stopping." The app ran for a year without failing. Is this a phone setting? Android 14, April 05 update. Testing in AI Companion also closes companion and disconnects.

Confirmed on a Pixel 7 Pro (Android 14). Changing the minutes or seconds also causes the app to crash (with Companion). @ewpatton

Possible solution (workaround): Do not choose the “Classic” Theme.

1 Like

Hmm. I was not able to reproduce this with Android 13. I guess I'll be upgrading to 14...

1 Like

Yes, it works on Android < 14.

Yep. Upgraded my phone to Android 14 and it crashes. It looks like it's not even our bug as the entire call stack of the crash is Android code. I have found some other reports on StackOverflow of the issue but no concrete solution.

Stack Trace follows
05-07 12:28:51.956 13265 13265 E AndroidRuntime: Process: edu.mit.appinventor.aicompanion3, PID: 13265
05-07 12:28:51.956 13265 13265 E AndroidRuntime: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.widget.EditText.hasFocus()' on a null object reference
05-07 12:28:51.956 13265 13265 E AndroidRuntime: 	at android.widget.TimePickerSpinnerDelegate.updateInputState(TimePickerSpinnerDelegate.java:480)
05-07 12:28:51.956 13265 13265 E AndroidRuntime: 	at android.widget.TimePickerSpinnerDelegate.-$$Nest$mupdateInputState(Unknown Source:0)
05-07 12:28:51.956 13265 13265 E AndroidRuntime: 	at android.widget.TimePickerSpinnerDelegate$2.onValueChange(TimePickerSpinnerDelegate.java:119)
05-07 12:28:51.956 13265 13265 E AndroidRuntime: 	at android.widget.NumberPicker.notifyChange(NumberPicker.java:2080)
05-07 12:28:51.956 13265 13265 E AndroidRuntime: 	at android.widget.NumberPicker.setValueInternal(NumberPicker.java:1850)
05-07 12:28:51.956 13265 13265 E AndroidRuntime: 	at android.widget.NumberPicker.changeValueByOne(NumberPicker.java:1881)
05-07 12:28:51.956 13265 13265 E AndroidRuntime: 	at android.widget.NumberPicker.-$$Nest$mchangeValueByOne(Unknown Source:0)
05-07 12:28:51.956 13265 13265 E AndroidRuntime: 	at android.widget.NumberPicker$1.onClick(NumberPicker.java:725)
05-07 12:28:51.956 13265 13265 E AndroidRuntime: 	at android.view.View.performClick(View.java:7729)
05-07 12:28:51.956 13265 13265 E AndroidRuntime: 	at android.view.View.performClickInternal(View.java:7706)
05-07 12:28:51.956 13265 13265 E AndroidRuntime: 	at android.view.View.-$$Nest$mperformClickInternal(Unknown Source:0)
05-07 12:28:51.956 13265 13265 E AndroidRuntime: 	at android.view.View$PerformClick.run(View.java:30484)
05-07 12:28:51.956 13265 13265 E AndroidRuntime: 	at android.os.Handler.handleCallback(Handler.java:959)
05-07 12:28:51.956 13265 13265 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:100)
05-07 12:28:51.956 13265 13265 E AndroidRuntime: 	at android.os.Looper.loopOnce(Looper.java:232)
05-07 12:28:51.956 13265 13265 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:317)
05-07 12:28:51.956 13265 13265 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:8501)
05-07 12:28:51.956 13265 13265 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
05-07 12:28:51.956 13265 13265 E AndroidRuntime: 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
05-07 12:28:51.956 13265 13265 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:878)

I've noted this as an issue for now until we can learn more

1 Like

It also looks like Google has been made aware of the issue

https://issuetracker.google.com/issues/333670354

1 Like

Don't we have more important problems to solve? Who really needs and uses the Classic theme today? Some may still do it because it was standard until recently and they are not even aware of it.

We've decided for now that it is an issue in Android and we don't have a recourse to fix it in App Inventor.

1 Like