Bug report #11924

Composer compatibility issues between 2.4 and 2.6

Added by Bogdan Hlevca over 5 years ago. Updated almost 5 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Map Composer/Printing
Affected QGIS version:2.6.0 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:fixed/implemented
Crashes QGIS or corrupts data:No Copied to github as #:20133

Description

I have a project created in 2.4 and when I open the Composer the frame is not displayed. Moreover, the coordinates around the frame also do not appear and whatever I tried to do did not help.

There is either a incompatibility between 2.4 and 2.6 at composer level or there is a bug. I create my versions from GIT and just switching the checkout version produces this error. According to some reports that can be read at the link below the issue appears for some and not for others. This will rather point to a incompatibility, maybe deleting/renaming the ".qgis2" director could help, but I would lose all my history and settings. I will have to check that, but at the time I am under time pressure to fix some maps and for the time being I reverted to 2.4.

There is definitely a problem but we need to find what that is.
There are other issues with the composer most likely due to the same incompatibility. For example :
1) the map is set by default to Rectangle
2) after changing it to Render the map takes minutes to appear

[[https://gis.stackexchange.com/questions/120887/zebra-grid-is-not-displayed-in-map-composer/127740#127740]]

QGIS-bugdemo.zip (208 KB) Bogdan Hlevca, 2014-12-29 05:53 PM

comp.png (22.8 KB) Giovanni Manghi, 2014-12-29 11:58 PM

Screen_Shot_2015-10-04_at_1.54.13_PM.png (669 KB) JuanCarlos Bravo, 2015-10-04 01:56 PM

History

#1 Updated by Giovanni Manghi over 5 years ago

  • Status changed from Open to Feedback
  • Category set to Map Composer/Printing

Does it happens with qgis 2.6.1 or master?

#2 Updated by Bogdan Hlevca over 5 years ago

I updated the bug but it created another one, sorry Can you please remove the duplicate?

it is 2.6.1

#3 Updated by Nyall Dawson over 5 years ago

Can you please attach a project file which demonstrates this issue?

#4 Updated by Bogdan Hlevca over 5 years ago

I'll try to do it by tomorrow

#5 Updated by Bogdan Hlevca over 5 years ago

Attached is a small project the show the problem.

The only grid frame that works is the rectangle, Zebra and the others don't. In addition the coordinate do not appear and it does not matter if they are set to be rendered inside or outside the frame.

I dill try to rename ~/.qgis2 to see if that fixes the issue.

#6 Updated by Giovanni Manghi over 5 years ago

Bogdan Hlevca wrote:

Attached is a small project the show the problem.

The only grid frame that works is the rectangle, Zebra and the others don't. In addition the coordinate do not appear and it does not matter if they are set to be rendered inside or outside the frame.

I just tested it on qgis master and it seems ok, see attached image.

#7 Updated by Nyall Dawson over 5 years ago

Works fine here too (Ubuntu 14.10). Did you change the render method for the map item from "Rectangle" to "Render" or "Cache"? Grids won't be drawn if the map is set to Rectangle mode.

The second part of your report (default to rectangle mode) is a duplicate of #6085

#8 Updated by Bogdan Hlevca over 5 years ago

Of course I set it to Render, with Rectangle the map does not get drawn. And this project was creates in 2.6.1 which means this is not a compatibility issue but rather something changed in the way the Composer works and I suspect you don't test on all possible platforms. Perhaps is a library that I am missing and ccmake does not catch?

I even renamed ~/.gis2 and ~/.config/Qgis

I work and compile on Opensuse. I don't know what can cause this problem with 2.6.1. The 2.4 version also compiled on the same machine and the same libraries works fine.
Should we look at specific libraries, error in the log file? The 2.6.1 compiled just fine and I get some developer warnings in ccmake.

I also tried the compiled version from the specialized Application::Geo repositories and has the same problem. I conclude that there is some library that does not behave properly. Can you help in finding the problem? Otherwise I am stuck with 2.4

#9 Updated by Bogdan Hlevca over 5 years ago

I get this error that appears when I switch to Zebra.

Warning: QPainter::setCompositionMode: Blend modes not supported on device

Also, coordinates and outer ticks do not show so I suspect that anything painted outside the frame gets lost

Based on this finding I hope that you can figure out what's the problem. It points to a QT problem, here is the ldd output

[email protected]:~> ldd /usr/bin/qgis
        linux-vdso.so.1 (0x00007fff836b3000)
        libqwt.so.5 => /usr/lib64/libqwt.so.5 (0x00007f307b81e000)
        libQtSql.so.4 => /usr/lib64/libQtSql.so.4 (0x00007f307b5dd000)
        libQtWebKit.so.4 => /usr/lib64/libQtWebKit.so.4 (0x00007f3079285000)
        libgdal.so.1 => /usr/lib64/libgdal.so.1 (0x00007f307833c000)
        libqgis_core.so.2.7.0 => /usr/lib64/libqgis_core.so.2.7.0 (0x00007f3077a41000)
        libqgis_gui.so.2.7.0 => /usr/lib64/libqgis_gui.so.2.7.0 (0x00007f30772f1000)
        libqgis_analysis.so.2.7.0 => /usr/lib64/libqgis_analysis.so.2.7.0 (0x00007f3077075000)
        libpq.so.5 => /usr/lib64/libpq.so.5 (0x00007f3076e46000)
        libQtXml.so.4 => /usr/lib64/libQtXml.so.4 (0x00007f3076bff000)
        libQtCore.so.4 => /usr/lib64/libQtCore.so.4 (0x00007f3076714000)
        libQtGui.so.4 => /usr/lib64/libQtGui.so.4 (0x00007f3075a53000)
        libQtNetwork.so.4 => /usr/lib64/libQtNetwork.so.4 (0x00007f307570e000)
        libQtSvg.so.4 => /usr/lib64/libQtSvg.so.4 (0x00007f30754b6000)
        libqscintilla2.so.11 => /usr/lib64/libqscintilla2.so.11 (0x00007f3074fb9000)
        libproj.so.0 => /usr/lib64/libproj.so.0 (0x00007f3074d66000)
        libgeos_c.so.1 => /usr/lib64/libgeos_c.so.1 (0x00007f3074b3f000)
        libspatialindex.so.2 => /usr/lib64/libspatialindex.so.2 (0x00007f307487c000)
        libexpat.so.1 => /usr/local/lib64/libexpat.so.1 (0x00007f3074652000)
        libsqlite3.so.0 => /usr/lib64/libsqlite3.so.0 (0x00007f3074390000)
        libspatialite.so.5 => /usr/lib64/libspatialite.so.5 (0x00007f3073d8d000)
        libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00007f3073a84000)
        libm.so.6 => /lib64/libm.so.6 (0x00007f3073783000)
        libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f307356c000)
        libc.so.6 => /lib64/libc.so.6 (0x00007f30731c3000)
        libXrender.so.1 => /usr/lib64/libXrender.so.1 (0x00007f3072fb9000)
        libjpeg.so.8 => /usr/lib64/libjpeg.so.8 (0x00007f3072d64000)
        libpng16.so.16 => /usr/lib64/libpng16.so.16 (0x00007f3072b26000)
        libwebp.so.5 => /usr/lib64/libwebp.so.5 (0x00007f30728ca000)
        libxslt.so.1 => /usr/lib64/libxslt.so.1 (0x00007f307268b000)
        libz.so.1 => /lib64/libz.so.1 (0x00007f3072474000)
        libxml2.so.2 => /usr/lib64/libxml2.so.2 (0x00007f3072109000)
        libgstapp-1.0.so.0 => /usr/lib64/libgstapp-1.0.so.0 (0x00007f3071efc000)
        libgstpbutils-1.0.so.0 => /usr/lib64/libgstpbutils-1.0.so.0 (0x00007f3071cd3000)
        libgstvideo-1.0.so.0 => /usr/lib64/libgstvideo-1.0.so.0 (0x00007f3071a88000)
        libgstaudio-1.0.so.0 => /usr/lib64/libgstaudio-1.0.so.0 (0x00007f307183d000)
        libgstbase-1.0.so.0 => /usr/lib64/libgstbase-1.0.so.0 (0x00007f30715e1000)
        libgstreamer-1.0.so.0 => /usr/lib64/libgstreamer-1.0.so.0 (0x00007f30712d3000)
        libgobject-2.0.so.0 => /usr/lib64/libgobject-2.0.so.0 (0x00007f3071082000)
        libglib-2.0.so.0 => /usr/lib64/libglib-2.0.so.0 (0x00007f3070d73000)
        libfontconfig.so.1 => /usr/lib64/libfontconfig.so.1 (0x00007f3070b35000)
        libQtOpenGL.so.4 => /usr/lib64/libQtOpenGL.so.4 (0x00007f3070835000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f3070617000)
        libGL.so.1 => /usr/lib64/libGL.so.1 (0x00007f30702c9000)
        libX11.so.6 => /usr/lib64/libX11.so.6 (0x00007f306ff8b000)
        libpoppler.so.46 => /usr/lib64/libpoppler.so.46 (0x00007f306fb05000)
        libfreexl.so.1 => /usr/lib64/libfreexl.so.1 (0x00007f306f8fb000)
        libgeos-3.4.2.so => /usr/lib64/libgeos-3.4.2.so (0x00007f306f557000)
        libodbc.so.2 => /usr/lib64/libodbc.so.2 (0x00007f306f2ee000)
        libodbcinst.so.2 => /usr/lib64/libodbcinst.so.2 (0x00007f306f0db000)
        libltdl.so.7 => /usr/lib64/libltdl.so.7 (0x00007f306eed0000)
        libxerces-c-3.1.so => /usr/lib64/libxerces-c-3.1.so (0x00007f306e916000)
        libjasper.so.1 => /usr/lib64/libjasper.so.1 (0x00007f306e6bc000)
        libnetcdf.so.7 => /usr/lib64/libnetcdf.so.7 (0x00007f306e368000)
        libhdf5.so.9 => /usr/lib64/libhdf5.so.9 (0x00007f306dd76000)
        libgif.so.6 => /usr/lib64/libgif.so.6 (0x00007f306db6d000)
        libgeotiff.so.2 => /usr/lib64/libgeotiff.so.2 (0x00007f306d93a000)
        libtiff.so.5 => /usr/lib64/libtiff.so.5 (0x00007f306d6c5000)
        librt.so.1 => /lib64/librt.so.1 (0x00007f306d4bd000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007f306d2b8000)
        libpcre.so.1 => /usr/lib64/libpcre.so.1 (0x00007f306d04e000)
        libcurl.so.4 => /usr/lib64/libcurl.so.4 (0x00007f306cddd000)
        libssl.so.1.0.0 => /lib64/libssl.so.1.0.0 (0x00007f306cb75000)
        libcrypto.so.1.0.0 => /lib64/libcrypto.so.1.0.0 (0x00007f306c753000)
        libkrb5.so.3 => /usr/lib64/libkrb5.so.3 (0x00007f306c481000)
        libcom_err.so.2 => /lib64/libcom_err.so.2 (0x00007f306c27d000)
        libgssapi_krb5.so.2 => /usr/lib64/libgssapi_krb5.so.2 (0x00007f306c035000)
        libldap_r-2.4.so.2 => /usr/lib64/libldap_r-2.4.so.2 (0x00007f306bddf000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f307bb42000)
        libfreetype.so.6 => /usr/lib64/libfreetype.so.6 (0x00007f306bb49000)
        libSM.so.6 => /usr/lib64/libSM.so.6 (0x00007f306b940000)
        libICE.so.6 => /usr/lib64/libICE.so.6 (0x00007f306b723000)
        libXi.so.6 => /usr/lib64/libXi.so.6 (0x00007f306b513000)
        libXrandr.so.2 => /usr/lib64/libXrandr.so.2 (0x00007f306b308000)
        libXfixes.so.3 => /usr/lib64/libXfixes.so.3 (0x00007f306b102000)
        libXcursor.so.1 => /usr/lib64/libXcursor.so.1 (0x00007f306aef7000)
        libXinerama.so.1 => /usr/lib64/libXinerama.so.1 (0x00007f306acf3000)
        libXext.so.6 => /usr/lib64/libXext.so.6 (0x00007f306aae1000)
        liblzma.so.5 => /usr/lib64/liblzma.so.5 (0x00007f306a8ba000)
        liborc-0.4.so.0 => /usr/lib64/liborc-0.4.so.0 (0x00007f306a638000)
        libgsttag-1.0.so.0 => /usr/lib64/libgsttag-1.0.so.0 (0x00007f306a3fe000)
        libgmodule-2.0.so.0 => /usr/lib64/libgmodule-2.0.so.0 (0x00007f306a1fa000)
        libffi.so.4 => /usr/lib64/libffi.so.4 (0x00007f3069ff1000)
        libnvidia-tls.so.343.22 => /usr/lib64/tls/libnvidia-tls.so.343.22 (0x00007f3069dee000)
        libnvidia-glcore.so.343.22 => /usr/lib64/libnvidia-glcore.so.343.22 (0x00007f3067186000)
        libxcb.so.1 => /usr/lib64/libxcb.so.1 (0x00007f3066f65000)
        liblcms2.so.2 => /usr/lib64/liblcms2.so.2 (0x00007f3066d0e000)
        libopenjpeg.so.1 => /usr/lib64/libopenjpeg.so.1 (0x00007f3066ae5000)
        libhdf5_hl.so.9 => /usr/lib64/libhdf5_hl.so.9 (0x00007f30668c0000)
        libjbig.so.2 => /usr/lib64/libjbig.so.2 (0x00007f30666b4000)
        libidn.so.11 => /usr/lib64/libidn.so.11 (0x00007f306647f000)
        libssh2.so.1 => /usr/lib64/libssh2.so.1 (0x00007f3066256000)
        liblber-2.4.so.2 => /usr/lib64/liblber-2.4.so.2 (0x00007f3066047000)
        libldap-2.4.so.2 => /usr/lib64/libldap-2.4.so.2 (0x00007f3065dfa000)
        libk5crypto.so.3 => /usr/lib64/libk5crypto.so.3 (0x00007f3065bca000)
        libkrb5support.so.0 => /usr/lib64/libkrb5support.so.0 (0x00007f30659bd000)
        libkeyutils.so.1 => /lib64/libkeyutils.so.1 (0x00007f30657b8000)
        libresolv.so.2 => /lib64/libresolv.so.2 (0x00007f30655a1000)
        libsasl2.so.3 => /usr/lib64/libsasl2.so.3 (0x00007f3065384000)
        libuuid.so.1 => /usr/lib64/libuuid.so.1 (0x00007f306517e000)
        libXau.so.6 => /usr/lib64/libXau.so.6 (0x00007f3064f7a000)
        libselinux.so.1 => /lib64/libselinux.so.1 (0x00007f3064d55000)

