Bug report #3687
Unable to export large / high resolution / detailed scale maps
Status: | Closed | ||
---|---|---|---|
Priority: | Low | ||
Assignee: | Marco Hugentobler | ||
Category: | Map Composer/Printing | ||
Affected QGIS version: | master | Regression?: | No |
Operating System: | All | Easy fix?: | No |
Pull Request or Patch supplied: | No | Resolution: | fixed/implemented |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 13746 |
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.
History
#1 Updated by Maxim Dubinin over 13 years ago
#2 Updated by Mayeul Kauffmann over 13 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).
#3 Updated by Mayeul Kauffmann over 13 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?
#4 Updated by Maxim Dubinin over 13 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.
#5 Updated by Anne Ghisla over 13 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.
#6 Updated by bderstine - over 13 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.
#7 Updated by Giovanni Manghi over 13 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.
#8 Updated by Donkagen2 - over 13 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.
#9 Updated by Giovanni Manghi almost 13 years ago
- Target version changed from Version 1.7.0 to Version 1.7.4
#10 Updated by Paolo Cavallini over 12 years ago
- Affected QGIS version set to master
- Crashes QGIS or corrupts data set to No
- Target version changed from Version 1.7.4 to Version 1.8.0
#11 Updated by stefano campus about 12 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.
#12 Updated by Giovanni Manghi about 12 years ago
- Pull Request or 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.
#13 Updated by stefano campus about 12 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?
#14 Updated by Giovanni Manghi about 12 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?
#15 Updated by stefano campus about 12 years ago
win7 professional 32bit 4GB RAM
#16 Updated by Paolo Cavallini about 12 years ago
- Target version changed from Version 1.8.0 to Version 2.0.0
#17 Updated by Jürgen Fischer over 10 years ago
- Category changed from 33 to Map Composer/Printing
#18 Updated by Nyall Dawson over 10 years 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...