Bug report #9959

crash on 2.2 and master when loading a vector style with missing SVG

Added by Giovanni Manghi over 10 years ago. Updated over 10 years ago.

Status:Closed
Priority:Severe/Regression
Assignee:Radim Blazek
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 #:18457

Description

Did not crash on 2.0.1

Can provide sample if necessary.

giovanni@sibirica ~ $ 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
***************** deactivate parallellinetool
***************** deactivate circulararctool
***************** deactivate modifycirculararctool
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 0x7f830593a700 (LWP 22294)]
[New Thread 0x7f830648c700 (LWP 22288)]
[New Thread 0x7f8306c8d700 (LWP 22287)]
[New Thread 0x7f8308301700 (LWP 22286)]
[New Thread 0x7f831cd2c700 (LWP 22282)]
[New Thread 0x7f831dc64700 (LWP 22281)]
[New Thread 0x7f831eae0700 (LWP 22280)]
0x00007f8355271a43 in poll () from /lib/x86_64-linux-gnu/libc.so.6
[Current thread is 1 (Thread 0x7f835c5627c0 (LWP 22268))]
#0  0x00007f8355271a43 in poll () from /lib/x86_64-linux-gnu/libc.so.6
No symbol table info available.
#1  0x00007f8353cebff6 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
No symbol table info available.
#2  0x00007f8353cec124 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
No symbol table info available.
#3  0x00007f8357e5e3bf in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
No symbol table info available.
#4  0x00007f8357259d9e in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
No symbol table info available.
#5  0x00007f8357e2dc82 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
No symbol table info available.
#6  0x00007f8357e2ded7 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
No symbol table info available.
#7  0x00007f8357e32f67 in QCoreApplication::exec() () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
No symbol table info available.
#8  0x00000000004ef481 in main ()
No symbol table info available.
gdb returned 0
Aborted (core dumped)

style_crash.tar.gz (1.84 MB) Giovanni Manghi, 2014-03-31 06:11 AM


Related issues

Related to QGIS Application - Bug report #10153: QGIS master crashes if SVG is missing (SVG fill) Closed 2014-05-02

Associated revisions

Revision fc8f15a4
Added by Radim Blazek over 10 years ago

svg cache lookup fix, fixes #9959

History

#1 Updated by Giovanni Manghi over 10 years ago

dataset and style attached

#2 Updated by aperi2007 - over 10 years ago

is this the same of #10153?

#3 Updated by Jürgen Fischer over 10 years ago

  • Subject changed from QGIS 2.2/master crashes when loading a vector style with missing SVG to crash on 2.2 and master when loading a vector style with missing SVG

#4 Updated by Giovanni Manghi over 10 years ago

aperi2007 - wrote:

is this the same of #10153?

it seems so.

#5 Updated by aperi2007 - over 10 years ago

I do some check.

It do crash surely if I set the unavailable svg as a fill pattern and set to map-units.

It start working, but after 2-3 zoom and pan the qgis crash and need to kill the zombie process to remove.
I test on windows 7 64bit with last dev version.

#6 Updated by Radim Blazek over 10 years ago

  • Status changed from Open to Closed

#7 Updated by Radim Blazek over 10 years ago

The problem was that SVG cache was searched comparing file name to full path returned by QgsSymbolLayerV2Utils::symbolNameToPath(). For non existing file the symbolNameToPath() returns empty string and thus cached symbol was not found and a new entry was always inserted.

I believe, that in theory it should work even without the fix. I am suspicious that it could be a bug in QMultiHash::insert() (i.e. QHash::insertMulti) not suitable for too many multi entries. It usually crashed when a key had few hundred of entries (300-400).

#8 Updated by Radim Blazek over 10 years ago

  • Assignee set to Radim Blazek

Ticket fixed with funding from Regione Toscana-SITA (CIG:ZB10C90E5A).

Also available in: Atom PDF