My app crashed and this is the logcat output. It appears to be an issue in the ListView item selection code.
FATAL EXCEPTION: main
Process: appinventor.ai_easrng.simpltalk, PID: 23730
java.lang.NullPointerException: Attempt to invoke virtual method 'void android.view.View.setBackgroundDrawable(android.graphics.drawable.Drawable)' on a null object reference
at com.google.appinventor.components.runtime.ListView.onItemClick(ListView.java:425)
at com.google.appinventor.components.runtime.ListView.onItemSelected(ListView.java:440)
at android.widget.AdapterView.fireOnSelected(AdapterView.java:944)
at android.widget.AdapterView.dispatchOnItemSelected(AdapterView.java:933)
at android.widget.AdapterView.-wrap1(Unknown Source:0)
at android.widget.AdapterView$SelectionNotifier.run(AdapterView.java:898)
at android.os.Handler.handleCallback(Handler.java:790)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6626)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:811)
Hmm. Interesting that you were able to get a null pointer exception here. Was there anything interesting in particular with the item you selected? Could you reproduce the issue with just the ListView in a UI and nothing else?
I think it happened when I set the selected item index, but I'm not sure. The app was a chat app, the messages are put in the listview and the last item is selected to scroll it to the bottom. It had been working for a few minutes, then it crashed.
simpltalk.aia (80.7 KB) The crash was after several minutes of use, not sure if I will be able to repro. There are other known bugs especially with my handling of the textbox, but I'm fixing those.
So, just testing the App with easrng - the crash occurs when the ListView is being updated. I think there is a clash in there whereby a button event and a clock timer can try to update the list at the same moment.
easing is going to try modified code without a timer.