Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash when using Japanese thumb-key #858

Closed
6 of 7 tasks
K0baU opened this issue Apr 24, 2024 · 1 comment
Closed
6 of 7 tasks

Crash when using Japanese thumb-key #858

K0baU opened this issue Apr 24, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@K0baU
Copy link
Contributor

K0baU commented Apr 24, 2024

Steps to reproduce

1.activate japanese hiragana or katakana thumb-key.
2.open the keyboard.

Expected behavior

This should open japanese keyboard.

Actual behavior

the app crashes.

version of the program

3.1.0

Android version

Android 13

Device

Google Pixel 4

Other details

japanese type-split doesn't cause crash.

Acknowledgements

  • I have written a short but informative title.
  • I have updated the app to the latest version.
  • I have searched the existing issues and this is a new one, NOT a duplicate or related to another open issue.
  • This is not a question or a discussion, in which case I should have gone to lemmy.ml/c/thumbkey
  • This is a single bug report, in case of multiple bugs I will open a separate issue for each one (they can always link to each other if related)
  • I have admitted that I am a clown by having checked this box, as I have not read these acknowledgements. 🤡
  • I have filled out all of the requested information in this form.
@K0baU K0baU added the bug Something isn't working label Apr 24, 2024
@glm4610
Copy link
Contributor

glm4610 commented Apr 24, 2024

Confirmed crash on debug app, on a Xiaomi Redmi Note 8 Pro running MIUI 12 (android 11)

Here's the stack trace:

FATALEXCEPTION: main
Process: com.dessalines.thumbkey.debug, PID: 19748
java.lang.ArrayIndexOutOfBoundsException: length=3; index=3
at java.util.Arrays$ArrayList.get(Arrays.java:3766)
at com.dessalines.thumbkey.ui.components.keyboard.KeyboardScreenKt.KeyboardScreen(KeyboardScreen.kt:444)
at com.dessalines.thumbkey.ComposeKeyboardView$Content$1.invoke(ComposeKeyboardView.kt:33)
at com.dessalines.thumbkey.ComposeKeyboardView$Content$1.invoke(ComposeKeyboardView.kt:32)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:109)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35)
at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:248)
at androidx.compose.material3.TextKt.ProvideTextStyle(Text.kt:352)
at androidx.compose.material3.MaterialThemeKt$MaterialTheme$1.invoke(MaterialTheme.kt:72)
at androidx.compose.material3.MaterialThemeKt$MaterialTheme$1.invoke(MaterialTheme.kt:71)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:109)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35)
at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:228)
at androidx.compose.material3.MaterialThemeKt.MaterialTheme(MaterialTheme.kt:64)
at com.dessalines.thumbkey.ui.theme.ThemeKt.ThumbkeyTheme(Theme.kt:62)
at com.dessalines.thumbkey.ComposeKeyboardView.Content(ComposeKeyboardView.kt:30)
at com.dessalines.thumbkey.ComposeKeyboardView$Content$2.invoke(Unknown Source:10)
at com.dessalines.thumbkey.ComposeKeyboardView$Content$2.invoke(Unknown Source:10)
at androidx.compose.runtime.RecomposeScopeImpl.compose(RecomposeScopeImpl.kt:192)
at androidx.compose.runtime.ComposerImpl.recomposeToGroupEnd(Composer.kt:2556)
at androidx.compose.runtime.ComposerImpl.skipCurrentGroup(Composer.kt:2827)
at androidx.compose.runtime.ComposerImpl.doCompose(Composer.kt:3314)
at androidx.compose.runtime.ComposerImpl.recompose$runtime_release(Composer.kt:3265)
at androidx.compose.runtime.CompositionImpl.recompose(Composition.kt:940)
at androidx.compose.runtime.Recomposer.performRecompose(Recomposer.kt:1155)
at androidx.compose.runtime.Recomposer.access$performRecompose(Recomposer.kt:127)
at androidx.compose.runtime.Recomposer$runRecomposeAndApplyChanges$2$1.invoke(Recomposer.kt:583)
at androidx.compose.runtime.Recomposer$runRecomposeAndApplyChanges$2$1.invoke(Recomposer.kt:551)
at androidx.compose.ui.platform.AndroidUiFrameClock$withFrameNanos$2$callback$1.doFrame(AndroidUiFrameClock.android.kt:41)
at androidx.compose.ui.platform.AndroidUiDispatcher.performFrameDispatch(AndroidUiDispatcher.android.kt:109)
at androidx.compose.ui.platform.AndroidUiDispatcher.access$performFrameDispatch(AndroidUiDispatcher.android.kt:41)
at androidx.compose.ui.platform.AndroidUiDispatcher$dispatchCallback$1.doFrame(AndroidUiDispatcher.android.kt:69)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:973)
at android.view.Choreographer.doCallbacks(Choreographer.java:799)
at android.view.Choreographer.doFrame(Choreographer.java:730)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:960)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:236)
at android.app.ActivityThread.main(ActivityThread.java:8057)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:620)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1011)
Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [androidx.compose.runtime.PausableMonotonicFrameClock@30cc297, androidx.compose.ui.platform.MotionDurationScaleImpl@7830c84, StandaloneCoroutine{Cancelling}@2b4bc6d, AndroidUiDispatcher@1aba0a2]

glm4610 added a commit to glm4610/thumb-key that referenced this issue Apr 25, 2024
The bug was introduced in commit 0ab4b98 (Implement Drag-and-return & Circular drag (dessalines#854)). It was caused by an assumption that the numeric mode of a layout would have at least a one-to-one relation to its main or shifted modes. In this case, the Japanese main/shifted modes have more keys than the numeric mode, which caused an index error.
glm4610 added a commit to glm4610/thumb-key that referenced this issue Apr 25, 2024
The bug was introduced in commit 0ab4b98 (Implement Drag-and-return & Circular drag (dessalines#854)). It was caused by an assumption that the numeric mode of a layout would have at least a one-to-one relation to its main or shifted modes. In this case, the Japanese main/shifted modes have more keys than the numeric mode, which caused an index error.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants