Skip to content
This repository has been archived by the owner on Oct 26, 2023. It is now read-only.

Crash when pressing 'Back' button on home screen #161

Open
Miepee opened this issue Feb 14, 2022 · 1 comment
Open

Crash when pressing 'Back' button on home screen #161

Miepee opened this issue Feb 14, 2022 · 1 comment

Comments

@Miepee
Copy link

Miepee commented Feb 14, 2022

Device Info

  • Brand: Huawei
  • Model name: Honor 6x (BLN-21)
  • Android version: Stock, 7.0
  • Alamrio version: 1.0.5, F-Droid

Steps to Reproduce

  • Download the app
  • Start the app and wait until it shows your alarms
  • Click on the 'Back' button

I could reproduce this reliably, then I went to the settings -> about to gather the version number and now I can't reproduce this anymore. And since I didn't copy the stack trace at first, I can't post it here, sorry. Only thing I remember is that an illegalStateException was thrown.

@Miepee
Copy link
Author

Miepee commented Feb 22, 2022

I got this to replicate again!
Out of the blue I got a "Stopwatch: 0:00:00" notification, even tho i didn't have a stopwatch running. I clicked on it, was brought to the stopwatch screen which made the notification disappear. And pressing back a few times from here, got me the crash. Am in the state now where every time I press back from the home screen Alarmio crashes again.

Here's the stack trace (click to expand)
java.lang.IllegalStateException: Not attached
	at com.afollestad.aesthetic.Aesthetic.getSafePrefsEditor(Aesthetic.kt:96)
	at com.afollestad.aesthetic.Aesthetic.isDark(Aesthetic.kt:120)
	at me.jfenn.alarmio.Alarmio.updateTheme(Alarmio.java:279)
	at me.jfenn.alarmio.data.preference.ThemePreferenceData$bindViewHolder$listener$1.onSunriseChanged(ThemePreferenceData.kt:80)
	at me.jfenn.alarmio.data.preference.ThemePreferenceData.bindViewHolder(ThemePreferenceData.kt:116)
	at me.jfenn.alarmio.data.preference.ThemePreferenceData.bindViewHolder(ThemePreferenceData.kt:34)
	at me.jfenn.alarmio.adapters.PreferenceAdapter.onBindViewHolder(PreferenceAdapter.java:26)
	at me.jfenn.alarmio.adapters.PreferenceAdapter.onBindViewHolder(PreferenceAdapter.java:11)
	at androidx.recyclerview.widget.RecyclerView$Adapter.onBindViewHolder(RecyclerView.java:7065)
	at androidx.recyclerview.widget.RecyclerView$Adapter.bindViewHolder(RecyclerView.java:7107)
	at androidx.recyclerview.widget.RecyclerView$Recycler.tryBindViewHolderByDeadline(RecyclerView.java:6012)
	at androidx.recyclerview.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(RecyclerView.java:6279)
	at androidx.recyclerview.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:6118)
	at androidx.recyclerview.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:6114)
	at androidx.recyclerview.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:2303)
	at androidx.recyclerview.widget.GridLayoutManager.layoutChunk(GridLayoutManager.java:561)
	at androidx.recyclerview.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1587)
	at androidx.recyclerview.widget.LinearLayoutManager.onLayoutChildren(LinearLayoutManager.java:665)
	at androidx.recyclerview.widget.GridLayoutManager.onLayoutChildren(GridLayoutManager.java:170)
	at androidx.recyclerview.widget.RecyclerView.dispatchLayoutStep2(RecyclerView.java:4134)
	at androidx.recyclerview.widget.RecyclerView.dispatchLayout(RecyclerView.java:3851)
	at androidx.recyclerview.widget.RecyclerView.onLayout(RecyclerView.java:4404)
	at android.view.View.layout(View.java:17702)
	at android.view.ViewGroup.layout(ViewGroup.java:5631)
	at android.widget.FrameLayout.layoutChildren(FrameLayout.java:325)
	at android.widget.FrameLayout.onLayout(FrameLayout.java:261)
	at android.view.View.layout(View.java:17702)
	at android.view.ViewGroup.layout(ViewGroup.java:5631)
	at androidx.viewpager.widget.ViewPager.onLayout(ViewPager.java:1775)
	at android.view.View.layout(View.java:17702)
	at android.view.ViewGroup.layout(ViewGroup.java:5631)
	at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1762)
	at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1606)
	at android.widget.LinearLayout.onLayout(LinearLayout.java:1515)
	at android.view.View.layout(View.java:17702)
	at android.view.ViewGroup.layout(ViewGroup.java:5631)
	at androidx.coordinatorlayout.widget.CoordinatorLayout.layoutChild(CoordinatorLayout.java:1213)
	at androidx.coordinatorlayout.widget.CoordinatorLayout.onLayoutChild(CoordinatorLayout.java:899)
	at com.google.android.material.bottomsheet.BottomSheetBehavior.onLayoutChild(BottomSheetBehavior.java:380)
	at androidx.coordinatorlayout.widget.CoordinatorLayout.onLayout(CoordinatorLayout.java:918)
	at android.view.View.layout(View.java:17702)
	at android.view.ViewGroup.layout(ViewGroup.java:5631)
	at android.widget.FrameLayout.layoutChildren(FrameLayout.java:325)
	at android.widget.FrameLayout.onLayout(FrameLayout.java:261)
	at android.view.View.layout(View.java:17702)
	at android.view.ViewGroup.layout(ViewGroup.java:5631)
	at android.widget.FrameLayout.layoutChildren(FrameLayout.java:325)
	at android.widget.FrameLayout.onLayout(FrameLayout.java:261)
	at android.view.View.layout(View.java:17702)
	at android.view.ViewGroup.layout(ViewGroup.java:5631)
	at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1762)
	at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1606)
	at android.widget.LinearLayout.onLayout(LinearLayout.java:1515)
	at android.view.View.layout(View.java:17702)
	at android.view.ViewGroup.layout(ViewGroup.java:5631)
	at android.widget.FrameLayout.layoutChildren(FrameLayout.java:325)
	at android.widget.FrameLayout.onLayout(FrameLayout.java:261)
	at android.view.View.layout(View.java:17702)
	at android.view.ViewGroup.layout(ViewGroup.java:5631)
	at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1762)
	at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1606)
	at android.widget.LinearLayout.onLayout(LinearLayout.java:1515)
	at android.view.View.layout(View.java:17702)
	at android.view.ViewGroup.layout(ViewGroup.java:5631)
	at android.widget.FrameLayout.layoutChildren(FrameLayout.java:325)
	at android.widget.FrameLayout.onLayout(FrameLayout.java:261)
	at com.android.internal.policy.DecorView.onLayout(DecorView.java:774)
	at android.view.View.layout(View.java:17702)
	at android.view.ViewGroup.layout(ViewGroup.java:5631)
	at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2519)
	at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2234)
	at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1372)
	at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6774)
	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:926)
	at android.view.Choreographer.doCallbacks(Choreographer.java:735)
	at android.view.Choreographer.doFrame(Choreographer.java:667)
	at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:912)
	at android.os.Handler.handleCallback(Handler.java:761)
	at android.os.Handler.dispatchMessage(Handler.java:98)
	at android.os.Looper.loop(Looper.java:156)
	at android.app.ActivityThread.main(ActivityThread.java:6517)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:942)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:832)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant