VanceVagell / kv4p-ht

Open source handheld ham radio project KV4P-HT
GNU General Public License v3.0
316 stars 35 forks source link

[Android] Fix 2 exceptions found by Google Play automated testing on v1.1.0 #99

Closed VanceVagell closed 4 days ago

VanceVagell commented 4 days ago

First exception:

Exception android.database.sqlite.SQLiteConstraintException: UNIQUE constraint failed: app_settings.name (code 1555 SQLITE_CONSTRAINT_PRIMARYKEY) at android.database.sqlite.SQLiteConnection.nativeExecuteForLastInsertedRowId at android.database.sqlite.SQLiteConnection.executeForLastInsertedRowId (SQLiteConnection.java:961) at android.database.sqlite.SQLiteSession.executeForLastInsertedRowId (SQLiteSession.java:790) at android.database.sqlite.SQLiteStatement.executeInsert (SQLiteStatement.java:89) at androidx.sqlite.db.framework.FrameworkSQLiteStatement.executeInsert (FrameworkSQLiteStatement.kt:42) at androidx.room.EntityInsertionAdapter.insert (EntityInsertionAdapter.kt:68) at com.vagell.kv4pht.data.AppSettingDao_Impl.insertAll (AppSettingDao_Impl.java:98) at com.vagell.kv4pht.ui.MainActivity$16.run (MainActivity.java:930) at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1137) at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:637) at java.lang.Thread.run (Thread.java:1012)

Second exception:

Exception java.lang.IllegalStateException: Could not execute method for android:onClick at android.view.View$DeclaredOnClickListener.onClick (View.java:6325) at android.view.View.performClick (View.java:7506) at android.view.View.performClickInternal (View.java:7483) at android.view.View.-$$Nest$mperformClickInternal (Unknown Source) at android.view.View$PerformClick.run (View.java:29335) at android.os.Handler.handleCallback (Handler.java:942) at android.os.Handler.dispatchMessage (Handler.java:99) at androidx.test.espresso.base.Interrogator.loopAndInterrogate (Interrogator.java:10) at androidx.test.espresso.base.UiControllerImpl.loopUntil (UiControllerImpl.java:7) at androidx.test.espresso.base.UiControllerImpl.loopUntil (UiControllerImpl.java:1) at androidx.test.espresso.base.UiControllerImpl.injectMotionEvent (UiControllerImpl.java:5) at androidx.test.espresso.action.MotionEvents.sendUp (MotionEvents.java:6) at androidx.test.espresso.action.MotionEvents.sendUp (MotionEvents.java:1) at androidx.test.espresso.action.Tap.sendSingleTap (Tap.java:5) at androidx.test.espresso.action.Tap.-$$Nest$smsendSingleTap (Unknown Source) at androidx.test.espresso.action.Tap$1.sendTap (Tap.java:1) at androidx.test.espresso.action.GeneralClickAction.perform (GeneralClickAction.java:4) at androidx.test.espresso.ViewInteraction$SingleExecutionViewAction.perform (ViewInteraction.java:2) at androidx.test.espresso.ViewInteraction.doPerform (ViewInteraction.java:23) at androidx.test.espresso.ViewInteraction.-$$Nest$mdoPerform (Unknown Source) at androidx.test.espresso.ViewInteraction$1.call (ViewInteraction.java:6) at androidx.test.espresso.ViewInteraction$1.call (ViewInteraction.java:1) at java.util.concurrent.FutureTask.run (FutureTask.java:264) at android.os.Handler.handleCallback (Handler.java:942) at android.os.Handler.dispatchMessage (Handler.java:99) at android.os.Looper.loopOnce (Looper.java:201) at android.os.Looper.loop (Looper.java:288) at android.app.ActivityThread.main (ActivityThread.java:7898) at java.lang.reflect.Method.invoke at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:548) at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:936) Caused by java.lang.reflect.InvocationTargetException: at java.lang.reflect.Method.invoke at android.view.View$DeclaredOnClickListener.onClick (View.java:6320) Caused by java.lang.NullPointerException: Attempt to read from field 'int com.vagell.kv4pht.data.ChannelMemory.memoryId' on a null object reference in method 'void com.vagell.kv4pht.radio.RadioAudioService.nextScan()' at com.vagell.kv4pht.radio.RadioAudioService.nextScan (RadioAudioService.java:816) at com.vagell.kv4pht.radio.RadioAudioService.setScanning (RadioAudioService.java:771) at com.vagell.kv4pht.ui.MainActivity.scanClicked (MainActivity.java:1260)