#10 Updated by Bogdan Hlevca over 5 years ago

Actually I get this message in 2.4 as well, but it happens earlier

Warning: QPainter::setCompositionMode: Blend modes not supported on device

It is strange, I saw a bug report related to the same warning being closed because it was suspected that the rendering stack was in a peculiar state. However, in this case I have the same setup and get different behaviour from 2 different versions of QGIS so it must be related on how QGIS is using the renderer.

#11 Updated by Nyall Dawson over 5 years ago

I'm stumped - do you have hardware acceleration available? I can't think of any other reason why Qt wouldn't support composition modes.

#12 Updated by Bogdan Hlevca over 5 years ago

My worst suspicions were confirmed. Well, I guess in the end it is a QT bug and I found this based on you last comments.
Of course I have acceleration, I have a a Nvidia Quatro 620 running the manufacturer's driver. Everything is runs OK

I work a lot in photography and I have a 10 bit / channel capable monitor and my card + display port + Nvidia driver are capable of that. However, QT in raster mode can't do that and has to be put in native mode with this

export QT_GRAPHICSSYSTEM=native

This is what screws up the zebra and anything that drawn outside the frame. I wonder what did you change from 2.4 which is working fine even in native setting, but it does not in 2.6.

When I disable the native setting 2.6 renders fine. I wonder what can be done so that what you do works properly with rendering in native mode. I will file a bug report with QT as well, but I think that this a could be done at your level as it is working in 2.4

