https://issues.qgis.org/https://issues.qgis.org/favicon.ico2006-10-12T13:55:51ZQGIS Issue TrackingQGIS Application - Bug report #345: Problems with printing to EPShttps://issues.qgis.org/issues/345?journal_id=139122006-10-12T13:55:51ZMartin Dobiaswonder.sk@gmail.com
<ul></ul><p>Is there a difference between this ticket and <a class="issue tracker-1 status-5 priority-3 priority- closed" href="https://issues.qgis.org/issues/339" title=""Cannot find translate" or segfault (Closed)">#339</a> ?</p>
<pre>
When gdb has started, enter command *run* to the prompt and once qgis crashes type *bt* to see the backtrace.</pre> QGIS Application - Bug report #345: Problems with printing to EPShttps://issues.qgis.org/issues/345?journal_id=139132006-10-12T21:22:05ZRedmine Admin
<ul></ul><blockquote>
<p>Is there a difference between this ticket and <a class="issue tracker-1 status-5 priority-3 priority- closed" href="https://issues.qgis.org/issues/339" title=""Cannot find translate" or segfault (Closed)">#339</a> ?</p>
</blockquote>
<p>This one provides a bit more details, so propably <a class="issue tracker-1 status-5 priority-3 priority- closed" href="https://issues.qgis.org/issues/339" title=""Cannot find translate" or segfault (Closed)">#339</a> should be a duplicate of this one.</p>
<blockquote>
<p>Btw. to provide backtrace you run qgis this way: gdb /your/path/bin/qgis</p>
</blockquote>
<p>That's exactly what I'm doing. And I get:</p>
<pre>
"/home/shoofi/bugi/qgis/core.14622" is not a core dump: File format not recognized
</pre> QGIS Application - Bug report #345: Problems with printing to EPShttps://issues.qgis.org/issues/345?journal_id=139142006-10-12T21:29:03ZRedmine Admin
<ul></ul><p>Oops sorry. Now I get it. Your procedure was different than the one proposed in FAQ of the QGIS site. Doing it as you suggested, I get:</p>
<pre>
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1240062272 (LWP 5653)]
0x369b0000 in ?? ()
(gdb) bt
#0 0x369b0000 in ?? ()
#3905 0xb7664759 in QPaintDevice::~QPaintDevice ()
from /usr/local/Trolltech/Qt-4.1.4/lib/libQtGui.so.4
#3906 0xb76644ac in QPaintDevice::~QPaintDevice ()
from /usr/local/Trolltech/Qt-4.1.4/lib/libQtGui.so.4
#3907 0xb7666728 in QPaintDevice::~QPaintDevice ()
from /usr/local/Trolltech/Qt-4.1.4/lib/libQtGui.so.4
#3908 0xb766068a in QPaintDevice::~QPaintDevice ()
from /usr/local/Trolltech/Qt-4.1.4/lib/libQtGui.so.4
#3909 0xb761a44d in QPainter::drawPicture ()
from /usr/local/Trolltech/Qt-4.1.4/lib/libQtGui.so.4
#3910 0xb761aed8 in QPainter::drawPolyline ()
from /usr/local/Trolltech/Qt-4.1.4/lib/libQtGui.so.4
#3911 0xb6ab0c41 in [[QgsVectorLayer]]::drawLineString (this=0x82f9110,
feature=0x89bc4b8 "\\001\\002", hasZValue=false, p=0xbff2ee98,
mtp=0xbff2ea80, projectionsEnabledFlag=false, drawingToEditingCanvas=false)
at qpainter.h:477
#3912 0xb6ab11bf in [[QgsVectorLayer]]::drawFeature (this=0x82f9110, p=0xbff2ee98,
fet=0x82f5a34, theMapToPixelTransform=0xbff2ea80, marker=0xbff2e844,
markerScaleFactor=5, projectionsEnabledFlag=false,
drawingToEditingCanvas=false) at qgsvectorlayer.cpp:3420
#3913 0xb6ab8799 in [[QgsVectorLayer]]::draw (this=0x82f9110, p=0xbff2ee98,
viewExtent=0x82f5a34, theMapToPixelTransform=0xbff2ea80,
---Type <return> to continue, or q <return> to quit---q
drawingToEditingCanQuit
) at qgsvectorlayer.cpp:920
#10 0xb7e81acc in [[QgsComposerMap]]::draw (this=0x855bb08, painter=0xbff2ee98,
extent=0x855bbf4, transform=0xbff2ea80) at qgscomposermap.cpp:129
#3914 0xb7e8305f in [[QgsComposerMap]]::draw (this=0x855bb08, painter=@0xbff2ee98)
at qgscomposermap.cpp:285
#3915 0xb7bb1e12 in Q3CanvasItemList::drawUnique ()
from /usr/local/Trolltech/Qt-4.1.4/lib/libQt3Support.so.4
#3916 0xb7bb4dab in Q3Canvas::drawCanvasArea ()
from /usr/local/Trolltech/Qt-4.1.4/lib/libQt3Support.so.4
#3917 0xb7bb4ea8 in Q3Canvas::drawArea ()
from /usr/local/Trolltech/Qt-4.1.4/lib/libQt3Support.so.4
#3918 0xb7e688f9 in [[QgsComposer]]::on_mActionPrint_activated (this=0x80e30d0)
at qgscomposer.cpp:349
#3919 0xb7ea887d in [[QgsComposer]]::qt_metacall (this=0x80e30d0,
_c=QMetaObject::InvokeMetaMethod, _id=4, _a=0x82f5a34)
at qgscomposer.moc.cpp:91
#3920 0xb7d634ba in QMetaObject::activate ()
from /usr/local/Trolltech/Qt-4.1.4/lib/libQtCore.so.4
#3921 0xb7d636f3 in QMetaObject::activate ()
from /usr/local/Trolltech/Qt-4.1.4/lib/libQtCore.so.4
#3922 0xb75584e1 in QAction::activated ()
from /usr/local/Trolltech/Qt-4.1.4/lib/libQtGui.so.4
#3923 0xb7558efc in QAction::activate ()
---Type <return> to continue, or q <return> to quit---
from /usr/local/Trolltech/Qt-4.1.4/lib/libQtGui.so.4
#3924 0xb7800c5a in QToolButton::nextCheckState ()
from /usr/local/Trolltech/Qt-4.1.4/lib/libQtGui.so.4
#3925 0xb7767757 in QButtonGroup::id ()
from /usr/local/Trolltech/Qt-4.1.4/lib/libQtGui.so.4
#3926 0xb77679c5 in QAbstractButton::mouseReleaseEvent ()
from /usr/local/Trolltech/Qt-4.1.4/lib/libQtGui.so.4
#3927 0xb759c65c in QWidget::event ()
from /usr/local/Trolltech/Qt-4.1.4/lib/libQtGui.so.4
#3928 0xb7767eb0 in QAbstractButton::event ()
from /usr/local/Trolltech/Qt-4.1.4/lib/libQtGui.so.4
#3929 0xb7800a04 in QToolButton::event ()
from /usr/local/Trolltech/Qt-4.1.4/lib/libQtGui.so.4
#3930 0xb755cc95 in QApplicationPrivate::notify_helper ()
from /usr/local/Trolltech/Qt-4.1.4/lib/libQtGui.so.4
#3931 0xb755eb8a in QApplication::notify ()
from /usr/local/Trolltech/Qt-4.1.4/lib/libQtGui.so.4
#3932 0xb75af79d in QApplication::x11ProcessEvent ()
from /usr/local/Trolltech/Qt-4.1.4/lib/libQtGui.so.4
#3933 0xb75aee68 in QApplication::x11ProcessEvent ()
from /usr/local/Trolltech/Qt-4.1.4/lib/libQtGui.so.4
#3934 0xb75c0ca5 in non-virtual thunk to QDesktopWidget::~QDesktopWidget() ()
from /usr/local/Trolltech/Qt-4.1.4/lib/libQtGui.so.4
---Type <return> to continue, or q <return> to quit---
#3935 0xb7d5521e in QEventLoop::processEvents ()
from /usr/local/Trolltech/Qt-4.1.4/lib/libQtCore.so.4
#3936 0xb7d5543a in QEventLoop::exec ()
from /usr/local/Trolltech/Qt-4.1.4/lib/libQtCore.so.4
#3937 0xb7d58217 in QCoreApplication::exec ()
from /usr/local/Trolltech/Qt-4.1.4/lib/libQtCore.so.4
#3938 0xb755ca35 in QApplication::exec ()
from /usr/local/Trolltech/Qt-4.1.4/lib/libQtGui.so.4
#36 0x0804c4d8 in main (argc=1, argv=0xbff30354) at main.cpp:604
</pre> QGIS Application - Bug report #345: Problems with printing to EPShttps://issues.qgis.org/issues/345?journal_id=139152006-10-12T23:26:04ZGavin Macaulay -gavin@macaulay.co.nz
<ul></ul><p>Ticket <a class="issue tracker-1 status-5 priority-3 priority- closed" href="https://issues.qgis.org/issues/339" title=""Cannot find translate" or segfault (Closed)">#339</a> gives a different way of failing to this ticket, but they look to be the same problem.</p> QGIS Application - Bug report #345: Problems with printing to EPShttps://issues.qgis.org/issues/345?journal_id=139162006-10-12T23:27:47ZGavin Macaulay -gavin@macaulay.co.nz
<ul></ul><p>Another 'crash with postscript' ticket is <a class="issue tracker-1 status-5 priority-3 priority- closed" href="https://issues.qgis.org/issues/141" title="crashes when printing on pdf (Closed)">#141</a>.</p> QGIS Application - Bug report #345: Problems with printing to EPShttps://issues.qgis.org/issues/345?journal_id=139172006-10-12T23:51:37ZRedmine Admin
<ul></ul><p><a class="issue tracker-1 status-5 priority-3 priority- closed" href="https://issues.qgis.org/issues/141" title="crashes when printing on pdf (Closed)">#141</a> is slightly different, as it occurs only when projects are more complex (several rasters), more often with larger sizes (A3) and only on pdf</p> QGIS Application - Bug report #345: Problems with printing to EPShttps://issues.qgis.org/issues/345?journal_id=139182006-11-11T02:10:36ZMartin Dobiaswonder.sk@gmail.com
<ul></ul><p>Tested again with Qt 4.2.1 and seems to work well now. Can you retest?</p> QGIS Application - Bug report #345: Problems with printing to EPShttps://issues.qgis.org/issues/345?journal_id=139192006-11-11T02:34:19ZRedmine Admin
<ul></ul><p>Tested. In my setting it does not crash, but the eps produced is not valid (Cannot find <a class="wiki-page new" href="https://issues.qgis.org/projects/qgis/wiki/BoundingBox">BoundingBox</a>). Furthermore, to choose the name of the file I have to deselect the "Print to file" option (that shows my default printer) and select it again (a minor annoyance).</p> QGIS Application - Bug report #345: Problems with printing to EPShttps://issues.qgis.org/issues/345?journal_id=139202006-11-16T12:55:05ZMartin Dobiaswonder.sk@gmail.com
<ul></ul><p>The annoyance with print dialog is a Qt bug reported here:<br /><a class="external" href="http://www.trolltech.com/developer/task-tracker/index_html?method=entry&id=129148">http://www.trolltech.com/developer/task-tracker/index_html?method=entry&id=129148</a></p>
<p>What's wrong with the postscript file - only <a class="wiki-page new" href="https://issues.qgis.org/projects/qgis/wiki/BoundingBox">BoundingBox</a> tag is missing or are there more problems? Does it happen always? What are the steps to reproduce it?</p> QGIS Application - Bug report #345: Problems with printing to EPShttps://issues.qgis.org/issues/345?journal_id=139212006-11-17T08:36:50ZRedmine Admin
<ul></ul><p>No more segfault. But still no EPS created - I keep on getting error "Cannot find translate". This is another bug I reported as <a class="issue tracker-1 status-5 priority-3 priority- closed" href="https://issues.qgis.org/issues/339" title=""Cannot find translate" or segfault (Closed)">#339</a>, which was marked as a duplicate of this bug.</p> QGIS Application - Bug report #345: Problems with printing to EPShttps://issues.qgis.org/issues/345?journal_id=139222006-11-28T05:52:16ZRedmine Admin
<ul><li><strong>Resolution</strong> set to <i>fixed</i></li><li><strong>Status</strong> changed from <i>Open</i> to <i>Closed</i></li></ul><p>"Cannot find translate" is fixed in 6142.</p>
<p>Trolls are not going to release a decent printing devices?</p>
<p>Radim</p> QGIS Application - Bug report #345: Problems with printing to EPShttps://issues.qgis.org/issues/345?journal_id=139232006-11-28T10:51:51ZRedmine Admin
<ul></ul><p>Radim,</p>
<p>What's the "6142" you refer to?</p>
<p>Thanks,<br />Maciek</p> QGIS Application - Bug report #345: Problems with printing to EPShttps://issues.qgis.org/issues/345?journal_id=139242006-11-28T14:24:47ZRedmine Admin
<ul></ul><p>OK, got it - it's SVN revision. Nevermind.</p>
<p>Cheers.</p> QGIS Application - Bug report #345: Problems with printing to EPShttps://issues.qgis.org/issues/345?journal_id=139252006-11-28T15:01:52Zanonymous -anonymous@foo.bar
<ul><li><strong>Status</strong> changed from <i>Closed</i> to <i>Feedback</i></li><li><strong>Resolution</strong> deleted (<del><i>fixed</i></del>)</li></ul><p>Radim wrote:</p>
<blockquote>
<p>Cannot find translate" is fixed in 6142.</p>
</blockquote>
<p>It is still mostly broken for me. Built SVN 6142 against QT 4.2.1, and:</p>
<p>1. "Cannot find <a class="wiki-page new" href="https://issues.qgis.org/projects/qgis/wiki/BoundingBox">BoundingBox</a>" error pops up when printing to check.eps</p>
<p>2. I don't press the OK yet - I look whether the file was created first; and it is there, 1.8 MB. So I try to open it with PS viewer. This doesn't work and I'm told the file is in pdf format! So I rename the created "check.eps" into "check.pdf". Open it in acroread. It looks mostly OK, only the bottom is broken (was supposed to be A4).</p>
<p>3. Return to QGIS and I press OK in the error dialog. Another one pops up: "Cannot find translate"; and the check.eps is created again, only 0 bytes this time. Then I press OK in this second error dialog. The check.eps is not overwritten again this time.</p>
<p>You can grab the check.pdf here:<br />[<a class="external" href="http://kufaya.googlepages.com/check.pdf">http://kufaya.googlepages.com/check.pdf</a>]</p>
<p>P.S<br />Note also that it was qgis that put the .eps extension as default, in spite of creating a pdf, not me.</p>
<p>P.S.2<br />When I try to print to a printer, I'm told "The selected paper does not match the composition size", although I have carefully set A4, portrait everywhere, including the printer properties.</p>
<p>Cheers,<br />Maciek</p> QGIS Application - Bug report #345: Problems with printing to EPShttps://issues.qgis.org/issues/345?journal_id=139262006-12-03T08:57:06ZMartin Dobiaswonder.sk@gmail.com
<ul></ul><p>Some problems with printing should be resolved in Qt 4.2.2.</p> QGIS Application - Bug report #345: Problems with printing to EPShttps://issues.qgis.org/issues/345?journal_id=139272006-12-04T11:58:50ZRedmine Admin
<ul></ul><p>Replying to [comment:16 wonder]:</p>
<blockquote>
<p>Some problems with printing should be resolved in Qt 4.2.2.</p>
</blockquote>
<p>After upgrading to QT 4.2.2 it is better now. Still bad though.</p>
<p>No crashes anymore. But the eps output happens to be corrupted if it conatins polygons. Take the attached shapefile and compose a map out of it (A4, portrait). In the left-top corner you'll see bogus line rendered (see the attached png dump; you can grab the whole eps from here: [<a class="external" href="http://kufaya.googlepages.com/qgis.eps.bz2]">http://kufaya.googlepages.com/qgis.eps.bz2]</a>). This is only an example, I can reproduce this bug with other polygon layers. It is reproducable, though I can't find a pattern for it.</p>
<p>Another thing is that printing to pdf still yields an error "Cannot find <a class="wiki-page new" href="https://issues.qgis.org/projects/qgis/wiki/BoundingBox">BoundingBox</a>" and "Cannot find translate". Is printing to pdf not going to be supported (not a big deal for me, can always eps2pdf; but target QGIS users, especially those on Windows, might have a problem)? QT bug?</p>
<p>Moreover, although the "Print to file" is checked by defualt when entering the print menu, the dialog for the path to output eps file is not active - my printers are listed there instead. I have to uncheck the "Print to file" and check it back, for the path-dialog to become available.</p>
<p>Cheers,<br />Maciek</p> QGIS Application - Bug report #345: Problems with printing to EPShttps://issues.qgis.org/issues/345?journal_id=139282006-12-04T16:16:19ZMartin Dobiaswonder.sk@gmail.com
<ul></ul><blockquote>
<p>No crashes anymore. But the eps output happens to be corrupted if it conatins polygons. Take the attached shapefile and compose a map out of it (A4, portrait). In the left-top corner you'll see bogus line rendered (see the attached png dump; you can grab the whole eps from here: "This is only an example, I can reproduce this bug with other polygon layers. It is reproducable, though I can't find a pattern for it.</p>
</blockquote>
<p>This seems to be another Qt4 rendering bug. I'll try to figure out what's going on here.</p>
<p>[[BR":http://kufaya.googlepages.com/qgis.eps.bz2]).]</p>
<blockquote>
<p>Another thing is that printing to pdf still yields an error "Cannot find <a class="wiki-page new" href="https://issues.qgis.org/projects/qgis/wiki/BoundingBox">BoundingBox</a>" and "Cannot find translate". Is printing to pdf not going to be supported (not a big deal for me, can always eps2pdf; but target QGIS users, especially those on Windows, might have a problem)? QT bug?</p>
</blockquote>
<p>In what cases does it show up these messages? They come from composer as it tries to correct some values. Normally these strings should be in EPS, in PDF they're not used... this is invalid QGIS behaviour.</p>
<blockquote>
<p>Moreover, although the "Print to file" is checked by defualt when entering the print menu, the dialog for the path to output eps file is not active - my printers are listed there instead. I have to uncheck the "Print to file" and check it back, for the path-dialog to become available.</p>
</blockquote>
<p>This has been already reported by Paolo above in this ticket. Also a Qt bug - according to task tracker it should get fixed in Qt 4.3.0.</p>
<p>Martin</p> QGIS Application - Bug report #345: Problems with printing to EPShttps://issues.qgis.org/issues/345?journal_id=139292006-12-05T02:00:06ZRedmine Admin
<ul></ul><p>Replying to [comment:17 <a class="email" href="mailto:tutey@o2.pl">tutey@o2.pl</a>]:</p>
<blockquote>
<p>No crashes anymore. But the eps output happens to be corrupted if it conatins polygons. Take the attached shapefile and compose a map out of it (A4, portrait). In the left-top corner you'll see bogus line rendered (see the attached png dump; you can grab the whole eps from here: [<a class="external" href="http://kufaya.googlepages.com/qgis.eps.bz2]">http://kufaya.googlepages.com/qgis.eps.bz2]</a>). This is only an example, I can reproduce this bug with other polygon layers. It is reproducable, though I can't find a pattern for it.</p>
</blockquote>
<p>Please fill in another ticket for this bug. I see the reason but no easy solution.<br />The problem is that Qt (AFAIK) does not support rendering of polygons with holes.<br />We use the trick when each hole is connected 2 lines from the first vertex of the polygon.<br />This works on screen but it seems it does not work in PS. PS has its own correct method <br />how to render polygons with holes but we cannot use it through Qt.</p>
<p>We could probably find for each hole a better outer polygon vertex so that the connection<br />does not run outside the polygon but it can be CPU time consuming in case of <br />large polygons with many holes.</p>
<blockquote>
<p>Another thing is that printing to pdf still yields an error "Cannot find <a class="wiki-page new" href="https://issues.qgis.org/projects/qgis/wiki/BoundingBox">BoundingBox</a>" and "Cannot find translate". Is printing to pdf not going to be supported (not a big deal for me, can always eps2pdf; but target QGIS users, especially those on Windows, might have a problem)? QT bug?</p>
</blockquote>
<p>We have to check if translate/box modification is still necessary in Qt4.2.2 and if <br />it is necessary for PDF and if it can be done for PDF.</p>
<p>Radim</p> QGIS Application - Bug report #345: Problems with printing to EPShttps://issues.qgis.org/issues/345?journal_id=139302006-12-05T08:28:02ZRedmine Admin
<ul></ul><p>The troubles with <a class="wiki-page new" href="https://issues.qgis.org/projects/qgis/wiki/BoundingBox">BoundingBox</a> and translate are caused by the fact that in Qt (till 4.2.2)<br />is not possible to set custom page size. That is problem especially for <br />small EPS maps which need to be included in a text document.</p>
<p>According to<br /><a class="external" href="http://www.trolltech.com/developer/task-tracker/index_html?method=entry&id=99441">http://www.trolltech.com/developer/task-tracker/index_html?method=entry&id=99441</a><br />it could be resolved in 4.3.0, but it is not sure yet if there will be a method<br />to set custom page or it will be only possible from dialog.</p>
<p>Radim</p> QGIS Application - Bug report #345: Problems with printing to EPShttps://issues.qgis.org/issues/345?journal_id=139312006-12-05T09:38:01ZRedmine Admin
<ul><li><strong>Status</strong> changed from <i>Feedback</i> to <i>Closed</i></li><li><strong>Resolution</strong> set to <i>fixed</i></li></ul><p>The problem with <a class="wiki-page new" href="https://issues.qgis.org/projects/qgis/wiki/BoundingBox">BoundingBox</a> and translate should be fixed in revision 6188. <br />No it should only overwrite the <a class="wiki-page new" href="https://issues.qgis.org/projects/qgis/wiki/BoundingBox">BoundingBox</a> and translate if output format <br />is PS or EPS. That is determined according to the output file extension (.ps, .eps)<br />because mPrinter->outputFormat() does not work (always 0 ).</p>
<p>Please test. I am going to close this ticket and open a new for the problem with polygon holes.</p>
<p>Radim</p> QGIS Application - Bug report #345: Problems with printing to EPShttps://issues.qgis.org/issues/345?journal_id=139322009-08-21T22:46:00ZAnonymous
<ul></ul><p>Milestone Version 0.8 deleted</p>