Skip to content

Keyboard crash on language switch #288

Description

@Mokhyy

Issue description:
Since version 3.9.8, a bug has been introduced causing the keyboard to momentarily freeze whenever the language is switched. (This issue was not present in 3.9.7).

Investigation:
Initially, I suspected it was an issue with importing my settings, but upon closer inspection, I realized the stuttering is related to dictionary loading. It seems that every time the language is switched, the dictionary is removed from memory and reloaded. Switching languages multiple times leads to a full keyboard crash.

Proposed solution:
I believe you should switch the dictionary loading process to an async task to prevent the main thread from blocking and causing these UI freezes.

Technical details:
I tested two scenarios:

  1. Without imported dictionary: The keyboard stutters after switching languages multiple times but does not crash (likely due to the English dictionary still being loaded).
  2. With imported Persian dictionary: The keyboard triggers an "Application Not Responding" (ANR) error and crashes after only 1 or 2 switches.
    (The Persian dictionary is 12MB. )

version: 3.9.8
Device: poco x6 pro
OS: android 15( hyperos 2.0.209)


By the way, congratulations! The glide typing engine is working really well. Its startup speed is a bit slow, which I assume is also due to the dictionary loading bottleneck. Fixing the issue mentioned above should resolve this as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions