Bug report #10599
Composer blank page - QPixmap It is not safe to use pixmaps outside the GUI thread
|Affected QGIS version:||master||Regression?:||No|
|Operating System:||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||19004|
When I try to print (to the printer) a map in Composer, with just raster data in canvas, I get a blank page.
If the composer has grids, annotations, legend, images, etc., everything is printed correctly, except the raster data from canvas, that does not appear, and I get the QT log message:
QPixmap: It is not safe to use pixmaps outside the GUI thread (Level 1).
Also, if I have vector data on canvas, they are printed correctly, only the raster data does not and throws that message (it happens both with raster data in GeoTIFF file format, as in WMS).
This only happens when printing to the printer. Exporting to image, pdf or svg, everything works fine.
1. Open QGIS and load a raster layer or WMS layer;
2. New print composer;
3. Add new map;
4. Print... (Ctrl+P);
5. Check Log Messages and Print Output.
Tested on Windows 7 (64 bits) with QGIS master 2.3.0-103 (5eddb74).
Hopefully fix #10599 (blank composer map when rendering rasters)
When printing on Windows, the printing does not seem to work
well in the worker thread as QImages get converted to QPixmaps.
Therefore we force the map rendering into main thread to avoid the issues.
I do not have a printer, so I can't confirm the fix really helps
#1 Updated by Pedro Venâncio over 6 years ago
I did some tests on other machines:
- Windows 7 with QGIS master (OSGeo4W ) -> this is the same environment as the first machine and I get the same error and blank output;
- Windows 7 with QGIS master (OSGeo4W ) -> everything ok, prints without problems;
- Linux Ubuntu 12.04 with QGIS master -> everything ok, prints without problems.
So the problem seems to be only on 64bit versions of QGIS. I have no 64bit Linux machine where I can test.