tomdoel / pulmonarytoolkit

Lung medical image analysis and visualisation software for Matlab.
GNU General Public License v3.0
84 stars 57 forks source link

Java Heap space #60

Closed V1ncenttt closed 2 weeks ago

V1ncenttt commented 2 weeks ago

Hi! Thanks for your work. When I try to load a volume in the GUI, i get the following Java error: Unable to extract region of interest from this dataset. Error: Java exception occurred:

java.lang.OutOfMemoryError: Java heap space
    at java.util.Arrays.copyOf(Unknown Source)
    at java.io.ByteArrayOutputStream.grow(Unknown Source)
    at java.io.ByteArrayOutputStream.ensureCapacity(Unknown Source)
    at java.io.ByteArrayOutputStream.write(Unknown Source)
    at com.mathworks.mlwidgets.io.InterruptibleStreamCopier.copyStream(InterruptibleStreamCopier.java:74)
    at com.mathworks.mlwidgets.io.InterruptibleStreamCopier.copyStream(InterruptibleStreamCopier.java:51)
Failed to load dataset due to error: Java exception occurred: 
java.lang.OutOfMemoryError: Java heap space
Failed to load dataset due to error: Java exception occurred: 
java.lang.OutOfMemoryError: Java heap space

Do you have any idea why it happens? Thank you very much.

V1ncenttt commented 2 weeks ago

Found the solution for anyone encountering the same problem: create a file called java.opts in /usr/local/MATLAB/MATLAB_Runtime/v92/bin/glnxa64/ and write -Xmx[nb of gbs]g in the file. That will increase the java heap size