Closed songhu42 closed 3 years ago
Can you provide file(s) that demonstrate the problem? Even the results of a gdalinfo
dump may help.
Also, what do you have set for your Dalvik heap size to?
This implementation loads the entire tiff file into memory for raster random read access. Your reported error occurred attempting to copy the file into memory. Allocation of ~537mb with a growth limit of ~537mb.
Try increasing the heap size.
Please fill out as much known and relevant information as possible.
Version Information:
Expected Results:
What did you expect to happen? Open the big tif file : TiffReader.readTiff(tiffFile)
Observed Results:
What happened instead? AndroidRuntime: FATAL EXCEPTION: Thread-19 java.lang.OutOfMemoryError: Failed to allocate a 536870928 byte allocation with 25165824 free bytes and 234MB until OOM, target footprint 316450016, growth limit 536870912
How often does this occur? Always
Output:
Any logs, errors, or output messages? java.lang.OutOfMemoryError: Failed to allocate a 536870928 byte allocation with 25165824 free bytes and 234MB until OOM, target footprint 316450016, growth limit 536870912 at java.util.Arrays.copyOf(Arrays.java:3161) at java.io.ByteArrayOutputStream.grow(ByteArrayOutputStream.java:118) at java.io.ByteArrayOutputStream.ensureCapacity(ByteArrayOutputStream.java:93) at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:153) at mil.nga.tiff.io.IOUtils.copyStream(IOUtils.java:104) at mil.nga.tiff.io.IOUtils.streamBytes(IOUtils.java:83) at mil.nga.tiff.io.IOUtils.fileBytes(IOUtils.java:67) at mil.nga.tiff.TiffReader.readTiff(TiffReader.java:51) at mil.nga.tiff.TiffReader.readTiff(TiffReader.java:35) at com.mvsoftech.mvgis.forestServices.DemFinder$2.run(DemFinder.java:49) at java.lang.Thread.run(Thread.java:919)
Steps to Reproduce:
Relevant Code:
Test Files:
Additional Information: