AWARE [SYSTEMS] Imaging expertise for the Delphi developer
AWare Systems, Imaging expertise for the Delphi developer, Home TIFF and LibTiff Mailing List Archive

LibTiff Mailing List

TIFF and LibTiff Mailing List Archive
August 2010

Previous Thread
Next Thread

Previous by Thread
Next by Thread

Previous by Date
Next by Date

Contact

The TIFF Mailing List Homepage
This list is run by Frank Warmerdam
Archive maintained by AWare Systems



Valid HTML 4.01!



Thread

2010.08.22 13:26 "memory error", by Rajat Varma
2010.08.23 13:42 "Re: memory error", by Edward Lam
2010.08.23 15:02 "Re: memory error", by Rajat Varma
2010.08.23 15:15 "Re: memory error", by Scott Ribe
2010.08.23 15:17 "Re: memory error", by Bob Friesenhahn
2010.08.23 15:27 "Re: memory error", by Rajat Varma

2010.08.23 15:27 "Re: memory error", by Rajat Varma

Thank you Bob and Scott for your response.

I have now used uint32 for stripbytecounts and have passed argv and I am
still stuck with the following error

LAT-median-filtered.tif: Cannot read TIFF header.
Segmentation fault

and in Valgrind I get

--------------------------------------------------------------------------------------------------------------------
LAT-median-filtered.tif: Cannot read TIFF header.
==5878== Invalid read of size 4
==5878==    at 0x404CCEB: TIFFFindFieldInfo (tif_dirinfo.c:753)
==5878==    by 0x404A843: TIFFVGetField (tif_dir.c:971)
==5878==    by 0x404B33A: TIFFGetField (tif_dir.c:957)
==5878==    by 0x80485B4: main (in
/home/rajat/Desktop/spots_program/testwrite)
==5878==  Address 0x284 is not stack'd, malloc'd or (recently) free'd
==5878==
==5878==
==5878== ---- Attach to debugger ? --- [Return/N/n/Y/y/C/c] ---- n
==5878==
==5878== Process terminating with default action of signal 11 (SIGSEGV)
==5878==  Access not within mapped region at address 0x284
==5878==    at 0x404CCEB: TIFFFindFieldInfo (tif_dirinfo.c:753)
==5878==    by 0x404A843: TIFFVGetField (tif_dir.c:971)
==5878==    by 0x404B33A: TIFFGetField (tif_dir.c:957)
==5878==    by 0x80485B4: main (in
/home/rajat/Desktop/spots_program/testwrite)
==5878==  If you believe this happened as a result of a stack
==5878==  overflow in your program's main thread (unlikely but
==5878==  possible), you can try to increase the size of the
==5878==  main thread stack using the --main-stacksize= flag.
==5878==  The main thread stack size used in this run was 8388608.
---------------------------------------------------------------------------------------------------------------------------------

thanks

rajat

On Mon, Aug 23, 2010 at 11:17 AM, Bob Friesenhahn <
bfriesen@simple.dallas.tx.us> wrote:

> On Mon, 23 Aug 2010, Rajat Varma wrote:
>
>> {
>>                 TIFF *in;
>>                 toff_t* bc;
>>                 uint32 rowspstrip,numrows,numcols;
>>                 uint16 bits;
>>
>>                 in = TIFFOpen(argv[1],"r");
>>
>>                 TIFFGetField(in, TIFFTAG_STRIPBYTECOUNTS, &bc);
>>
>
> The above line looks suspicious to me. The manual page says that this
> should be type uint32** but you are passing toff_t**.
>
> Bob
> --
> Bob Friesenhahn
> bfriesen@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
> GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/