[Gdal-dev] crash when reading an ASCIIGRID

Frank Warmerdam fwarmerdam at gmail.com
Tue Feb 8 10:55:08 EST 2005


On Tue, 8 Feb 2005 10:46:54 -0500, Stephane Routelous <route at cae.com> wrote:
> Hi,
> 
> I have a stackoverflow in GDAL when I read an asciigrid.
> the proble is that I have an asciigrid with ~2800 lines.
> I'm trying to access the last line (nBlockYOff = 2800 in
> AAIGRasterBand::IReadBlock )
> Because the other lines are not read (reading line 2800 is my only call),
> the function recusively read the other lines.
> And this causes a stack overflow.
> Is it possible to use another way in the AAIGRasterBand::IReadBlock
> implementation ?

Stephane, 

Ah yes, the risks of tail recursion. 

If you submit a bugzilla entry on this, I'll try and fix it promptly.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent



More information about the Gdal-dev mailing list