Printing issues

Miika Turkia miika.turkia at gmail.com
Mon Aug 31 02:16:32 PDT 2015


On Mon, Aug 31, 2015 at 11:56 AM, Lubomir I. Ivanov <neolit123 at gmail.com> wrote:
> On 30 August 2015 at 21:43, Miika Turkia <miika.turkia at gmail.com> wrote:
>> I seem to be having some trouble when trying to print preview my logs.
>> When doing this in color, I run out of memory. And when print
>> previewing in black and white the profile is quite interesting, as
>> shown below (this was 6/page). I suppose there should be some special
>> handling when printing a couple of hundred dives in one go.
>>
>> 60 dives works ok, but that is quit slow freezing the whole UI in the
>> process. But the resulting profiles look OK both B&W and in color.
>>
>
> i'm able to print the 200+ dives in the following divelist (attached
> XML) fine in color, but i can get it to crash in b&w mode.
>
> Program received signal SIGSEGV, Segmentation fault.
> 0x0d095a6d in QRasterPlatformPixmap::createPixmapForImage (this=0x42ca8e88,
>     sourceImage=..., flags=..., inPlace=false) at image\qpixmap_raster.cpp:366
> 366     image\qpixmap_raster.cpp: No such file or directory.
> (gdb) bt
> #0  0x0d095a6d in QRasterPlatformPixmap::createPixmapForImage (
>     this=0x42ca8e88, sourceImage=..., flags=..., inPlace=false)
>     at image\qpixmap_raster.cpp:366
> #1  0x0d094f77 in QRasterPlatformPixmap::fromImage (this=0x42ca8e88,
>     sourceImage=..., flags=...) at image\qpixmap_raster.cpp:139
> #2  0x0d0950aa in QRasterPlatformPixmap::copy (this=0x42ca8e88, data=
> ...
>
> #28 0x34874e9c in QWebFrame::render (this=0x3cb07990, painter=0x288b74,
>     layer=..., clip=...) at WebKit\qt\WidgetApi\qwebframe.cpp:646
> #29 0x00494ca3 in Printer::render (this=0x3ca5cc58, Pages=299)
>     at C:\dev\subsurface\printer.cpp:154
> #30 0x004957e5 in Printer::print (this=0x3ca5cc58)
>     at C:\dev\subsurface\printer.cpp:241
>
> the crash is somewhere deep in Qt, but it's due to the actual Printer::render().
>
> i also get thousand instances of these two warnings in GDB, but not in
> the standard console:
>
> QFont::setPointSizeF: Point size <= 0 (0.000000), must be greater than 0
> QTransform::fromTranslate with NaN called
>
> Gehad, you can check if you are allocating a lot of objects and if
> such can be freed in the appropriate location (try re-using objects,
> etc.), but if these are Qt memory leaks and bugs it's a much more
> complicated situation.

Re-using the elements or being able to free data during the
"conversion" would probably solve the issue. Provided, this can be
done.

> also, since we are doing some "hacks" to be able to b&w print, i'm
> considering the proposal to remove the b&w print completely if that's
> the only *real* problematic mode!
> please, let me know if that's the case.

Well, the color print causes me to run out of memory completely (4GB
in total on my laptop). The B&W uses less memory, so I get the
corrupted log out of it. And printing a limited amount of dives seems
to produce correct results on both cases. (I have about 750 dives on
my log, over 32 days in total dive time.)

miika


More information about the subsurface mailing list