Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Master crashes with 2 WMTS layers and scrollwheel use #24701

Closed
qgib opened this issue Jul 6, 2017 · 6 comments
Closed

Master crashes with 2 WMTS layers and scrollwheel use #24701

qgib opened this issue Jul 6, 2017 · 6 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Crash/Data Corruption Data Provider Related to specific vector, raster or mesh data providers High Priority Regression Something which used to work, but doesn't anymore

Comments

@qgib
Copy link
Contributor

qgib commented Jul 6, 2017

Author Name: Richard Duivenvoorde (@rduivenvoorde)
Original Redmine Issue: 16802
Affected QGIS version: master
Redmine category:web_services_clients/wms
Assignee: Alessandro Pasotti


Tested here on:

  • Debian testing fresh compiled of 6t july 2017
  • Windows 2.99 osgeo4w64

Both crash when I add 2(!) WMTS raster layers to a project.

Tested with a new config (NO plugins!):

qgis --profiles-path /tmp/qgis

Create a fresh project (EPSG:28992)

Add 2x times (the same or different) rasterlayers, for example via the Python console:

qgis.utils.iface.addRasterLayer(
"tileMatrixSet=EPSG:28992&crs=EPSG:28992&layers=brtachtergrondkaart&styles=&format=image/png&url=http://geodata.nationaalgeoregister.nl/tiles/service/wmts/brtachtergrondkaart", # uri
"wmts master example", # name for layer (as seen in QGIS)
"wms" # dataprovider key
)

Now do some scrolling using a mouse wheel or so (you also create some bookmarks and run around these).

Sometimes after a couple of seconds, sometimes after some more time QGIS just crashes

@qgib
Copy link
Contributor Author

qgib commented Jul 6, 2017

Author Name: Richard Duivenvoorde (@rduivenvoorde)


Running in gdb:

src/providers/wms/qgswmsprovider.cpp: 3817: (tileReplyFinished) [1ms] [thread:0x7fff40002490] tile reply 2 (2) tile:14(retry 0) rect:161881.280000,435474.960000 168762.560000,428593.680000) fromcache:0 error:Unknown error url:https://geodata.nationaalgeoregister.nl/tiles/service/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=brtachtergrondkaart&STYLE=&FORMAT=image/png&TILEMATRIXSET=EPSG:28992&TILEMATRIX=EPSG:28992:7&TILEROW=68&TILECOL=65
src/providers/wms/qgswmsprovider.cpp: 3862: (tileReplyFinished) [0ms] [thread:0x7fff40002490] contentType: image/png
src/providers/wms/qgswmsprovider.cpp: 3910: (tileReplyFinished) [0ms] [thread:0x7fff40002490] tile reply: length 61759
src/providers/wms/qgswmsprovider.cpp: 3794: (tileReplyFinished) [4ms] [thread:0x7fff40002490] expirationDate:
src/providers/wms/qgswmsprovider.cpp: 858: (draw) [13ms] [thread:0x7fff40001dc0] TILE CACHE total: 159 / 256
src/providers/wms/qgswmsprovider.cpp: 884: (readBlock) [0ms] [thread:0x7fff40001dc0] image height = 480 bytesPerLine = 7068

Thread 16 "Thread (pooled)" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fff44c10700 (LWP 26875)]
0x00003f2090000003 in ?? ()
(gdb) bt
#_0  0x00003f2090000003 in ?? ()
#_1  0x00007fffee4b4447 in ?? () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#_2  0x00007fffee4b6853 in QIODevice::write(char const*, long long) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#_3  0x00007ffff1deab11 in ?? () from /lib/x86_64-linux-gnu/libQt5Network.so.5
#_4  0x00007ffff1e88ad0 in ?? () from /lib/x86_64-linux-gnu/libQt5Network.so.5
#_5  0x00007fffee5b6499 in QObject::event(QEvent*) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#_6  0x00007ffff1861b8c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#_7  0x00007ffff1869341 in QApplication::notify(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#_8  0x00007ffff48a04e1 in QgsApplication::notify (this=0x7fffffffd240, receiver=0x7fff387f6e60, event=0x7fff2404e930) at /home/richard/dev/qgis/git/qgis/src/core/qgsapplication.cpp:300
#_9  0x00007fffee5899e0 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#_10 0x00007fffee58c16d in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#_11 0x00007fffee5ddc43 in ?? () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#_12 0x00007fffeb484a17 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#_13 0x00007fffeb484c80 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#_14 0x00007fffeb484d2c in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#_15 0x00007fffee5de04f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#_16 0x00007fffee5879ca in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#_17 0x00007fff519bc97f in QgsWmsTiledImageDownloadHandler::downloadBlocking (this=0x7fff44c0daa0) at /home/richard/dev/qgis/git/qgis/src/providers/wms/qgswmsprovider.cpp:3754
#_18 0x00007fff51998ca1 in QgsWmsProvider::draw (this=0x55555c7504f0, viewExtent=..., pixelWidth=1767, pixelHeight=480, feedback=0x55555c750420)
    at /home/richard/dev/qgis/git/qgis/src/providers/wms/qgswmsprovider.cpp:855
