question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Whole-word swipe-deletion crashes app when swiping text with only numbers and symbols

See original GitHub issue

Edit by @patrickgold : This issue is the main discussion area for fixing word deletion related stuff all at once, which have piled up. Below you can still see the original issue comment.


Description

When swipe-deleting in a text box that exclusively contains numbers and symbols, the keyboard crashes. If the text box contains any single letter, the keyboard doesn’t immediately crash. The error doesn’t occur on per-character swipe-deletion.

Somehow related to #547. This issue is also somehow related to #1076, which is likely sufficiently different to this issue that this issue being a separate one is justified.

Steps to reproduce

  1. Go to a text box where typing text is possible.
  2. Type 123456789@#$%&-+()/*"':;!?.
  3. Focus the cursor on the very end of the text box.
  4. Swipe the delete button to the left.

Environment information

  • FlorisBoard Version: 0.3.13-beta08 (51)
  • Android: 10 (cn=Q sdk=29)

Features enabled

smartbar = true
suggestions = false
suggestions_clipboard = true
suggestions_next_word = false
glide = false
clipboard_internal = false
clipboard_history = false

Attached stacktrace files

1628111146794.stacktrace
java.util.NoSuchElementException: List is empty.
	at kotlin.collections.CollectionsKt___CollectionsKt.last(_Collections.kt:416)
	at dev.patrickgold.florisboard.ime.core.EditorInstance.leftAppendWordToSelection(EditorInstance.kt:419)
	at dev.patrickgold.florisboard.ime.text.keyboard.TextKeyboardView.handleDeleteSwipe(TextKeyboardView.kt:651)
	at dev.patrickgold.florisboard.ime.text.keyboard.TextKeyboardView.onSwipe(TextKeyboardView.kt:585)
	at dev.patrickgold.florisboard.ime.text.gestures.SwipeGesture$Detector.onTouchMove(SwipeGesture.kt:136)
	at dev.patrickgold.florisboard.ime.text.keyboard.TextKeyboardView.onTouchEventInternal(TextKeyboardView.kt:330)
	at dev.patrickgold.florisboard.ime.keyboard.KeyboardView$1.invokeSuspend(KeyboardView.kt:52)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTaskKt.resume(DispatchedTask.kt:227)
	at kotlinx.coroutines.DispatchedTaskKt.resumeUnconfined(DispatchedTask.kt:190)
	at kotlinx.coroutines.DispatchedTaskKt.dispatch(DispatchedTask.kt:161)
	at kotlinx.coroutines.CancellableContinuationImpl.dispatchResume(CancellableContinuationImpl.kt:362)
	at kotlinx.coroutines.CancellableContinuationImpl.completeResume(CancellableContinuationImpl.kt:479)
	at kotlinx.coroutines.channels.AbstractChannel$ReceiveHasNext.completeResumeReceive(AbstractChannel.kt:940)
	at kotlinx.coroutines.channels.ArrayChannel.offerInternal(ArrayChannel.kt:84)
	at kotlinx.coroutines.channels.AbstractSendChannel.offer(AbstractChannel.kt:141)
	at kotlinx.coroutines.channels.ChannelsKt__ChannelsKt.sendBlocking(Channels.kt:21)
	at kotlinx.coroutines.channels.ChannelsKt.sendBlocking(Unknown Source:1)
	at dev.patrickgold.florisboard.ime.keyboard.KeyboardView.onTouchEvent(KeyboardView.kt:83)
	at android.view.View.dispatchTouchEvent(View.java:13620)
	at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3125)
	at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2774)
	at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3131)
	at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2788)
	at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3131)
	at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2788)
	at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3131)
	at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2788)
	at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3131)
	at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2788)
	at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3131)
	at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2788)
	at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3131)
	at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2788)
	at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3131)
	at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2788)
	at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3131)
	at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2788)
	at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3131)
	at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2788)
	at com.android.internal.policy.DecorView.superDispatchTouchEvent(DecorView.java:506)
	at com.android.internal.policy.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1857)
	at android.app.Dialog.dispatchTouchEvent(Dialog.java:873)
	at android.inputmethodservice.SoftInputWindow.dispatchTouchEvent(SoftInputWindow.java:152)
	at com.android.internal.policy.DecorView.dispatchTouchEvent(DecorView.java:456)
	at android.view.View.dispatchPointerEvent(View.java:13884)
	at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:6202)
	at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:5940)
	at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:5393)
	at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:5453)
	at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:5412)
	at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:5577)
	at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:5420)
	at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:5634)
	at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:5393)
	at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:5453)
	at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:5412)
	at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:5420)
	at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:5393)
	at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:8343)
	at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:8312)
	at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:8263)
	at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:8482)
	at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:188)
	at android.view.InputEventReceiver.nativeConsumeBatchedInputEvents(Native Method)
	at android.view.InputEventReceiver.consumeBatchedInputEvents(InputEventReceiver.java:178)
	at android.view.ViewRootImpl.doConsumeBatchedInput(ViewRootImpl.java:8429)
	at android.view.ViewRootImpl$ConsumeBatchedInputRunnable.run(ViewRootImpl.java:8506)
	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1056)
	at android.view.Choreographer.doCallbacks(Choreographer.java:880)
	at android.view.Choreographer.doFrame(Choreographer.java:800)
	at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1041)
	at android.os.Handler.handleCallback(Handler.java:883)
	at android.os.Handler.dispatchMessage(Handler.java:100)
	at android.os.Looper.loop(Looper.java:227)
	at android.app.ActivityThread.main(ActivityThread.java:7822)
	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:1026)

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
patrickgoldcommented, Aug 20, 2021

Other than that, I’ve changed #548’s title, as I’ve now just realized that its title makes it sound like a bug when the issue itself sounds more like a proposal (and an opinionated one at that) for partial/precise symbol selection.

Perfect, we will work on #548 on a later stage then. As for the word deletion, I will merge the changes now in so I can work on fixing some other things for 0.3.13 stable next week, thanks for testing the debug build out!

1reaction
Glitchy-Toziercommented, Aug 14, 2021

@Glitchy-Tozier do you know any other issues regarding current word/precise word deletion which are not on above list? I tried my best at searching all but I may have missed some.

I checked but couldn’t remember/find any additional ones.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Delete current word-function doesn't work · Issue #1072 - GitHub
Whole-word swipe-deletion crashes app when swiping text with only numbers and symbols #1130. Closed. Rework EditorInstance cached input and ...
Read more >
iMessage keeps crashing when typing to: - Apple Community
After typing three numbers or letters (sometimes more or sometimes less) in the to: bar, iMessage crashes. I have already updated to the...
Read more >
Identifying the cause of common crashes - Apple Developer
Overview. You can identify the causes for many app crashes by looking for specific patterns in the crash report and taking specific diagnostic...
Read more >
In iOS 15, when the app is restarted, it immediately crashes.
After the iOS 15 update, the following process causes the app to die. ... last one will crash on immediate restart after force...
Read more >
Diagnosing issues using crash reports and device logs
To debug a problem using a crash report: Build your app with symbol information and retain the Xcode archive before distributing the app....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found