Bug report #3687

Unable to export large / high resolution / detailed scale maps

Added by bderstine - over 3 years ago. Updated 4 months ago.

Status:Closed Start Date:
Priority:Low Due date:
Assigned to:Marco Hugentobler % Done:

0%

Category:Map Composer / Printing
Target version:Version 2.0.0
Platform:All Patch supplied:No
Platform version:Windows 7; Kubuntu 10.10 64 bits Affected version:master
Status info:1 Causes crash or corruption:No
Resolution:fixed/implemented Tag:

Description

From Print Composer:
1. Change Quality 300 dpi to 500 or 600 for example.
2. Export to Image... (png) OR Export to PDF...
3. OK...
Error: Exception. Bad Allocation. (see attached image)

The current print composer layout is lost and apparently irretrievable unless it was saved with the .qgs file.

PrintDPIerror.png - Error Message Screen Capture (122 kB) bderstine -, 03/29/2011 10:36 am

History

Updated by Maxim Dubinin over 3 years ago

I cannot confirm, just tried on WinXP, f42443c9 (SVN r15701).

Can you provide more specifics on what are you doing, what data are you using (if any) and QGIS revision.

Updated by Mayeul Kauffmann over 3 years ago

I successfully created an A4 600 dpi map (11Mb in png, 3 Mb in vector pdf) on Kubuntu 10.10 (64 bits).

However, I tried an A0 at 600 dpi in png, it failed. First I was asked:

To create image 28086x19866 requires about 1673 MB of memory. Proceed?

I clicked yes (my PC has 4GB of RAM). Then there was the message:

Creation of image with 28086x19866 pixels failed. Export aborted.

No crash for me however. My test dataset is pure vector: OSM data for Milano and surrounding, stored on postgis thanks to osm2postgresql, using rule-based render.

I was able to export the above in A0 but in vector pdf (20 Mega bytes). If you can export in vector pdf, you can convert later on in raster, as a workaround (for instance, gimp does this, but command line solutions might be less memory hungry).

Updated by Mayeul Kauffmann over 3 years ago

I made a tougher test: export 20% of OSM data for Italy on a 11 meter by 8 meter (sic) pdf vector map. It crashed after a few minutes (Kubuntu 10.10 64 bits, qgis trunk 1.7.0 5b1e7999 (SVN r15719)).

It seems that the size limit for getting the bug is OS or machine specific. @gislab: what if you try to export a very large file?

Updated by Maxim Dubinin over 3 years ago

Replying to [comment:2 mayeulk]:

To create image 28086x19866 requires about 1673 MB of memory. Proceed? I clicked yes (my PC has 4GB of RAM). Then there was the message: Creation of image with 28086x19866 pixels failed. Export aborted.

It failed with the same message on WinXP, fbd10b55 (SVN r15741).
It might be running into some system limitations, the file that is being created would have 600 millions pixels.

Updated by Anne Ghisla over 3 years ago

I'm running QGIS f8e10a33 (SVN r15725), Fedora 14, 2GB RAM, and I get the same messages as mayeulk and gislab, if I try to export in A0 at 600 dpi in png format.

If I choose a higher resolution (800 dpi), then I directly get the Export aborted message, without any crash.

Updated by bderstine - over 3 years ago

Was away for a bit, here are the answers to all of the great questions and discussion that have been going on... At the time of reporting, I was running 15622. I have since updated to 15740 and it appears to be resolved as far as I can tell.

My data is all basic shapefiles, census county boundaries, plus a few million point features, and the standard map elements: scale bar, title, north arrow, legend, notes.

Another symptom of the crash was that my composer window would go blank (As you can see in the attached photo). I would have to shut down qgis, don't save the file, and reopen in order to get my saved composer layout back.

Updated by Giovanni Manghi over 3 years ago

I tested on Ubuntu machine 32 bit 4gb of ram, qgis trunk.

I added a 3gb raster image and created a A0 layout, streching the image almost at full layout extent.

I can produce a PDF at 300dpi and 400 dpi. At 500dpi QGIS crashes silently with a seg fault.

Updated by Donkagen2 - over 3 years ago

I get the same problem ("bad allocation" exception) under Windows XP with both 1.6.0 and trunk a954488.

I created a A0 layout and succesfully printed via the pdfFactory driver to a valid PDF at 300 dpi. I then enabled a layer to add text... and it generated the exception. Export to PDF and SVG fail with the same exception. Export to image reported "Creation of image 14043x9933 pixels failed. Export aborted."

QGIS has to be restarted to allow Print Composer to run again.

Reducing the resolution to 200 dpi word printing directly (took over 10 minutes!) Exporting as a PNG worked at this resolution. Exporting as a PDF didn't crash QGIS, but then crashed Adobe Reader X. Exporting to SVG generated the "bad allocation" exception.

Updated by Giovanni Manghi almost 3 years ago

  • Target version changed from Version 1.7.0 to Version 1.7.4

Updated by Paolo Cavallini over 2 years ago

  • Target version changed from Version 1.7.4 to Version 1.8.0
  • Affected version set to master
  • Causes crash or corruption set to No

Updated by stefano campus about 2 years ago

is it the same ticket in #4821?
this error affects export both pdf and tif, depending on resolution.
in my case with A3, 500 dpi is the limit and by the way often qgis crashes or the resulting file has some errors.

Updated by Giovanni Manghi about 2 years ago

  • Patch supplied set to No

stefano campus wrote:

is it the same ticket in #4821? this error affects export both pdf and tif, depending on resolution. in my case with A3, 500 dpi is the limit and by the way often qgis crashes or the resulting file has some errors.

it is likely to be the same issue. Anyway, have you tested on Linux? As far as I know is an issue that affects only Windows systems.

Updated by stefano campus about 2 years ago

no, i can't.
as it is a very blocking problem (it' s necessary to share information not only to handle), do you think/know if there is any "workaround" solutin to this (windows) bug?

Updated by Giovanni Manghi about 2 years ago

stefano campus wrote:

no, i can't. as it is a very blocking problem (it' s necessary to share information not only to handle), do you think/know if there is any "workaround" solutin to this (windows) bug?

are you on XP? or a later windows version? 32 or 64bit?

Updated by stefano campus about 2 years ago

win7 professional 32bit 4GB RAM

Updated by Paolo Cavallini about 2 years ago

  • Target version changed from Version 1.8.0 to Version 2.0.0

Updated by J├╝rgen Fischer 6 months ago

  • Category changed from 33 to Map Composer / Printing

Updated by Nyall Dawson 4 months ago

  • Status changed from Open to Closed
  • Resolution set to fixed/implemented

Given that QGIS master warns if an output will exceed available memory, and that this is not an issue in the 64 bit packages I think we've done everything we can here...

Also available in: Atom PDF