#13 Updated by Bogdan Hlevca over 5 years ago

Blending is disabled in native mode

[[http://doc.qt.digia.com/4.6/qpainter.html#beginNativePainting]]

you obviously code pecifically for raster only as setCompositeMode supports only raster ant that's fully supported only on QImage objects. [[http://doc.qt.digia.com/4.6/qpainter.html#setCompositionMode]]

I had the same problem in digikam. They have the same issue with QImage rendering, which I think is very limited and should not be used for photography. QGIS is different although I can see for example, for TIFF rendering that will limit the number of colours available. QT5.4 had just fixed the native issue. QT5.3 for example does not support native at all and 30 bit colour mode is not supported. These high colour modes (wide gamut) become more and more available I think one should think for the future and accommodate these new technologies in the programming style.

This in the end is your call, you can leave it to QT to fix their issues or use tools from them that go around the problem. I see this as a bug nevertheless, even though is not directly yours, but 2.4 was working fine with whatever you were using then.

#14 Updated by Bogdan Hlevca over 5 years ago

For those who still want to keep system wide native rendering but have latest Qgis working properly you can create a wrapper script to do this:

#!/bin/sh
export QT_GRAPHICSSYSTEM=raster
qgis

But as I said in my previous update you can get only 8 bit/color in this raster mode. In native mode Qt uses the X11 canvas and is more color capable. Qt is years behind in color management support.

#15 Updated by Nyall Dawson over 5 years ago

QT5.4 had just fixed the native issue

Do you have any further information about this? I can't find anything relevant.

Also, QGIS now supports Qt 5 builds. Would you be able to test with a Qt 5 built of QGIS to see if this issue is fixed?

#16 Updated by Bogdan Hlevca over 5 years ago

QT5.4 had just fixed the native issue

Do you have any further information about this? I can't find anything relevant.

You can read about it here: [[https://bugreports.qt-project.org/browse/QTBUG-25998]]

Also, QGIS now supports Qt 5 builds. Would you be able to test with a Qt 5 built of QGIS to see if this issue is fixed?

I would be able, but I need some guidance how to get those sources and how to build them.

#17 Updated by JuanCarlos Bravo almost 5 years ago

I have the Exact same issue on QGIS 2.8.1-Wien running on MacOSX
No matter what I choose on Frame Style it does not display anything. The only attribute that responds is Frame line thickness. Same for Draw Coordinates.
I have no programing experience and am fairly new to QGIS, but I haven't found the issue mentioned anywhere else so I thought this was my best chance of getting some help.

#18 Updated by Nyall Dawson almost 5 years ago

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

This issue was fixed in 2.8.3 and 2.10 - no qt5 build required.

Also available in: Atom PDF