Futsch1 / medTimer

MedTimer Android app
MIT License
101 stars 11 forks source link

Crash when adding a new drug and setting a reminder #94

Closed anyoneyun closed 5 months ago

anyoneyun commented 5 months ago

Hi, the app continues to crash when a new drug is added and a new reminder is set. I'm on latest GrapheneOS stable version. App version: 1.7.2 Here are the logs:

--------- beginning of crash 1713952234.186 27938 27938 E AndroidRuntime: FATAL EXCEPTION: main 1713952234.186 27938 27938 E AndroidRuntime: Process: com.futsch1.medtimer, PID: 27938 1713952234.186 27938 27938 E AndroidRuntime: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.isEmpty()' on a null object reference 1713952234.186 27938 27938 E AndroidRuntime: at com.futsch1.medtimer.medicine.ReminderViewHolder.getAdvancedSettingsSummary(ReminderViewHolder.java:91) 1713952234.186 27938 27938 E AndroidRuntime: at com.futsch1.medtimer.medicine.ReminderViewHolder.bind(ReminderViewHolder.java:69) 1713952234.186 27938 27938 E AndroidRuntime: at com.futsch1.medtimer.medicine.ReminderViewAdapter.onBindViewHolder(ReminderViewAdapter.java:42) 1713952234.186 27938 27938 E AndroidRuntime: at com.futsch1.medtimer.medicine.ReminderViewAdapter.onBindViewHolder(ReminderViewAdapter.java:13) 1713952234.186 27938 27938 E AndroidRuntime: at androidx.recyclerview.widget.RecyclerView$Adapter.onBindViewHolder(RecyclerView.java:7065) 1713952234.186 27938 27938 E AndroidRuntime: at androidx.recyclerview.widget.RecyclerView$Adapter.bindViewHolder(RecyclerView.java:7107) 1713952234.186 27938 27938 E AndroidRuntime: at androidx.recyclerview.widget.RecyclerView$Recycler.tryBindViewHolderByDeadline(RecyclerView.java:6012) 1713952234.186 27938 27938 E AndroidRuntime: at androidx.recyclerview.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(RecyclerView.java:6279) 1713952234.186 27938 27938 E AndroidRuntime: at androidx.recyclerview.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:6118) 1713952234.186 27938 27938 E AndroidRuntime: at androidx.recyclerview.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:6114) 1713952234.186 27938 27938 E AndroidRuntime: at androidx.recyclerview.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:2303) 1713952234.186 27938 27938 E AndroidRuntime: at androidx.recyclerview.widget.LinearLayoutManager.layoutChunk(LinearLayoutManager.java:1627) 1713952234.186 27938 27938 E AndroidRuntime: at androidx.recyclerview.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1587) 1713952234.186 27938 27938 E AndroidRuntime: at androidx.recyclerview.widget.LinearLayoutManager.onLayoutChildren(LinearLayoutManager.java:665) 1713952234.186 27938 27938 E AndroidRuntime: at androidx.recyclerview.widget.RecyclerView.dispatchLayoutStep2(RecyclerView.java:4134) 1713952234.186 27938 27938 E AndroidRuntime: at androidx.recyclerview.widget.RecyclerView.onMeasure(RecyclerView.java:3540) 1713952234.186 27938 27938 E AndroidRuntime: at android.view.View.measure(View.java:27423) 1713952234.186 27938 27938 E AndroidRuntime: at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:7018) 1713952234.186 27938 27938 E AndroidRuntime: at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1608) 1713952234.186 27938 27938 E AndroidRuntime: at android.widget.LinearLayout.measureVertical(LinearLayout.java:878) 1713952234.186 27938 27938 E AndroidRuntime: at android.widget.LinearLayout.onMeasure(LinearLayout.java:721) 1713952234.186 27938 27938 E AndroidRuntime: at android.view.View.measure(View.java:27423) 1713952234.186 27938 27938 E AndroidRuntime: at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:7018) 1713952234.186 27938 27938 E AndroidRuntime: at android.widget.FrameLayout.onMeasure(FrameLayout.java:194) 1713952234.186 27938 27938 E AndroidRuntime: at android.view.View.measure(View.java:27423) 1713952234.186 27938 27938 E AndroidRuntime: at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:7018) 1713952234.186 27938 27938 E AndroidRuntime: at android.widget.FrameLayout.onMeasure(FrameLayout.java:194) 1713952234.186 27938 27938 E AndroidRuntime: at android.view.View.measure(View.java:27423) 1713952234.186 27938 27938 E AndroidRuntime: at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:7018) 1713952234.186 27938 27938 E AndroidRuntime: at android.widget.FrameLayout.onMeasure(FrameLayout.java:194) 1713952234.186 27938 27938 E AndroidRuntime: at android.view.View.measure(View.java:27423) 1713952234.186 27938 27938 E AndroidRuntime: at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:7018) 1713952234.186 27938 27938 E AndroidRuntime: at androidx.coordinatorlayout.widget.CoordinatorLayout.onMeasureChild(CoordinatorLayout.java:760) 1713952234.186 27938 27938 E AndroidRuntime: at androidx.coordinatorlayout.widget.CoordinatorLayout.onMeasure(CoordinatorLayout.java:833) 1713952234.186 27938 27938 E AndroidRuntime: at android.view.View.measure(View.java:27423) 1713952234.186 27938 27938 E AndroidRuntime: at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:7018) 1713952234.186 27938 27938 E AndroidRuntime: at android.widget.FrameLayout.onMeasure(FrameLayout.java:194) 1713952234.186 27938 27938 E AndroidRuntime: at androidx.appcompat.widget.ContentFrameLayout.onMeasure(ContentFrameLayout.java:145) 1713952234.186 27938 27938 E AndroidRuntime: at android.view.View.measure(View.java:27423) 1713952234.186 27938 27938 E AndroidRuntime: at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:7018) 1713952234.186 27938 27938 E AndroidRuntime: at androidx.appcompat.widget.ActionBarOverlayLayout.onMeasure(ActionBarOverlayLayout.java:496) 1713952234.186 27938 27938 E AndroidRuntime: at android.view.View.measure(View.java:27423) 1713952234.186 27938 27938 E AndroidRuntime: at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:7018) 1713952234.186 27938 27938 E AndroidRuntime: at android.widget.FrameLayout.onMeasure(FrameLayout.java:194) 1713952234.186 27938 27938 E AndroidRuntime: at android.view.View.measure(View.java:27423) 1713952234.186 27938 27938 E AndroidRuntime: at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:7018) 1713952234.186 27938 27938 E AndroidRuntime: at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1608) 1713952234.186 27938 27938 E AndroidRuntime: at android.widget.LinearLayout.measureVertical(LinearLayout.java:878) 1713952234.186 27938 27938 E AndroidRuntime: at android.widget.LinearLayout.onMeasure(LinearLayout.java:721) 1713952234.186 27938 27938 E AndroidRuntime: at android.view.View.measure(View.java:27423) 1713952234.186 27938 27938 E AndroidRuntime: at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:7018) 1713952234.186 27938 27938 E AndroidRuntime: at android.widget.FrameLayout.onMeasure(FrameLayout.java:194) 1713952234.186 27938 27938 E AndroidRuntime: at com.android.internal.policy.DecorView.onMeasure(DecorView.java:768) 1713952234.186 27938 27938 E AndroidRuntime: at android.view.View.measure(View.java:27423) 1713952234.186 27938 27938 E AndroidRuntime: at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:4409) 1713952234.186 27938 27938 E AndroidRuntime: at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:2953) 1713952234.186 27938 27938 E AndroidRuntime: at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:3289) 1713952234.186 27938 27938 E AndroidRuntime: at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:2659) 1713952234.186 27938 27938 E AndroidRuntime: at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:9789) 1713952234.186 27938 27938 E AndroidRuntime: at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1399) 1713952234.186 27938 27938 E AndroidRuntime: at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1408) 1713952234.186 27938 27938 E AndroidRuntime: at android.view.Choreographer.doCallbacks(Choreographer.java:1008) 1713952234.186 27938 27938 E AndroidRuntime: at android.view.Choreographer.doFrame(Choreographer.java:938) 1713952234.186 27938 27938 E AndroidRuntime: at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1382) 1713952234.186 27938 27938 E AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:959) 1713952234.186 27938 27938 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:100) 1713952234.186 27938 27938 E AndroidRuntime: at android.os.Looper.loopOnce(Looper.java:232) 1713952234.186 27938 27938 E AndroidRuntime: at android.os.Looper.loop(Looper.java:317) 1713952234.186 27938 27938 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:8532) 1713952234.186 27938 27938 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method) 1713952234.186 27938 27938 E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552) 1713952234.186 27938 27938 E AndroidRuntime: at com.android.internal.os.ExecInit.main(ExecInit.java:50) 1713952234.186 27938 27938 E AndroidRuntime: at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method) 1713952234.186 27938 27938 E AndroidRuntime: at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:359)

Futsch1 commented 5 months ago

Thanks for the bug report with the crash log. I have just fixed it in v1.7.3