Thanks Erel. Just to reiterate: this error occurs when I add an item, close the app, reopen the app, delete the item and then close.
Here it is:
Logger connected to: Google Pixel
--------- beginning of main
Copying updated assets files (20)
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
Index time: 37 ms (497 Items)
** Activity (main) Pause, UserClosed = false **
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
Error occurred on line: 139 (EditableTable)
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.get(ArrayList.java:437)
at anywheresoftware.b4a.objects.collections.List.Get(List.java:117)
at anywheresoftware.b4a.objects.StringUtils.SaveCSV2(StringUtils.java:107)
at anywheresoftware.b4a.objects.StringUtils.SaveCSV(StringUtils.java:100)
at b4a.example.editabletable._exporttabletocsv(editabletable.java:187)
at b4a.example.main._activity_pause(main.java:420)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:732)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:348)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144)
at b4a.example.main.onPause(main.java:271)
at android.app.Activity.performPause(Activity.java:7978)
at android.app.Instrumentation.callActivityOnPause(Instrumentation.java:1507)
at android.app.ActivityThread.performPauseActivityIfNeeded(ActivityThread.java:4493)
at android.app.ActivityThread.performPauseActivity(ActivityThread.java:4454)
at android.app.ActivityThread.handlePauseActivity(ActivityThread.java:4406)
at android.app.servertransaction.PauseActivityItem.execute(PauseActivityItem.java:46)
at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:176)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2016)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7356)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **