[gdal-dev] PDF Creation floating point exception for DEFLATE option?
Even Rouault
even.rouault at mines-paris.org
Mon Nov 26 12:16:09 PST 2012
Le lundi 26 novembre 2012 20:59:23, Robert Zermeno a écrit :
> GDAL Community,
>
> My application generates a geospatial PDF file from a pre-loaded image
> source. When generating an image, I keep receiving an exception of:
> "exception class EInvalidOp with message 'Invalid floating point
> operation'". I am using the respoitory from 11-20-2012. I am using
> Borland C compiler (now known as Embarcadero Codegear).
> For Borland, I found a solution at
> http://digital.ni.com/public.nsf/allkb/10096EA5DC20FC158625773800628E8A th
> at quited the Invalid floating point operation, but I still get an
> exception.
> Finally, I built a simple command line program in MSVC 2005 to step through
> GDAL source code to find the exception.
> The exception occurs when using DEFLATE compression option. The output
> message I get is located in trees.c (frmts\zlib) from gen_bitlen(s,desc)
> function lines 532-559. Zlib is used in pdfcreatecopy.cpp Lines 3496-3501
> and 3548. Line 3548 is where it calls VSIFWriteL().
> The output string received is:
>
> "bit length overflow
> code 0 bits 6->7"
>
> or
>
> "bit length overflow
> code 6 bits 6->7
> code 0 bits 6->7"
>
> The code and bits are not always the same. For me, it did not matter which
> file I used, it always gave me an overflow notice. Can anyone or has
> anyone experienced this issue? The file still generates but my
> application is halted and a message is presented of the exception.
You can ignore the "big length overflow" warnings. They are emitted on stderr.
You only observe them if GDAL is built with -DDEBUG defined, but they should be
harmless
If you have exceptions/crashes, it is something else.
> Robert
More information about the gdal-dev
mailing list