#_19 0x00007fff51999538 in QgsWmsProvider::readBlock (this=0x55555c7504f0, bandNo=1, viewExtent=..., pixelWidth=1767, pixelHeight=480, block=0x7fff38002ba0, feedback=0x55555c750420)
    at /home/richard/dev/qgis/git/qgis/src/providers/wms/qgswmsprovider.cpp:877
#_20 0x00007ffff4cfdcdc in QgsRasterDataProvider::block (this=0x55555c7504f0, bandNo=1, boundingBox=..., width=1767, height=480, feedback=0x55555c750420)
    at /home/richard/dev/qgis/git/qgis/src/core/raster/qgsrasterdataprovider.cpp:200
#_21 0x00007ffff4d510a6 in QgsSingleBandColorDataRenderer::block (this=0x55555c758000, bandNo=1, extent=..., width=1767, height=480, feedback=0x55555c750420)
    at /home/richard/dev/qgis/git/qgis/src/core/raster/qgssinglebandcolordatarenderer.cpp:62
#_22 0x00007ffff4d31362 in QgsBrightnessContrastFilter::block (this=0x55555c760080, bandNo=1, extent=..., width=1767, height=480, feedback=0x55555c750420)
    at /home/richard/dev/qgis/git/qgis/src/core/raster/qgsbrightnesscontrastfilter.cpp:121
#_23 0x00007ffff4d361c6 in QgsHueSaturationFilter::block (this=0x55555c750e20, bandNo=1, extent=..., width=1767, height=480, feedback=0x55555c750420)
    at /home/richard/dev/qgis/git/qgis/src/core/raster/qgshuesaturationfilter.cpp:130
#_24 0x00007ffff4d4f9b2 in QgsRasterResampleFilter::block (this=0x55555c750dd0, bandNo=1, extent=..., width=1767, height=480, feedback=0x55555c750420)
    at /home/richard/dev/qgis/git/qgis/src/core/raster/qgsrasterresamplefilter.cpp:162
#_25 0x00007ffff4d27c1b in QgsRasterProjector::block (this=0x55555c750950, bandNo=1, extent=..., width=1767, height=480, feedback=0x55555c750420)
    at /home/richard/dev/qgis/git/qgis/src/core/raster/qgsrasterprojector.cpp:759
#_26 0x00007ffff4d099dc in QgsRasterIterator::readNextRasterPart (this=0x7fff44c0ee80, bandNumber=1, nCols=@0x7fff44c0edd4: 1767, nRows=@0x7fff44c0edd0: 480, block=0x7fff44c0edc0, 
    topLeftCol=@0x7fff44c0edcc: 0, topLeftRow=@0x7fff44c0edc8: 0) at /home/richard/dev/qgis/git/qgis/src/core/raster/qgsrasteriterator.cpp:109
#_27 0x00007ffff4d41d8d in QgsRasterDrawer::draw (this=0x7fff44c0ee78, p=0x55555c628200, viewPort=0x55555c757dc0, qgsMapToPixel=0x55555c7580e8, feedback=0x55555c750420)
    at /home/richard/dev/qgis/git/qgis/src/core/raster/qgsrasterdrawer.cpp:58
#_28 0x00007ffff4d1bf17 in QgsRasterLayerRenderer::render (this=0x55555c758250) at /home/richard/dev/qgis/git/qgis/src/core/raster/qgsrasterlayerrenderer.cpp:221
#_29 0x00007ffff49d97d0 in QgsMapRendererParallelJob::renderLayerStatic (job=...) at /home/richard/dev/qgis/git/qgis/src/core/qgsmaprendererparalleljob.cpp:257
#_30 0x00007ffff49daff6 in QtConcurrent::FunctionWrapper1<void, LayerRenderJob&>::operator() (this=0x55555d76ab28, u=...)
    at /usr/include/x86_64-linux-gnu/qt5/QtConcurrent/qtconcurrentfunctionwrappers.h:83
#_31 0x00007ffff49dad59 in QtConcurrent::MapKernel<QList<LayerRenderJob>::iterator, QtConcurrent::FunctionWrapper1<void, LayerRenderJob&> >::runIteration (this=0x55555d76aaf0, it=...)
    at /usr/include/x86_64-linux-gnu/qt5/QtConcurrent/qtconcurrentmapkernel.h:69
#_32 0x00007ffff49dade3 in QtConcurrent::MapKernel<QList<LayerRenderJob>::iterator, QtConcurrent::FunctionWrapper1<void, LayerRenderJob&> >::runIterations (this=0x55555d76aaf0, 
    sequenceBeginIterator=..., beginIndex=1, endIndex=2) at /usr/include/x86_64-linux-gnu/qt5/QtConcurrent/qtconcurrentmapkernel.h:78
