Welcome to Fractal Forums

Fractal Software => Bug Reporting => Topic started by: smurfboard on November 01, 2016, 06:20:09 PM




Title: 2.09-2 "zlib cannot deal with buffers..
Post by: smurfboard on November 01, 2016, 06:20:09 PM
program is crashing when trying to write 16bit tiff files, message: "zlib cannot deal with buffers this size" , image size is 16000x28000 pixels, i have 32gb memory.


Title: Re: 2.09-2 "zlib cannot deal with buffers..
Post by: zebastian on November 01, 2016, 07:18:45 PM
The problem is inside of the tiff library, see also implementation here: https://trac.osgeo.org/gdal/browser/trunk/gdal/frmts/gtiff/libtiff/tif_zip.c?rev=12608
and look for your error "zlib cannot deal with buffers this size".
We will investigate if there is some way around this.
This issue is now tracked in github: https://github.com/buddhi1980/mandelbulber2/issues/148

Thanks for reporting  :)


Title: Re: 2.09-2 "zlib cannot deal with buffers..
Post by: Buddhi on November 01, 2016, 08:59:24 PM
It's probably limitation of tiff format. I found the information that tiff format is adressed internally using 32-bit variables. It means that the TIFF file cannot be bigger than 4GB (or 2GB if there are used signed integers). This is something which I can't fix.
http://www.awaresystems.be/imaging/tiff/faq.html#q8

I have just rendered image at the same size, and I see that even PNG format have some issue (about 15% of bottom part of the image is corrupted). I need to check if there is any limitation in our code (I have to be sure that only 64-bit integers are used for image buffer size calculation) or it is a limitation of PNG format.

I was not able to check it before, because just for 3 weeks I have enough memory in my PC to do this kind of trials.


Title: Re: 2.09-2 "zlib cannot deal with buffers..
Post by: Buddhi on November 01, 2016, 09:40:42 PM
I have a very good information. There was a bug in our code which limited image size to 2GB (in one place there was result calculated as a integer instead of long integer). I have just tested that and see that it woks properly for 16-bit TIFF and PNG
This week I will release 2.09-3 which will have fix for this problem. Thank you smurfboard for reporting this. Without your trial I wouldn't know about this issue.


Title: Re: 2.09-2 "zlib cannot deal with buffers..
Post by: zebastian on November 01, 2016, 10:33:47 PM
Good catch, krzysztof! thanks for the fix ;D

I am glad the problem is fixable in our code.


Title: Re: 2.09-2 "zlib cannot deal with buffers..
Post by: Buddhi on November 04, 2016, 06:52:51 PM
Buf fix is released: http://www.fractalforums.com/releases-b233/mandelbulber-v2-2-09/msg97052/#msg97052


Title: Re: 2.09-2 "zlib cannot deal with buffers..
Post by: cKleinhuis on November 04, 2016, 07:18:20 PM
Buf fix is released: http://www.fractalforums.com/releases-b233/mandelbulber-v2-2-09/msg97052/#msg97052

hehe, i hope the buffix contains the bugfix :D sry had to