Skip to content
This repository was archived by the owner on Feb 23, 2021. It is now read-only.
This repository was archived by the owner on Feb 23, 2021. It is now read-only.

File cryptor OOM #3

Open
Open

Description

@WMariusz

When i encrypt and decrypt large image file (14M jpg image) to app i receive OutOfMemory exception.

java.lang.OutOfMemoryError: Failed to allocate a 49962864 byte allocation with 10213504 free bytes and 9MB until OOM
at java.lang.StringFactory.newStringFromChars(Native Method)
at java.lang.StringFactory.newStringFromChars(StringFactory.java:218)
at java.lang.StringFactory.newStringFromBytes(StringFactory.java:203)
at java.lang.StringFactory.newStringFromBytes(StringFactory.java:53)
at java.lang.StringFactory.newStringFromBytes(StringFactory.java:45)
at tgio.rncryptor.RNCryptorNative.decryptFile(RNCryptorNative.java:114)
at pl.edicom.jncr.cryptor.NativeCryptor.decryptFile(NativeCryptor.kt:33)

On JNCryptor library there was AES256JNCryptorOutputStream and AES256JNCryptorInputStream that helped me to rewrite file with buffer. I tried find any solution in C implementation but i found non.

ps. thanks for add file support 👍

Activity

  1. added this to the release 1.0 milestone on May 30, 2016
  2. self-assigned this
    on May 30, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions