[GRASS5] Raster import bug

Markus Neteler neteler at geog.uni-hannover.de
Thu May 18 12:12:13 EDT 2000


On Wed, May 17, 2000 at 04:06:50PM -0400, Carl Anderson wrote:
> > A severe bug is this:
> > The r.in.png, r.in.tiff and r.in.ppm modules crash with
> > segmentation faults only on Pentium processors! On AMD-K6
> > the do their job. I tried around 20 Linux machines,
> > aounrd 50% Pentium CPU = 50% failure. It seems to
> > be a bug in the GRASS library, not in the modules.
>
> I ran a test on an IBM 300PL (Pentium III 450Mhz, RH6.1+)
> I also ran <top> in another terminal
> 
> r.in.tiff on a 62x109 pixel image 
> before counting colors,
> it allocated all free real memory and continued allocating 
> until the allocation was so large as to be unmanageable 
> and the process crashed
> (on that machine with 64Mb real that was 216Mb)
> 
> At least for me the problem  is on line 283 and 296 of r.in.tiff.c
>   tif_pos = ftell ((FILE*)tif); 
> also 
>   fseek ((FILE *)tif, tif_pos, 0);
> are probably the culprit.
> 
> if these lines are commented out the code works.

Carl,

thank you for the hint. If commenting it still works on my
AMD-K6 :-), I will try Pentium later.

I have removed the LZW support in r.out.tiff (r.in.tiff) and 
stored it back to src/raster/r.tiff/
(hope I did not forget anything to remove...)

Reason was that I feel the r.in.tiff /r.in.arctiff are quite 
important.

Best regards

 Markus

---------------------------------------- 
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo at geog.uni-hannover.de with
subject 'unsubscribe grass5'



More information about the grass-dev mailing list