swipe left or right in WithFragment lead to crash
See original GitHub issueDescribe the bug app crash when i want to go next 3 days or previous days (or weeks) in WithFragment
To Reproduce Steps to reproduce the behavior:
- Go to ‘With Fragment’
- swipe left or right
- crash
Additional context
- Android version: 11 (Android emulator)
- WeekView version: latest commit on master (fcc9ecf)
Logcat
2021-06-08 15:25:12.451 6769-6769/com.alamkanak.weekview E/InputEventReceiver: Exception dispatching input event.
2021-06-08 15:25:12.451 6769-6769/com.alamkanak.weekview D/AndroidRuntime: Shutting down VM
2021-06-08 15:25:12.459 6769-6769/com.alamkanak.weekview E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.alamkanak.weekview, PID: 6769
java.lang.IllegalArgumentException: Cannot coerce value to an empty range: maximum -2076.6665 is less than minimum 5933.333.
at kotlin.ranges.RangesKt___RangesKt.coerceIn(_Ranges.kt:1131)
at com.alamkanak.weekview.Navigator.scrollHorizontallyBy(Navigator.kt:23)
at com.alamkanak.weekview.WeekViewGestureHandler.onScroll(WeekViewGestureHandler.kt:68)
at android.view.GestureDetector.onTouchEvent(GestureDetector.java:714)
at com.alamkanak.weekview.WeekViewGestureHandler.onTouchEvent(WeekViewGestureHandler.kt:172)
at com.alamkanak.weekview.WeekView.onTouchEvent(WeekView.kt:1193)
at android.view.View.dispatchTouchEvent(View.java:14309)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3118)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2799)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3118)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2799)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3118)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2799)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3118)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2799)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3118)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2799)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3118)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2799)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3118)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2799)
at com.android.internal.policy.DecorView.superDispatchTouchEvent(DecorView.java:488)
at com.android.internal.policy.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1871)
at android.app.Activity.dispatchTouchEvent(Activity.java:4125)
at androidx.appcompat.view.WindowCallbackWrapper.dispatchTouchEvent(WindowCallbackWrapper.java:69)
at com.android.internal.policy.DecorView.dispatchTouchEvent(DecorView.java:446)
at android.view.View.dispatchPointerEvent(View.java:14568)
at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:6016)
at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:5819)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:5310)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:5367)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:5333)
at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:5485)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:5341)
at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:5542)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:5314)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:5367)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:5333)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:5341)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:5314)
at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:8080)
at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:8031)
at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:7992)
at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:8203)
at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:220)
at android.view.InputEventReceiver.nativeConsumeBatchedInputEvents(Native Method)
at android.view.InputEventReceiver.consumeBatchedInputEvents(InputEventReceiver.java:200)
at android.view.ViewRootImpl.doConsumeBatchedInput(ViewRootImpl.java:8160)
at android.view.ViewRootImpl$ConsumeBatchedInputRunnable.run(ViewRootImpl.java:8242)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:972)
2021-06-08 15:25:12.464 6769-6769/com.alamkanak.weekview E/AndroidRuntime: at android.view.Choreographer.doCallbacks(Choreographer.java:796)
at android.view.Choreographer.doFrame(Choreographer.java:724)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:957)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7656)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
swipe left or right in WithFragment lead to crash
swipe left or right in WithFragment lead to crash.
Read more >Why does my home screen crash to black when I navigate ...
For several weeks now, I run into an intermittent bug where I swipe left on my home screen and I get a black...
Read more >swipe back from a viewpager causes the app to crash
The problem is that whenever I swipe to the 3rd view pager, and then swipe back, the app crashes, but switching between the...
Read more >Crashing when swiping left (Build 40) : r/smartlauncher
Correction: my swipe left gesture is to search by index. Using search by index in tha app drawer also crashes SL.
Read more >Add new fragment cause crash with fragment-ktx:1.3.0-beta01
Steps to reproduce is pretty simple: from fragment1 navigate to fragment2 (sometimes back to fragment1) using buttons on right pane and then hit...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for the screen recording! I’ll fix the issues in RTL mode before the next release.
I tested again on Android 11 both Force-RTL and Persian language have this problem. branch: master HEAD commit: 48b4d4b639243c0a22e2f0fb6b65b396c376ddcf