Bug report #10153

QGIS master crashes if SVG is missing (SVG fill)

Added by aperi2007 - over 6 years ago. Updated over 6 years ago.

Status:Closed
Priority:Severe/Regression
Assignee:-
Category:Symbology
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:Yes Copied to github as #:18610

Description

New description:

if a SVG fill is defined and then the SVG is missing, then QGIS 2.2/master crashes when opening/zooming the project.

Old description:

we are experiencing a qgis crash using the svg symbols.

We test this on windows using qgis 2.2 and qgis-dev update in 30/April/2014.

This is the steps to reproduce it.

Create a new empty project.
After this add to the project a multipolygon shapefile, and rendering the polygon
from
layer-properties -> style -> SVG fill -> choose any svg file available.
(we choose golf.svg)
accept it and save the project.

after close the project and re-opened it

You can see that in the style -> data-definition section there is an expression
"svgOutlineWidth_expression" in "border width" section of data-definition.

This is a first bug because we don't set this expression . It is add from qgis.

This bug is more serious than what you can thing because it can easily produce a crash of qgis.

Infact if we suppose that the svg is missing in the PC that open the project.
You can think to use an user customized svg and think to forget to pass it with the project to other users, or set the wrong path in SVG paths.

To simulate this missing is sufficiente close the project and rename temporaly the
svg file used.

After reopened the qgis and zoom on the dataset it crash immediatelly.


Related issues

Related to QGIS Application - Bug report #9959: crash on 2.2 and master when loading a vector style with ... Closed 2014-03-31

History

#1 Updated by Giovanni Manghi over 6 years ago

  • Crashes QGIS or corrupts data changed from No to Yes
  • Priority changed from Normal to High
  • Target version set to Version 2.4
  • Affected QGIS version changed from 2.2.0 to master

crash confirmed (as well the first issue described that would be better to file as a separate ticket).

[email protected] ~ $ qgis
Warning: loading of qt translation failed [/usr/share/qt4/translations/qt_en_US]
Warning: QGraphicsScene::addItem: item has already been added to this scene
Usage: gdal_contour [-b <band>] [-a <attribute_name>] [-3d] [-inodata]
                    [-snodata n] [-f <formatname>] [-i <interval>]
                    [-f <formatname>] [[-dsco NAME=VALUE] ...] [[-lco NAME=VALUE] ...]
                    [-off <offset>] [-fl <level> <level>...]
                    [-nln <outlayername>] [-q]
                    <src_filename> <dst_filename>

FAILURE: Neither -i nor -fl are specified.
loading algo
QGIS died on signal 11[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fa2ce2cb700 (LWP 13434)]
[New Thread 0x7fa2ceacc700 (LWP 13433)]
[New Thread 0x7fa2cf2cd700 (LWP 13432)]
[New Thread 0x7fa2cface700 (LWP 13431)]
[New Thread 0x7fa2d4d9b700 (LWP 13429)]
[New Thread 0x7fa2e414a700 (LWP 13420)]
[New Thread 0x7fa339607700 (LWP 13419)]
[New Thread 0x7fa339f08700 (LWP 13418)]
0x00007fa353934a43 in poll () from /lib/x86_64-linux-gnu/libc.so.6
[Current thread is 1 (Thread 0x7fa35ac3c7c0 (LWP 13417))]
#0  0x00007fa353934a43 in poll () from /lib/x86_64-linux-gnu/libc.so.6
No symbol table info available.
#1  0x00007fa3523aeff6 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
No symbol table info available.
#2  0x00007fa3523af124 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
No symbol table info available.
#3  0x00007fa3565223bf in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
No symbol table info available.
#4  0x00007fa35591dd9e in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
No symbol table info available.
#5  0x00007fa3564f1c82 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
No symbol table info available.
#6  0x00007fa3564f1ed7 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
No symbol table info available.
#7  0x00007fa3564f6f67 in QCoreApplication::exec() () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
No symbol table info available.
#8  0x00000000004f1641 in main ()
No symbol table info available.
gdb returned 0
Aborted (core dumped)

#2 Updated by Giovanni Manghi over 6 years ago

  • Priority changed from High to Severe/Regression
  • Subject changed from Using SVG rendeing qgis add an odd expression in datadefinition and when miss the svg file it crash. to QGIS master crashes if SVG is missing (SVG fill)

Regression, does not crash on QGIS 2.0.1

#3 Updated by aperi2007 - over 6 years ago

Hi,

the crash seem strictly related to the presence of the
"svgOutlineWidth_expression" in data-definition section.

Unfortunately is not possible to remove that wrong expression because the qgis re-add it always.

This is a bad bug because impact seriously on the usability of qgis.
It deny to use the qgis to distribute datasets and projects to other users because is an user has wrong svg-path (quite probably), the qgis go in crash quite rapidly.

#4 Updated by Martin Dobias over 6 years ago

Likely fixed in 43e1a635 - please test

#5 Updated by aperi2007 - over 6 years ago

Hi,
I update the qgis from last dev.
After this I tested it with a obious small change due to the resolve #10156.

So I choose the SVG fill , open the data-definition and add in border-width this expression.

upper(NOME)

That is a valid expression but absolute wrong in the context of border-width.

But if the SVG is existent the qgis work without any problem. Zoom / pan are all ok.

Instead if I remove the SVG file, the qgis still crash at the first zoom/pan.
I test t also using an expression valid for the border-width info.

It crash again if the svg is missing.

#6 Updated by aperi2007 - over 6 years ago

is this the same of #9959?

#7 Updated by aperi2007 - over 6 years ago

do some test.
It is confirmed on last dev.
details of test in other ticket.

#8 Updated by Radim Blazek over 6 years ago

  • Status changed from Open to Closed

Duplicates #9959.

Also available in: Atom PDF