Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

ver 1.4 crashed as start #4

Closed
HQP2022 opened this issue Oct 19, 2022 · 2 comments
Closed

ver 1.4 crashed as start #4

HQP2022 opened this issue Oct 19, 2022 · 2 comments
Assignees
Labels
help wanted Extra attention is needed

Comments

@HQP2022
Copy link
Collaborator

HQP2022 commented Oct 19, 2022

G:>java -jar i-ncript-1.4.0.jar
Exception in thread "Thread-2" java.lang.OutOfMemoryError: Java heap space
at java.base/com.sun.crypto.provider.CipherCore.prepareInputBuffer(CipherCore.java:908)
at java.base/com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:730)
at java.base/com.sun.crypto.provider.AESCipher.engineDoFinal(AESCipher.java:436)
at java.base/javax.crypto.Cipher.doFinal(Cipher.java:2205)
at com.i_comit.windows.AES.doCrypto(AES.java:76)
at com.i_comit.windows.AES.encrypt(AES.java:44)
at com.i_comit.windows.AES_T.lambda$AESQuery$0(AES.java:136)
at com.i_comit.windows.AES_T$$Lambda$148/0x0000000800d48b40.accept(Unknown Source)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
at com.i_comit.windows.AES_T.AESQuery(AES.java:134)
at com.i_comit.windows.AES.lambda$AESThread$0(AES.java:32)
at com.i_comit.windows.AES$$Lambda$136/0x0000000800d47a58.run(Unknown Source)
at java.base/java.lang.Thread.run(Thread.java:833)

@khiemgluong khiemgluong added the help wanted Extra attention is needed label Oct 20, 2022
@khiemgluong khiemgluong self-assigned this Oct 20, 2022
@khiemgluong khiemgluong pinned this issue Oct 20, 2022
@khiemgluong
Copy link
Member

This is an issue of the file size being too big. Will work on it

@khiemgluong
Copy link
Member

Closing issue because it is fixed with release 1.4.4. It was because I called the progress bar thread twice, one in the HotFiler class and one in the AES class.

If the OutOfMemoryError issue persists, that is an issue of your heap size not big enough (When you start the app via cmd it will tell you your heap size).

To fix this, run the app via command line but also add the -Xms flag like so: java -Xms1g -Xms2g -jar i-ncript-1.4.4-jar-with-dependencies.jar (for release 1.4.4).

-Xms1g means that the initial heap size is 1GB (1g) and you can also say -Xms512m (512GB).
-Xmx2g means that the maximum heap size is 2GB(2g).

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants