qgis / QGIS

QGIS is a free, open source, cross platform (lin/win/mac) geographical information system (GIS)
https://qgis.org
GNU General Public License v2.0
10.55k stars 3k forks source link

segmentation fault when switching quickmapservice basemap OTF from 3857 to 4326 #24812

Closed qgib closed 7 years ago

qgib commented 7 years ago

Author Name: Steven Kay (Steven Kay) Original Redmine Issue: 16913 Affected QGIS version: 2.18.10 Redmine category:map_canvas


I normally have this sort of workflow for relief maps:-

However step 4 - changing OTF to 4326 - reliably causes a segfault in QGIS 2.18.10 on Xenial

I'm pretty sure this worked in 2.18.10 when I was on Trusty, I very recently updated to Xenial.

Here's what I get in the 'About QGIS' box

QGIS version 2.18.10
QGIS code revision 59e0f78
Compiled against Qt 4.8.7
Running against Qt 4.8.7
Compiled against GDAL/OGR 1.11.3
Running against GDAL/OGR 1.11.3
Compiled against GEOS 3.5.0-CAPI-1.9.0
Running against GEOS 3.5.0-CAPI-1.9.0 r4084
PostgreSQL Client Version 9.5.2
SpatiaLite Version 4.3.0a
QWT Version 5.2.3
PROJ.4 Version 492

I've tried turning off the "enable OTF to 3857" option in the plugin; same thing happens.

I can work around this by using either XYZ provider or the OpenLayers plugins I suspect WMS/WMTS may also work but haven't tried this.

Let me know if this should be raised with the Plugin author instead/as well. I raised this in case there's maybe an an edge case which isn't being caught when rendering.

gdb output follows

Drawing is skipped because map extent is empty or inf.

Thread 17 "Thread (pooled)" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x9f8ffb40 (LWP 22380)]
0x9560e8dc in GDALRasterBand::ReportError(CPLErr, int, char const*, ...) () from /usr/lib/libgdal.so.20

(gdb) bt full
#_0  0x9560e8dc in GDALRasterBand::ReportError(CPLErr, int, char const*, ...) () from /usr/lib/libgdal.so.20
No symbol table info available.
#_1  0x9561329c in GDALRasterBand::RasterIO(GDALRWFlag, int, int, int, int, void*, int, int, GDALDataType, long long, long long, GDALRasterIOExtraArg*) () from /usr/lib/libgdal.so.20
No symbol table info available.
#_2  0x956135db in GDALRasterIOEx () from /usr/lib/libgdal.so.20
No symbol table info available.
#_3  0x95f89168 in ?? () from /usr/lib/python2.7/dist-packages/osgeo/_gdal.i386-linux-gnu.so
No symbol table info available.
#_4  0x9a09425b in PyCFunction_Call () from /usr/lib/i386-linux-gnu/libpython2.7.so.1.0
No symbol table info available.
#_5  0x9a031308 in PyEval_EvalFrameEx () from /usr/lib/i386-linux-gnu/libpython2.7.so.1.0
No symbol table info available.
#_6  0x9a16b81e in PyEval_EvalCodeEx () from /usr/lib/i386-linux-gnu/libpython2.7.so.1.0
No symbol table info available.
#_7  0x9a030ab1 in PyEval_EvalFrameEx () from /usr/lib/i386-linux-gnu/libpython2.7.so.1.0
No symbol table info available.
#_8  0x9a16b81e in PyEval_EvalCodeEx () from /usr/lib/i386-linux-gnu/libpython2.7.so.1.0
No symbol table info available.
#_9  0x9a030ab1 in PyEval_EvalFrameEx () from /usr/lib/i386-linux-gnu/libpython2.7.so.1.0
No symbol table info available.
#_10 0x9a16b81e in PyEval_EvalCodeEx () from /usr/lib/i386-linux-gnu/libpython2.7.so.1.0
No symbol table info available.
#_11 0x9a0a5085 in ?? () from /usr/lib/i386-linux-gnu/libpython2.7.so.1.0
No symbol table info available.
#_12 0x9a115c5d in PyObject_Call () from /usr/lib/i386-linux-gnu/libpython2.7.so.1.0
No symbol table info available.
#_13 0x9a0f7f37 in ?? () from /usr/lib/i386-linux-gnu/libpython2.7.so.1.0
No symbol table info available.
#_14 0x9a115c5d in PyObject_Call () from /usr/lib/i386-linux-gnu/libpython2.7.so.1.0
No symbol table info available.
#_15 0x9a16ac0c in PyEval_CallObjectWithKeywords () from /usr/lib/i386-linux-gnu/libpython2.7.so.1.0
No symbol table info available.
#_16 0x9a354de0 in ?? () from /usr/lib/python2.7/dist-packages/sip.i386-linux-gnu.so
No symbol table info available.
#_17 0x988530b3 in sipVH__core_397(PyGILState_STATE, void (*)(_sipSimpleWrapper*, PyGILState_STATE), _sipSimpleWrapper*, _object*, QgsRenderContext&)
    () from /usr/lib/python2.7/dist-packages/qgis/_core.i386-linux-gnu.so
