https://issues.qgis.org/https://issues.qgis.org/favicon.ico2013-06-13T13:14:23ZQGIS Issue TrackingQGIS Application - Bug report #7927: composer fails to export with high dpi, without any messagehttps://issues.qgis.org/issues/7927?journal_id=420112013-06-13T13:14:23ZHien TRAN-QUANG
<ul></ul><p>Hello.</p>
<p>I can't reproduce your bug. Exports as images (jpg) are fine for me on my test case. (QGis MASTER a3ea7ce/ Ubuntu 12.04LTS 64bits, size of A0 up to 500 dpi, but really slow over 300dpi).</p>
<p>Can you please tell us what platform/OS you are on and whether you are on 32 or 64bits system. It seems that Qt's qImage does a memory check to avoid memory overflow, which depends on the platform you're on (cf src/gui/image/qimage.cpp of the Qt SDK) and in every case is limited to malloc calls.</p>
<p>So I think this bug is QT-related and not QGIS. Maybe a simple check just like QT's and a messagebox would be enough.</p> QGIS Application - Bug report #7927: composer fails to export with high dpi, without any messagehttps://issues.qgis.org/issues/7927?journal_id=420262013-06-14T05:58:37ZRegis Haubourgregis.haubourg@oslandia.com
<ul></ul><p>Hi, <br />I'm running OSGEO4W master under windows 7 enterprise 64 bits service pack 1. I remember having the same problem in old master branch with XP machine. I have 16 Go RAM. I hope it's not a QT bug...<br />régis</p> QGIS Application - Bug report #7927: composer fails to export with high dpi, without any messagehttps://issues.qgis.org/issues/7927?journal_id=422462013-06-21T22:22:44ZMarco Hugentoblermarco.hugentobler@sourcepole.ch
<ul><li><strong>Status</strong> changed from <i>Open</i> to <i>Closed</i></li></ul><p>Fixed in changeset <a class="changeset" href="https://issues.qgis.org/projects/qgis/repository/revisions/aa0a17b253f73ddaa913a09637a00175e3464a74" title="Merge pull request #670 from tqhien/master Fix #7927 : Add a warning message if trying to print ...">aa0a17b253f73ddaa913a09637a00175e3464a74</a>.</p> QGIS Application - Bug report #7927: composer fails to export with high dpi, without any messagehttps://issues.qgis.org/issues/7927?journal_id=423132013-06-25T00:05:48ZRegis Haubourgregis.haubourg@oslandia.com
<ul><li><strong>Status</strong> changed from <i>Closed</i> to <i>Reopened</i></li></ul><p>Threshold is too low. I was able to print a 300 dpi with no problem on A1 paper size, in yesterday's osgeo4w revision. Today with error message, even 150 dpi is impossible. We have a regression and this is now a blocker then ;-)</p> QGIS Application - Bug report #7927: composer fails to export with high dpi, without any messagehttps://issues.qgis.org/issues/7927?journal_id=423142013-06-25T02:11:32ZGiovanni Manghigiovanni.manghi@gmail.com
<ul></ul><p>just for curiosity: isn't this the old issue of printing on Windows? As QGIS on win is 32bit then it can use just 4gb of ram (actually much less) and then priting of large/complex layouts fails. In my experience the same layouts do print ok on 64bit Linux/Mac boxes.</p> QGIS Application - Bug report #7927: composer fails to export with high dpi, without any messagehttps://issues.qgis.org/issues/7927?journal_id=423182013-06-25T02:36:39ZRegis Haubourgregis.haubourg@oslandia.com
<ul><li><strong>Assignee</strong> set to <i>Marco Hugentobler</i></li></ul><p>Well, not sure if it is the same issue. Old one lead to crash, new one lead to no action. I'm now testing with 64 bit Win 7.. I guess a warning message is necessary, but user should be able to try to export anyway. <br />Régis</p> QGIS Application - Bug report #7927: composer fails to export with high dpi, without any messagehttps://issues.qgis.org/issues/7927?journal_id=423252013-06-25T03:27:43ZJürgen Fischerjef@norbit.de
<ul></ul><p>regis Haubourg wrote:</p>
<blockquote>
<p>I'm now testing with 64 bit Win 7..</p>
</blockquote>
<p>With a 64bit build? Otherwise it doesn't matter if you running on a 32 or 64bit Windows.</p> QGIS Application - Bug report #7927: composer fails to export with high dpi, without any messagehttps://issues.qgis.org/issues/7927?journal_id=425252013-07-01T01:32:14ZHien TRAN-QUANG
<ul></ul><p>The problem is not QGIS but QT ! Presently, exporting an image goes throught QT's memory checks, which depends on the platform (max integer values differ) and the memory (on the heap) available. The error message I introduced only reflects that QT is failing platform tests and/or can't allocate memory for the image. Export can't be done.</p>
<p>To get over QT's memory check needs a complete change in image export (use of imagemagick if QT fails ?)</p> QGIS Application - Bug report #7927: composer fails to export with high dpi, without any messagehttps://issues.qgis.org/issues/7927?journal_id=425272013-07-01T03:21:30ZRegis Haubourgregis.haubourg@oslandia.com
<ul></ul><p>Hi, tested today, and i could export 220 dpi - A1 with no problem. A1 - 300 dpi raised a message (see attached screenshot). <br />As I could export in 300 dpi on the same platform some days ago, before the revision adding that message, could we just add a "continue anyway" button? it seems that QT test are a bit pessimistic. <br />Cheers <br />Régis</p> QGIS Application - Bug report #7927: composer fails to export with high dpi, without any messagehttps://issues.qgis.org/issues/7927?journal_id=425502013-07-01T13:20:53ZHien TRAN-QUANG
<ul></ul><p>Sorry, but a "Continue" button won't do anything. We cannot presently rewrite QT source code (even if it would be useful as for SVG export).</p>
<p>Maybe the only way to sort it out for now is for Osgeo4W to build QGIS with a greater HEAP/other linking options.</p> QGIS Application - Bug report #7927: composer fails to export with high dpi, without any messagehttps://issues.qgis.org/issues/7927?journal_id=425612013-07-01T21:54:09ZRegis Haubourgregis.haubourg@oslandia.com
<ul></ul><p>Hi, <br />sorry I probably missed something, I thought error message was raised on QGIS side to prevent possible error on QT image export. Any idea of a possible solution in new Qt version.. Not being able to export 600 dpi for printing will be a great blocker for professionnal users. <br />cheers, <br />régis</p> QGIS Application - Bug report #7927: composer fails to export with high dpi, without any messagehttps://issues.qgis.org/issues/7927?journal_id=426082013-07-04T14:25:56ZHien TRAN-QUANG
<ul></ul><p>The problem is that QT (4.8 or 5.0) does not raise any error if it can't create the image export. It just returns a NULL object. That's why in the first ticket, there was no action. The warning message in QGIS just tells the user that his computer configuration cannot export the image (memory or max integer issue).</p>
<p>And since this revision, other features/revisions may have used some more memory.</p>
<p>Is exporting a 600dpi PDF or building your own QGIS from source a possible workaround ?</p> QGIS Application - Bug report #7927: composer fails to export with high dpi, without any messagehttps://issues.qgis.org/issues/7927?journal_id=426192013-07-04T23:12:21ZRegis Haubourgregis.haubourg@oslandia.com
<ul></ul><p>Why building QGIS from source could solve this?</p> QGIS Application - Bug report #7927: composer fails to export with high dpi, without any messagehttps://issues.qgis.org/issues/7927?journal_id=426212013-07-04T23:36:11ZHien TRAN-QUANG
<ul></ul><p>You can specify a different value for heap/stack size, large data flags (see <a class="external" href="http://msdn.microsoft.com/en-us/library/aa366778%28v=vs.85%29.aspx">http://msdn.microsoft.com/en-us/library/aa366778%28v=vs.85%29.aspx</a>)</p>
<p>I don't have a windows build environment for now, so I can't test those parameters.</p> QGIS Application - Bug report #7927: composer fails to export with high dpi, without any messagehttps://issues.qgis.org/issues/7927?journal_id=426282013-07-05T00:40:48ZRegis Haubourgregis.haubourg@oslandia.com
<ul><li><strong>Status</strong> changed from <i>Reopened</i> to <i>Closed</i></li></ul><p>Ok thanks, this issue could be solved by an official 64 bit build, discussed today in the lists. <br />I think issue can be closed then, I will probably fund a part of a 64 bit release. <br />Tanks a lot for your answers. <br />Régis</p> QGIS Application - Bug report #7927: composer fails to export with high dpi, without any messagehttps://issues.qgis.org/issues/7927?journal_id=427342013-07-08T23:52:21ZGiovanni Manghigiovanni.manghi@gmail.com
<ul><li><strong>Category</strong> set to <i>33</i></li></ul> QGIS Application - Bug report #7927: composer fails to export with high dpi, without any messagehttps://issues.qgis.org/issues/7927?journal_id=429722013-07-12T13:10:10ZGiovanni Manghigiovanni.manghi@gmail.com
<ul><li><strong>File</strong> <a href="/attachments/download/5989/print_tests.tar.gz">print_tests.tar.gz</a> added</li></ul><p>regis Haubourg wrote:</p>
<blockquote>
<p>Ok thanks, this issue could be solved by an official 64 bit build, discussed today in the lists. <br />I think issue can be closed then, I will probably fund a part of a 64 bit release.</p>
</blockquote>
<p>Waiting for an eventual solution thanks to a 64bit build for Windows, I still see crashes on Windows and blank PDF on 64bit Linux, using on the latest master revision:</p>
<p>The attached project is made of a hand full of Spatialite vectors, no fancy symbology, no labels.</p>
<p>Printing as vector works up to A0 and 600dpi.</p>
<p>Printing as raster causes QGIS to crash printing in A0 at 300 dpi (works at 250) and printing in A1 at 450 dpi (works at 300).</p>
<p>Printing as raster (A0 600dpi) fails also on Linux, but instead of crashing it produces silently a blank pdf.</p> QGIS Application - Bug report #7927: composer fails to export with high dpi, without any messagehttps://issues.qgis.org/issues/7927?journal_id=463422013-11-14T00:06:22ZStefan Blumentrath
<ul></ul><p>The GarminCustomMap plugin is facing a similar problem (e.g. #5077) when directly importing the mapCanvas, I think.<br />Like Hien suggests, I tguess it is (at least partly) a Qt issue (see also: <a class="external" href="http://stackoverflow.com/questions/13574670/problems-with-large-qimage">http://stackoverflow.com/questions/13574670/problems-with-large-qimage</a>).</p>
<p>However, A0 with 600 DPI is a little less than ca. 20,000 x 30,000 pixels (300 DPI would be 10,000 x 15,000 pixels), which is below Qt`s hard limits (32,768 x 32,768 pixels).</p>
<p>Also, using an image-format with a lower color-depth might help a bit (e.g. QImage::Format_RGB555 instead of QImage::Format_ARGB32) When exporting a QImage.</p>
<p>When directly exporting from mapRenderer even my old 32bit Ubuntu Laptop with 1GB memory manages to export a QImage of 20,000 x 15,000 pixels (Format_RGB555) to PNG.</p>