#_33 0x00007ffff49db235 in QtConcurrent::IterateKernel<QList<LayerRenderJob>::iterator, void>::forThreadFunction (this=0x55555d76aaf0)
    at /usr/include/x86_64-linux-gnu/qt5/QtConcurrent/qtconcurrentiteratekernel.h:256
#_34 0x00007ffff49daf60 in QtConcurrent::IterateKernel<QList<LayerRenderJob>::iterator, void>::threadFunction (this=0x55555d76aaf0)
    at /usr/include/x86_64-linux-gnu/qt5/QtConcurrent/qtconcurrentiteratekernel.h:218
#_35 0x00007ffff7efbc9d in QtConcurrent::ThreadEngineBase::run() () from /lib/x86_64-linux-gnu/libQt5Concurrent.so.5
#_36 0x00007fffee3b614f in ?? () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#_37 0x00007fffee3b9da8 in ?? () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#_38 0x00007fffed22f494 in start_thread (arg=0x7fff44c10700) at pthread_create.c:333
#_39 0x00007fffed587a8f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
(gdb) 


@qgib
Copy link
Contributor Author

qgib commented Jul 6, 2017

Author Name: Giovanni Manghi (@gioman)


  • crashes_corrupts_data was changed from 0 to 1
  • regression was changed from 0 to 1
  • priority_id was changed from Normal to High

@qgib
Copy link
Contributor Author

qgib commented Nov 22, 2017

Author Name: Alessandro Pasotti (@elpaso)


Tested right now in master but I wasn't able to reproduce.
Can you please try latest master and confirm the the bug is still reproducible?


  • status_id was changed from Open to Feedback
  • assigned_to_id was configured as Alessandro Pasotti

@qgib
Copy link
Contributor Author

qgib commented Nov 23, 2017

Author Name: Richard Duivenvoorde (@rduivenvoorde)


  • description was changed from
    Tested here on:
  • Debian testing fresh compiled of 6t july 2017
  • Windows 2.99 osgeo4w64

Both crash when I add 2(!) WMTS raster layers to a project.

Tested with a new config (NO plugins!):

qgis --configpath /tmp/qgis

Create a fresh project (EPSG:28992)

Add 2x times (the same or different) rasterlayers, for example via the Python console:

qgis.utils.iface.addRasterLayer(
"tileMatrixSet=EPSG:28992&crs=EPSG:28992&layers=brtachtergrondkaart&styles=&format=image/png&url=http://geodata.nationaalgeoregister.nl/tiles/service/wmts/brtachtergrondkaart", # uri
"wmts master example", # name for layer (as seen in QGIS)
"wms" # dataprovider key
)

Now do some scrolling using a mouse wheel or so (you also create some bookmarks and run around these).

Sometimes after a couple of seconds, sometimes after some more time QGIS just crashes to
Tested here on:

  • Debian testing fresh compiled of 6t july 2017
  • Windows 2.99 osgeo4w64

Both crash when I add 2(!) WMTS raster layers to a project.

Tested with a new config (NO plugins!):

qgis --profiles-path /tmp/qgis

Create a fresh project (EPSG:28992)

Add 2x times (the same or different) rasterlayers, for example via the Python console:

qgis.utils.iface.addRasterLayer(
"tileMatrixSet=EPSG:28992&crs=EPSG:28992&layers=brtachtergrondkaart&styles=&format=image/png&url=http://geodata.nationaalgeoregister.nl/tiles/service/wmts/brtachtergrondkaart", # uri
"wmts master example", # name for layer (as seen in QGIS)
"wms" # dataprovider key
)

Now do some scrolling using a mouse wheel or so (you also create some bookmarks and run around these).

Sometimes after a couple of seconds, sometimes after some more time QGIS just crashes

@qgib
Copy link
Contributor Author

qgib commented Nov 23, 2017

Author Name: Richard Duivenvoorde (@rduivenvoorde)


Yep, tested here again. Cannot reproduce anymore. Apparently one of earlier commits fixed this.

QGIS master is getting more and more stable anyway with me now :-)

Closing this one


  • status_id was changed from Feedback to Closed

@qgib qgib closed this as completed Nov 23, 2017
@qgib
Copy link
Contributor Author

qgib commented Nov 23, 2017

Author Name: Giovanni Manghi (@gioman)


  • resolution was changed from to fixed/implemented

@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! High Priority Data Provider Related to specific vector, raster or mesh data providers Crash/Data Corruption Regression Something which used to work, but doesn't anymore labels May 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Crash/Data Corruption Data Provider Related to specific vector, raster or mesh data providers High Priority Regression Something which used to work, but doesn't anymore
Projects
None yet
Development

No branches or pull requests

1 participant