No symbol table info available.
#_18 0x98c833a1 in sipQgsPluginLayer::draw(QgsRenderContext&) () from /usr/lib/python2.7/dist-packages/qgis/_core.i386-linux-gnu.so
---Type <return> to continue, or q <return> to quit---
No symbol table info available.
#_19 0xb6ab81c3 in ?? () from /usr/lib/libqgis_core.so.2.18.10
No symbol table info available.
#_20 0xb6a160f9 in QgsMapRendererCustomPainterJob::doRender() () from /usr/lib/libqgis_core.so.2.18.10
No symbol table info available.
#_21 0xb6a1619a in QgsMapRendererCustomPainterJob::staticRender(QgsMapRendererCustomPainterJob*) () from /usr/lib/libqgis_core.so.2.18.10
No symbol table info available.
#_22 0xb6a16fb7 in ?? () from /usr/lib/libqgis_core.so.2.18.10
No symbol table info available.
#_23 0xb63243c9 in ?? () from /usr/lib/i386-linux-gnu/libQtCore.so.4
No symbol table info available.
#_24 0xb6331d3e in ?? () from /usr/lib/i386-linux-gnu/libQtCore.so.4
No symbol table info available.
#_25 0xb13b2295 in start_thread (arg=0x9f8ffb40) at pthread_create.c:333
        __res = <optimised out>
        pd = 0x9f8ffb40
        now = <optimised out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {-1321443328, 0, 4001536, -1617958488, -311889032, -2063751899}, mask_was_saved = 0}}, priv = {
            pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
        not_first_call = 0
        pagesize_m1 = <optimised out>
        sp = <optimised out>
        freesize = <optimised out>
        __PRETTY_FUNCTION__ = "start_thread"
#_26 0xb555005e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:114
No locals.
qgib commented 7 years ago

Author Name: Giovanni Manghi (@gioman)


I'm on Xenial with QGIS 2.18.10 from QGIS repo+ubunutgis and I can't confirm.

Try disabling all the 3rd party plugins but the ones that matter for this issue (quick mapservices).

cheers!


qgib commented 7 years ago

Author Name: Steven Kay (Steven Kay)


Giovanni Manghi wrote:

I'm on Xenial with QGIS 2.18.10 from QGIS repo+ubunutgis and I can't confirm.

Try disabling all the 3rd party plugins but the ones that matter for this issue (quick mapservices).

cheers!

Thanks!

Okay, done that - it still fails. Looks like it might just be this plugin then (I'm on the latest version of the plugin, but this also happened on an older version)

I had to move all my plugin folders into a separate sub-folder to get this to work, I couldn't see a way to reliably disable all of them from the GUI (I have lots of plugins) :/

Tried with a vector (shapefile projected into 3857), no problems there. As mentioned before, works with XYZ and OpenLayers.

I thought Web Mercator doesn't reach the poles, that might explain the map extent is empty or inf message? Not sure if that message was part of the crash, as it doesn't always show up.

qgib commented 7 years ago

Author Name: Giovanni Manghi (@gioman)


Steven Kay wrote:

Giovanni Manghi wrote:

I'm on Xenial with QGIS 2.18.10 from QGIS repo+ubunutgis and I can't confirm.

Try disabling all the 3rd party plugins but the ones that matter for this issue (quick mapservices).

cheers!

Thanks!

Okay, done that - it still fails. Looks like it might just be this plugin then (I'm on the latest version of the plugin, but this also happened on an older version)

I had to move all my plugin folders into a separate sub-folder to get this to work, I couldn't see a way to reliably disable all of them from the GUI (I have lots of plugins) :/

Tried with a vector (shapefile projected into 3857), no problems there. As mentioned before, works with XYZ and OpenLayers.

I thought Web Mercator doesn't reach the poles, that might explain the map extent is empty or inf message? Not sure if that message was part of the crash, as it doesn't always show up.

would you mind installing qgis form qgis repos but with the ubuntugis dependencies/repo? this will get gdal 2., that may have a role here (and anyway is better that 1.). Thanks.

qgib commented 7 years ago

Author Name: Steven Kay (Steven Kay)


used synaptic to nuke all traces of grass and qgis, and followed the instructions on http://www.qgis.org/en/site/forusers/alldownloads.html#debian-ubuntu

retried with the ubuntugis version, and it works fine - thank you!

qgib commented 7 years ago

Author Name: Giovanni Manghi (@gioman)


Steven Kay wrote:

used synaptic to nuke all traces of grass and qgis, and followed the instructions on http://www.qgis.org/en/site/forusers/alldownloads.html#debian-ubuntu

retried with the ubuntugis version, and it works fine - thank you!

not sure they do already, but this should be documented in the plugin docs.