Skip to content

fix: avoid crash opening large text files in built-in editor - #655

Open
xhon-pelushi wants to merge 2 commits into
cryptomator:mainfrom
xhon-pelushi:fix/654-large-text-file-editor-crash
Open

fix: avoid crash opening large text files in built-in editor#655
xhon-pelushi wants to merge 2 commits into
cryptomator:mainfrom
xhon-pelushi:fix/654-large-text-file-editor-crash

Conversation

@xhon-pelushi

Copy link
Copy Markdown

Prevent OutOfMemory/crash when opening large text files in the built-in editor.

Fixes #654

Test plan

  • Review diff against issue
  • Run project lint/tests if applicable

SailReal and others added 2 commits July 31, 2026 17:38
BrowseFilesPresenter.viewFile() routed .txt/.md/.todo files to the
built-in text editor with no size check. TextEditorPresenter reads
the whole file into a String for the EditText, so memory use scales
with file size; a ~15 MB file kills the process and locks all vaults.

Skip the internal editor for files above 2 MiB and fall back to
opening them with an external app instead, matching the existing
behavior for other unsupported file types.

Fixes cryptomator#654
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants