Mantis Issue Tracking for Scribus
· Hosting provided by Anduin.net / Øverby Consulting ·

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0004189ScribusImport / Exportpublic06-Aug-28 22:3314-Sep-12 00:34
Reporterjo-hannes 
Assigned To 
PrioritynormalSeveritycrashReproducibilityalways
StatusconfirmedResolutionopen 
PlatformOSOS Version
Product Version1.3.3.4cvs 
Target VersionFixed in Version 
Summary0004189: big picture crashes Scribus on PDF export
Descriptionsample pic: http://www.noao.edu/image_gallery/images/d6/m31s.tiff [^] (66mb)
TagsNo tags attached.
Attached Files

- Relationships
has duplicate 0005904closedjghali Export too PDF crashes. 
has duplicate 0005517closedjghali Crash when exporting PDF (invalid memory reference) 
has duplicate 0002405closedjghali Signal 6 crashes when exporting PDFs. 
has duplicate 0006353closedjghali Scribus crashes during PDF export. 
has duplicate 0005262closedjghali Scribus crashes due to Signal 0000006 on printing 
has duplicate 0006744closedjghali Scribus crasches during exporting to PDF 
has duplicate 0006914closedjghali crash during PDF export 
has duplicate 0007160closedjghali Scribus crash when export page with large image 
has duplicate 0007414closedjghali Out of memory / EXCEPTION_ACCESS_VIOLATION error when exporting PDF with TIFF images 
has duplicate 0008503closedjghali Scribus crashes when high resolution PNG files are exported to PDF 
has duplicate 0008584closedjghali crashes with signal 6 when exporting or printing pdf 
has duplicate 0008748closedjghali Scribus randomly crashes when exporting to PDF with compression 
has duplicate 0008760closedjghali When saving as PDF Scribus reports "Application transferred too few scanlines", JPEG Library Error. 
has duplicate 0009329closedjghali By loading pictures in to a frame and by loading a Scribus Document there's sometimes a "JPEG Libary error"-error 
has duplicate 0010027closedjghali failure to load some tiffs into graphics frame 
has duplicate 0010164closedjghali Crash at Start, crash at PDF export 
has duplicate 0011581closedjghali Scribus crahes when a file with lots of photos is exported to pdf 
related to 0001398assignedjghali Improve memory efficiency of raster image export 
child of 0002438acknowledged Metabug: Cases of extreme memory use 

-  Notes
(0012355)
jo-hannes (developer)
06-Aug-28 22:35

(gdb) backtrace
#0 0x00002b96238eaaa5 in raise () from /lib64/libc.so.6
0000001 0x00002b96238ebe60 in abort () from /lib64/libc.so.6
0000002 0x00002b9623400d24 in __gnu_cxx::__verbose_terminate_handler () from /usr/lib64/libstdc++.so.6
0000003 0x00002b96233fee56 in std::set_unexpected () from /usr/lib64/libstdc++.so.6
0000004 0x00002b96233fee83 in std::terminate () from /usr/lib64/libstdc++.so.6
0000005 0x00002b96233fef6a in __cxa_throw () from /usr/lib64/libstdc++.so.6
0000006 0x00002b96233ff249 in operator new () from /usr/lib64/libstdc++.so.6
0000007 0x00002b96233ff309 in operator new[] () from /usr/lib64/libstdc++.so.6
0000008 0x00002b9621b2c18d in QString::setLength () from /usr/lib/qt3/lib64/libqt-mt.so.3
0000009 0x00002b9621b2c594 in QString::subat () from /usr/lib/qt3/lib64/libqt-mt.so.3
0000010 0x000000000087ab6b in QString::ref (this=0x7fff89fffa10, i=134217728) at /usr/lib/qt3/include/qstring.h:648
0000011 0x000000000087abb2 in QCharRef::operator= (this=0x7fff89feeee0, c=184 'ΒΈ') at /usr/lib/qt3/include/qstring.h:769
0000012 0x000000000086ae09 in ScImage::ImageToTxt (this=0x7fff89ff7250) at scimage.cpp:877
0000013 0x000000000079270c in PDFlib::PDF_Image (this=0x7fff8a002650, c=0x17a95c0, fn=@0x17ad858, sx=0.049807042932947417, sy=0.049807042932947417, x=0, y=-0, fromAN=false, Profil=@0x17ad870, Embedded=false, Intent=0) at pdflib.cpp:4847
0000014 0x00000000007ab595 in PDFlib::PDF_ProcessItem (this=0x7fff8a002650, ite=0x17a95c0, pag=0x1701610, PNr=0, embedded=false) at pdflib.cpp:2320
0000015 0x00000000007bda89 in PDFlib::PDF_ProcessPage (this=0x7fff8a002650, pag=0x1701610, PNr=0, clip=false) at pdflib.cpp:2036
0000016 0x00000000007bfab5 in PDFlib::doExport (this=0x7fff8a002650, fn=@0x7fff8a002ba0, nam=@0x7fff8a002bb0, Components=3, pageNs=@0x7fff8a002bd0, thumbs=@0x7fff8a002bc0) at pdflib.cpp:188
0000017 0x0000000000a0c74f in ScribusMainWindow::getPDFDriver (this=0xd5ae80, fn=@0x7fff8a002ba0, nam=@0x7fff8a002bb0, Components=3, pageNs=@0x7fff8a002bd0, thumbs=@0x7fff8a002bc0) at scribus.cpp:7241
0000018 0x0000000000a31672 in ScribusMainWindow::doSaveAsPDF (this=0xd5ae80) at scribus.cpp:7367
0000019 0x0000000000a31aca in ScribusMainWindow::SaveAsPDF (this=0xd5ae80) at scribus.cpp:7273
0000020 0x0000000000a42ee8 in ScribusMainWindow::qt_invoke (this=0xd5ae80, _id=209, _o=0x7fff8a0030d0) at scribus.moc:1040
0000021 0x00002b96218a2a8c in QObject::activate_signal () from /usr/lib/qt3/lib64/libqt-mt.so.3
0000022 0x00002b96218a37a3 in QObject::activate_signal () from /usr/lib/qt3/lib64/libqt-mt.so.3
0000023 0x00002b9621ba1e38 in QAction::qt_emit () from /usr/lib/qt3/lib64/libqt-mt.so.3
0000024 0x0000000000891095 in ScrAction::qt_emit (this=0xddef40, _id=2, _o=0x7fff8a003210) at scraction.moc:227
0000025 0x00002b96218a2aca in QObject::activate_signal () from /usr/lib/qt3/lib64/libqt-mt.so.3
0000026 0x00002b96218a37a3 in QObject::activate_signal () from /usr/lib/qt3/lib64/libqt-mt.so.3
0000027 0x00002b96218d5967 in QWidget::event () from /usr/lib/qt3/lib64/libqt-mt.so.3
0000028 0x00002b962184ba95 in QApplication::internalNotify () from /usr/lib/qt3/lib64/libqt-mt.so.3
0000029 0x00002b962184c8bb in QApplication::notify () from /usr/lib/qt3/lib64/libqt-mt.so.3
0000030 0x00002b96217f40f4 in QETWidget::translateMouseEvent () from /usr/lib/qt3/lib64/libqt-mt.so.3
0000031 0x00002b96217f32d3 in QApplication::x11ProcessEvent () from /usr/lib/qt3/lib64/libqt-mt.so.3
0000032 0x00002b962180225f in QEventLoop::processEvents () from /usr/lib/qt3/lib64/libqt-mt.so.3
0000033 0x00002b96218607a1 in QEventLoop::enterLoop () from /usr/lib/qt3/lib64/libqt-mt.so.3
0000034 0x00002b962186064a in QEventLoop::exec () from /usr/lib/qt3/lib64/libqt-mt.so.3
0000035 0x0000000000a51649 in mainApp (argc=1, argv=0x7fff8a003bb8) at main_nix.cpp:74
0000036 0x0000000000a5168b in main (argc=1, argv=0x7fff8a003bb8) at main_nix.cpp:50
(0012356)
jo-hannes (developer)
06-Aug-28 22:36

btw. i already have 1.3gb ram
(0012359)
jghali (administrator)
06-Aug-28 23:37
edited on: 06-Aug-28 23:38

With 1.3.3.x branch, minimum requirement just for loading that image is imageWidth * imageHeight * 4 * 2, the 2 factor being due to use of qstrings for storing images, so around 512Mb. For processing the image you'll need another 512Mb at least. We are now at 1Gb. Seeing some part of 1.3.3.x code add another 512Mo. Well already 1,5Gb...

In 1.3.4cvs, that is getting better as QStrings are not used anymore for storing image.

(0012364)
fschmid (administrator)
06-Aug-29 13:18

The optimal solution for that, at least in the export, would be if we would add
some functions to the ScImageLoad class which will fetch just 1 scanline at a
time. This will be relatively easy for .jpeg and .tiff images, .psd, .pdf and
.eps will make more troubles.
(0012367)
ringerc (administrator)
06-Aug-30 03:17

In addition to fetching the image one scan line / chunk / strip at a time, is it possible to progressively _encode_ using libjpeg as well? I know it can be done with zlib for flate-encoded images, but JPEG is more common and it'd be ideal to be able to do the encoding process in a more memory efficient way.

Failing that, perhaps decoding the source image into an mmap()ped temp file and passing that buffer to libjpeg is the way to go. The VM is smart enough to keep it in the page cache if it fits (so it's slower than using a RAM buffer, but not by much) but page it out if it doesn't (so we don't have to manage the work). I think Windows has differently named but very similar functions.

BTW, jo-hanes, it helps if you post the initial message from gdb as well as the backtrace. It mentions the signal that caused GDB to interrupt execution and that can be quite important. In this case it's not - it's a SIGABRT (6) caused by the abort() call in terminate() due to an uncaught std::bad_alloc exception - but it's not always that obvious.
(0012368)
ringerc (administrator)
06-Aug-30 04:12

I should RTFM before saying anything ... looks like libjpeg is made for such progressive encoding.
(0012369)
jo-hannes (developer)
06-Aug-30 10:12

ringerc, the backtrace is from mrdocs iirc. i didnt get one on windows :) and i dont have 1.3.3.4 on linux.
(0012370)
plinnell (administrator)
06-Aug-30 11:03

Can't be my back trace. I don't have 64bit libs.
(0012371)
jo-hannes (developer)
06-Aug-30 11:31

hm, tsoots?

- Issue History
Date Modified Username Field Change
06-Aug-28 22:33 jo-hannes New Issue
06-Aug-28 22:35 jo-hannes Note Added: 0012355
06-Aug-28 22:36 jo-hannes Note Added: 0012356
06-Aug-28 22:36 jo-hannes Relationship added child of 0002438
06-Aug-28 22:36 jo-hannes Severity crash => minor
06-Aug-28 23:37 jghali Note Added: 0012359
06-Aug-28 23:38 jghali Note Edited: 0012359
06-Aug-29 13:18 fschmid Note Added: 0012364
06-Aug-30 03:17 ringerc Note Added: 0012367
06-Aug-30 03:18 ringerc Status new => confirmed
06-Aug-30 04:12 ringerc Note Added: 0012368
06-Aug-30 10:12 jo-hannes Note Added: 0012369
06-Aug-30 11:03 plinnell Note Added: 0012370
06-Aug-30 11:31 jo-hannes Note Added: 0012371
07-Jun-20 11:10 jghali Relationship added has duplicate 0005904
07-Nov-28 11:46 jghali Relationship added has duplicate 0005517
07-Nov-28 12:00 jghali Relationship added related to 0001398
07-Nov-28 12:02 jghali Relationship added has duplicate 0002405
07-Nov-28 12:06 jghali Relationship added has duplicate 0006353
08-Jan-15 00:02 jghali Relationship added has duplicate 0005262
08-Feb-06 21:15 jghali Relationship added has duplicate 0006744
08-Apr-03 13:25 jghali Relationship added has duplicate 0006914
08-Jul-22 12:12 jghali Relationship added has duplicate 0007160
08-Sep-22 08:17 jghali Relationship added has duplicate 0007414
09-Oct-08 23:09 jghali Relationship added has duplicate 0008503
09-Nov-15 03:55 jghali Relationship added has duplicate 0008584
09-Dec-11 01:18 jghali Relationship added has duplicate 0008610
10-Feb-16 23:53 jghali Relationship added has duplicate 0008748
10-Feb-16 23:59 jghali Relationship added has duplicate 0008760
10-Aug-29 23:59 jghali Relationship added has duplicate 0009329
11-Jun-07 23:20 jghali Relationship added has duplicate 0010027
11-Aug-09 21:47 jghali Relationship added has duplicate 0010164
13-Jun-09 22:33 jghali Relationship added has duplicate 0011581
14-Jul-26 02:47 Kunda Target Version => 1.5.0
14-Jul-27 08:43 Kunda Severity minor => crash
14-Sep-11 04:34 Kunda Severity crash => block
14-Sep-12 00:26 Kunda Note Added: 0033631
14-Sep-12 00:26 Kunda Severity block => crash
14-Sep-12 00:26 Kunda Target Version 1.5.0 => 1.5.1
14-Sep-12 00:34 Kunda Target Version 1.5.1 =>
14-Sep-12 00:42 Kunda Note Deleted: 0033631



Copyright © 2000 - 2014 MantisBT Team
Powered by Mantis Bugtracker