Skip to content

[Bug] This MRE triggers ANR when opened in Editor #247

@GfEW

Description

@GfEW

Affected: Editor v1.96 (no other versions tested)
Platform(s): Android 9 to 11
Device(s): diverse

How to reproduce

  1. Rename both attached shell script files to *.sh by removing their ".txt" extensions (which I added for github to allow the upload)
  2. In Editor, make sure the option "Highlight Syntax" is enabled
  3. In Editor, open the smaller of the two attached files (minimal reproducible example, 57 B).

What happens?

Editor immediately gets unresponsive, hogs one CPU core and, as soon as any interaction (e. g. typing) is attempted, runs into ANR.

What should happen instead?

The file should be syntax-highlighted and, after Ctrl+E, editable without problems.

Additional remarks

  • Alternatively, open the other attached example file (169 B) and follow the advice written therein, to manually trigger the bug and temporally separate it from file loading.
  • I have included a shebang at line 1 In both examples to make them more realistic, but that line is optional. Provided the filename doesn't make Editor skip syntax highlighting alltogether (like with *.txt), lines 2 and 3 of either example suffice to reproduce the bug in any text file.

file1.sh.txt (57 B)
file2.sh.txt (169 B)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions