Opened 12 years ago

Closed 12 years ago

#2384 closed defect (invalid)

Memory problems reading large ECW files

Reported by: xavi Owned by: warmerdam
Priority: normal Milestone:
Component: GDAL_Raster Version: 1.4.2
Severity: normal Keywords:
Cc:

Description

I have been experiencing what seems a bug: when trying to read large files in ecw format, the computer runs out of memory. I have tried with other programs that use GDAL with the same result (crash). However, I have not found a bug report for this which make me suspicious that the problem might be mine. Since my problem is not exactly a memory leak, because everything seems to work with small ecw files, I was wondering whether I have misunderstood the documentation. What I do is this: I call GDALOpen(), then call GetRasterBand?() on the open file until I reach the end, then call GDALClose(). The only thing I call on the GDALRasterBand pointer is RasterIO(). From the documentation it seems that I should not try to delete the GDALRasterBand pointers, but reserved memory keeps increasing until I close the file, the problem being that with large enough files (2Gb) the computer ends up with no memory.

Change History (5)

comment:1 Changed 12 years ago by warmerdam

xavi,

A challenge for a situation like this is isolating what might be a GDAL memory use issue, and what might be an ECW SDK memory use issue.

I would be helpful if you could boil down a minimal sample program that demonstrates the problem, attach that to the ticket, and include the gdalinfo report on the source ecw file.

comment:2 in reply to:  1 Changed 12 years ago by xavi

I agree. I will try to create a sample program.

I don't understand what you mean by " the gdalinfo report on the source ecw file", can you clarify that, please?.

Thanks

comment:3 Changed 12 years ago by warmerdam

xavi,

Please run the gdalinfo commandline program against the .ecw file giving you problems, and attach the report generated to this ticket. This will allow me to create or select a fairly similarly organized ecw file for my testing.

comment:4 in reply to:  3 Changed 12 years ago by xavi

I have tried to run the default gdalinfo.exe but it won't recognise ecw format. I'll recompile gdalinfo.exe using ECW support and as soon as I get the report I'll attach in this ticket. Meanwhile we'll follow testing with other ECW files. Thanks.

comment:5 Changed 12 years ago by xavi

Resolution: invalid
Status: newclosed

We've been doing tests and finally it seems to be a bug in our code.

Sorry for any inconvenience.

Note: See TracTickets for help on using tickets.