Bug report #19121
QGIS crash when styling (with geometry generator)
Status: | Closed | ||
---|---|---|---|
Priority: | Normal | ||
Assignee: | - | ||
Category: | Symbology | ||
Affected QGIS version: | 3.0.3 | Regression?: | No |
Operating System: | Ubuntu 18.04 | Easy fix?: | No |
Pull Request or Patch supplied: | No | Resolution: | |
Crashes QGIS or corrupts data: | Yes | Copied to github as #: | 26951 |
Description
This feels a bit random and not with all layers.
When I try to build a complex style for a polygon layer including geometry generator and data defined overrides, QGIS tend to crash when applied to certain data.
It's not perfectly regular crashes, and it seems to depend on the layer. Sometimes QGIS freeze first, and sometimes it crashes immediately.
I've used, and crashed QGIS with Natural Earth 10M (https://www.naturalearthdata.com/http//www.naturalearthdata.com/download/10m/cultural/ne_10m_admin_0_countries.zip)
Symbol with two or more symbol layers.
top: Marker line, random size simple marker
middle: Geometry generator [buffer($geometry,-50)]
bottom: Simple fill
TRACE:
QGIS died on signal 11[New LWP 16295]
[New LWP 16296]
[New LWP 16297]
[New LWP 16298]
[New LWP 16299]
[New LWP 16300]
[New LWP 16301]
[New LWP 16302]
[New LWP 16303]
[New LWP 16304]
[New LWP 16307]
[New LWP 16308]
[New LWP 16310]
[New LWP 16402]
[New LWP 16403]
[New LWP 16404]
[New LWP 16405]
[New LWP 16406]
[New LWP 16407]
[New LWP 16408]
[New LWP 16409]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
0x00007f130ce86bf9 in GI_poll (fds=0x558a363be060, nfds=7, timeout=42) at ../sysdeps/unix/sysv/linux/poll.c:29
29 ../sysdeps/unix/sysv/linux/poll.c: Filen eller katalogen finns inte.
[Current thread is 1 (Thread 0x7f131092e380 (LWP 16292))]
#0 0x00007f130ce86bf9 in GI_poll (fds=0x558a363be060, nfds=7, timeout=42) at ../sysdeps/unix/sysv/linux/poll.c:29
resultvar = 18446744073709551100
sc_cancel_oldtype = 0
#1 0x00007f1301994439 in () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#2 0x00007f130199454c in g_main_context_iteration () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#3 0x00007f130d9ec8ef in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#4 0x00007f130d9919ea in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5 0x00007f130d99aa84 in QCoreApplication::exec() () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6 0x0000558a2e95d87f in ()
#7 0x00007f130cd93b97 in __libc_start_main (main=0x558a2e95b5e0, argc=1, argv=0x7fff0e5519a8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fff0e551998) at ../csu/libc-start.c:310
result = <optimized out>
unwind_buf = {cancel_jmp_buf = {{jmp_buf = {0, -3788220921177897796, 94051975432496, 140733433846176, 0, 0, -6951366894201011012, -7034677885717510980}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x7f13107a3733 <_dl_init+259>, 0x7f1310766278}, data = {prev = 0x0, cleanup = 0x0, canceltype = 276444979}}}
not_first_call = <optimized out>
#8 0x0000558a2e96095a in _start ()
gdb returned 0
Avbruten (SIGABRT)
Associated revisions
fix crasher when rendering a symbol layer subsequent to
rendering a geometry generator layer
fix crasher when rendering a symbol layer subsequent to
rendering a geometry generator layer
Fixes #19121 https://issues.qgis.org/issues/19121
(cherry-picked from 5c855b417)
History
#1 Updated by Matthias Kuhn over 6 years ago
Can you provide a complete project?
#2 Updated by Klas Karlsson over 6 years ago
- File crash_test.zip added
I tried to simplify a project as much as I could that generates a crash reliably on my computers:
When I apply the style from the "source_style" layer to the "crash_layer", QGIS will crash! Maybe not directly, but it will crash.
Zip file includes project and two layers in shape format. One has a style file attached.
The issue is probably layer dependent, since I have been able to create a simple shape file to apply the style to without QGIS crashing. But QGIS shouldn't crash regardless.
#3 Updated by Klas Karlsson over 6 years ago
Also, just noted that QGIS don't crash until the "crash_layer" is visible in the canvas window. So if I apply the style when the layer is not in view it works fine, but as soon as I pan the layer into view, it crashes.
Same issue when the crash_layer is turned off. Apply style works fine, but as soon as layer is turned on, crash!
#4 Updated by Klas Karlsson over 6 years ago
More testing seems to indicate that the order of symbol layers matter.
In the "crash_test.zip" I change the order of the style layers of the "source_style" layer placing the Marker line in the middle. Then applying the style to the "crash_layer". This works fine, but when I change the order back so that the Marker line is on top, QGIS crash.
(note that I've saved the project I use in the video with the rearanged style layer order so I don't have to apply the style in the video.
#5 Updated by Klas Karlsson over 6 years ago
Oh, and the debug output:
(more or less same as before)
QGIS died on signal 11[New LWP 10352]
[New LWP 10353]
[New LWP 10354]
[New LWP 10356]
[New LWP 10357]
[New LWP 10360]
[New LWP 10361]
[New LWP 10362]
[New LWP 10363]
[New LWP 10364]
[New LWP 10365]
[New LWP 10366]
[New LWP 10369]
[New LWP 10370]
[New LWP 10372]
[New LWP 10435]
[New LWP 10440]
[New LWP 10441]
[New LWP 10442]
[New LWP 10443]
[New LWP 10444]
[New LWP 10445]
[New LWP 10446]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
0x00007fc67fd5abf9 in GI_poll (fds=0x560e47ba1800, nfds=9, timeout=50) at ../sysdeps/unix/sysv/linux/poll.c:29
29 ../sysdeps/unix/sysv/linux/poll.c: Filen eller katalogen finns inte.
[Current thread is 1 (Thread 0x7fc6838d2380 (LWP 10349))]
#0 0x00007fc67fd5abf9 in GI_poll (fds=0x560e47ba1800, nfds=9, timeout=50) at ../sysdeps/unix/sysv/linux/poll.c:29
resultvar = 18446744073709551100
sc_cancel_oldtype = 0
#1 0x00007fc6747cf439 in () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#2 0x00007fc6747cf54c in g_main_context_iteration () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#3 0x00007fc6808c08ef in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#4 0x00007fc6808659ea in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5 0x00007fc68086ea84 in QCoreApplication::exec() () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6 0x0000560e45a5d8a6 in ()
#7 0x00007fc67fc67b97 in __libc_start_main (main=0x560e45a5b5a0, argc=1, argv=0x7fffc38288e8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffc38288d8) at ../csu/libc-start.c:310
result = <optimized out>
unwind_buf = {cancel_jmp_buf = {{jmp_buf = {0, -3686072246135374524, 94619298040256, 140736473499872, 0, 0, -6972842595541271228, -6969315941478646460}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x7fc683747733 <_dl_init+259>, 0x7fc683709638}, data = {prev = 0x0, cleanup = 0x0, canceltype = -2089519309}}}
not_first_call = <optimized out>
#8 0x0000560e45a609ea in _start ()
gdb returned 0
Avbruten (SIGABRT) (minnesutskrift skapad)
#6 Updated by Klas Karlsson over 6 years ago
Just tested on Windows 10 as well.
1. Add "crash_layer" from zip
2. create two style layers (marker line under, geometry generator over)
3. Change order of style layers
Crash:
User Feedback¶
Report Details¶
Crash ID: 466e81800de05ae171640aa065b399f5675d79c8
Stack Trace
QgsMarkerLineSymbolLayer::renderPolygonStroke : QgsFillSymbol::renderPolygonUsingLayer : QgsFillSymbol::renderPolygon : QgsSymbol::renderFeature : QgsFeatureRenderer::renderFeature : QgsVectorLayerLabelProvider::registerFeature : QgsVectorLayerLabelProvider::registerFeature : QgsMapRendererParallelJob::renderLayerStatic : QgsArchive::zip : QgsImageOperation::overlayColor : QgsImageOperation::flipImage : QtConcurrent::ThreadEngineBase::run : QThreadPoolPrivate::reset : QThread::start : BaseThreadInitThunk : RtlUserThreadStart :
QGIS Info
QGIS Version: 3.2.0-Bonn
QGIS code revision: bc43194061
Compiled against Qt: 5.9.2
Running against Qt: 5.9.2
Compiled against GDAL: 2.2.4
Running against GDAL: 2.2.4
System Info
CPU Type: x86_64
Kernel Type: winnt
Kernel Version: 10.0.16299
#7 Updated by Anonymous over 6 years ago
- % Done changed from 0 to 100
- Status changed from Open to Closed
Applied in changeset qgis|5c855b417f62a686080738db69053a7dcb159ceb.