Opened 14 years ago
Closed 14 years ago
#1573 closed defect (fixed)
ERROR 2: CPLCalloc(): Out of memory allocating when importing EHdr/ESRI .hdr Labelled raster
Reported by: | epatton | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | 1.4.2 |
Component: | GDAL_Raster | Version: | 1.4.0 |
Severity: | normal | Keywords: | ehdr |
Cc: |
Description (last modified by )
I'm trying to import an ESRI flt raster into Grass 6.3.cvs using r.in.gdal. Using fresh gdal 1.4.1 from today, and fresh Grass 6.3 cvs update from today on Ubuntu 7.04 Beta.
$ gdalinfo -mm 45_18_N_66_06_W_BACKSCATTER.flt Driver: EHdr/ESRI .hdr Labelled Size is 2641, 3721 Coordinate System is `' Origin = (2531369.500000000000000,7366720.500000000000000) Pixel Size = (1.000000000000000,-1.000000000000000) Corner Coordinates: Upper Left ( 2531369.500, 7366720.500) Lower Left ( 2531369.500, 7362999.500) Upper Right ( 2534010.500, 7366720.500) Lower Right ( 2534010.500, 7362999.500) Center ( 2532690.000, 7364860.000) Band 1 Block=2641x1 Type=Byte, ColorInterp=Undefined ERROR 2: CPLCalloc(): Out of memory allocating -329 bytes. Aborted (core dumped)
~ Eric.
Attachments (1)
Change History (2)
Changed 14 years ago by
Attachment: | 45_18_N_66_06_W_BACKSCATTER.hdr added |
---|
comment:3 Changed 14 years ago by
Component: | default → GDAL_Raster |
---|---|
Description: | modified (diff) |
Keywords: | ehdr added |
Milestone: | → 1.4.2 |
Resolution: | → fixed |
Status: | new → closed |
Version: | unspecified → 1.4.0 |
The problem is related to initialization when the NBITS keyword is missing from the .hdr file. In 1.4.0 a bunch of new code was introduced for NBITS < 8, but it also added a dependency on having the keyword present.
The workaround is to add "NBITS 8" in the .hdr file.
Fix is to default to 8 in the code. The fix has been committed in trunk, and 1.4 branch and it should be released in 1.4.2.
Note: See
TracTickets for help on using
tickets.
Header file from the ESRI floating point raster that caused the error