Skip to content

App crashes when opening a large text file in the built-in editor #654

Description

@tobihagemann

Please agree to the following

Summary

Opening a large (~15 MB) .txt file in the built-in text editor kills the app process. All vaults are locked afterwards and the password has to be entered again.

System Setup

- Android: not specified by the reporter
- Cryptomator: 2.0.0

Steps to Reproduce

  1. Unlock a vault
  2. Open a .txt file of roughly 15 MB stored in it
  3. Tapping the file routes it to the built-in text editor

Expected Behavior

The file opens, or the app reports that it is too large for the built-in editor and offers to open it with another app.

Actual Behavior

The app terminates and restarts. Because the process dies, all vaults are locked and the password must be entered again. No error message is shown.

Reproducibility

Always

Relevant Log Output

(no debug log supplied yet)

Anything else?

Files ending in .txt, .md and .todo are always routed to the built-in editor in BrowseFilesPresenter.viewFile(), with no size check and no way to opt out. TextEditorPresenter.loadFileContent() reads the whole file into a single String via FileCacheUtils.read() and hands it to the EditText, so memory use scales with file size — and again on save via binding.textEditor.text.toString(). This is consistent with an OutOfMemoryError on a file of this size.

Possibly related: #588 (text editor performance on large files).

Additional Context

Reported via support ticket. Awaiting developer confirmation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    state:to-be-confirmedWe are trying to confirm the reported behaviortype:bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions