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

Mobile: Possible memory leak in FsDriver.readFileChunk (affects plugin loading) #10244

Open
personalizedrefrigerator opened this issue Apr 1, 2024 · 2 comments
Labels
bug It's a bug mobile All mobile platforms upstream There's a problem with upstream code.

Comments

@personalizedrefrigerator
Copy link
Collaborator

personalizedrefrigerator commented Apr 1, 2024

Operating system

iOS

Joplin version

3.0.2

Desktop version info

No response

Current behaviour

Joplin may crash when attempting to load a very large plugin file. (Note: The largest published plugin is about 35 MB).

See #10243 (comment):

*This currently works with Android, testing with larger chunks leads to crashes since Joplin uses RNFS.read which has an unresolved memory leak, my approach works despite the memory leak because Joplin doesn't allow the attachment of +200MB on mobile.

Also see this comment on Joplin's Discord and the upstream issue.

Expected behaviour

It should be possible to quickly work with chunks of large data through FsDriver.readFileChunk.

Logs

No response

@personalizedrefrigerator personalizedrefrigerator added bug It's a bug mobile All mobile platforms upstream There's a problem with upstream code. labels Apr 1, 2024
@personalizedrefrigerator
Copy link
Collaborator Author

@personalizedrefrigerator personalizedrefrigerator changed the title Memory leak in FsDriver.readFileChunk (affects plugin loading) Mobile: Possible memory leak in FsDriver.readFileChunk (affects plugin loading) Apr 2, 2024
@7adidaz
Copy link

7adidaz commented Apr 3, 2024

Note that RNFetchBlob.fs.readStream may have a similar issue.

it seems like the suggestion of adding readStream will not add anything new since all roads lead to memory leaks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug It's a bug mobile All mobile platforms upstream There's a problem with upstream code.
Projects
None yet
Development

No branches or pull requests

2 participants