Bug report #8475
Program crashes when .sld is applied
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 #: | 17243 |
Description
I have tried this in both Windows and Ubuntu
Version 1.9.0
After opening a shapefile I wanted to apply a .sld file
In the Layer Properties I click Load Style, the dialog box opens and I navigate to the .sld file location.
Choose the file and click open
In the Ubuntu version the program just closes.
In windows it produces a .dmp file (see attached)
Associated revisions
- also intialize mCalc member of QgsExpression in protected ctor (fixes #8475)
- avoid nesting ogc:Filter in ogc:Filter (createFunctionElement already returns a filter)
History
#1
Updated by Giovanni Manghi about 11 years ago
- Priority changed from Normal to Severe/Regression
- Target version set to Version 2.0.0
confirmed here
giovanni@sibirica /var/www $ qgis Warning: loading of qt translation failed [/usr/share/qt4/translations/qt_en_US] WARNING: there is no transaction in progress 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 0x7ff834878700 (LWP 7051)] [New Thread 0x7ff826bc0700 (LWP 7050)] [New Thread 0x7ff83d169700 (LWP 7027)] 0x00007ff86447748d in waitpid () from /lib/x86_64-linux-gnu/libc.so.6 [Current thread is 1 (Thread 0x7ff86b6727c0 (LWP 7026))] #0 0x00007ff86447748d in waitpid () from /lib/x86_64-linux-gnu/libc.so.6 No symbol table info available. #1 0x00000000004e8850 in qgisCrash(int) () No symbol table info available. #2 <signal handler called> No symbol table info available. #3 0x00007ff867f9e568 in QgsDistanceArea::~QgsDistanceArea() () from /usr/lib/libqgis_core.so.1.9.0 No symbol table info available. #4 0x00007ff867faa12a in QgsExpression::~QgsExpression() () from /usr/lib/libqgis_core.so.1.9.0 No symbol table info available. #5 0x00007ff867f2b1e7 in QgsRuleBasedRendererV2::Rule::createFromSld(QDomElement&, QGis::GeometryType) () from /usr/lib/libqgis_core.so.1.9.0 No symbol table info available. #6 0x00007ff867f2bd7f in QgsRuleBasedRendererV2::createFromSld(QDomElement&, QGis::GeometryType) () from /usr/lib/libqgis_core.so.1.9.0 No symbol table info available. #7 0x00007ff867f09473 in QgsFeatureRendererV2::loadSld(QDomNode const&, QGis::GeometryType, QString&) () from /usr/lib/libqgis_core.so.1.9.0 No symbol table info available. #8 0x00007ff8680c73f1 in QgsVectorLayer::readSld(QDomNode const&, QString&) () from /usr/lib/libqgis_core.so.1.9.0 No symbol table info available. #9 0x00007ff86800986c in QgsMapLayer::loadSldStyle(QString, bool&) () from /usr/lib/libqgis_core.so.1.9.0 No symbol table info available. #10 0x00000000006e5113 in QgsVectorLayerProperties::on_pbnLoadStyle_clicked() () No symbol table info available. #11 0x00000000006e8328 in QgsVectorLayerProperties::loadStyleMenuTriggered(QAction*) () No symbol table info available. #12 0x00000000007d999c in ?? () No symbol table info available. #13 0x00007ff867071281 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4 No symbol table info available. #14 0x00007ff86682aea2 in QMenu::triggered(QAction*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 No symbol table info available. #15 0x00007ff86682c2bb in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 No symbol table info available. #16 0x00007ff867071281 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4 No symbol table info available. #17 0x00007ff8663d9132 in QAction::triggered(bool) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 No symbol table info available. #18 0x00007ff8663d931f in QAction::activate(QAction::ActionEvent) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 No symbol table info available. #19 0x00007ff86682b119 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 No symbol table info available. #20 0x00007ff866831272 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 No symbol table info available. #21 0x00007ff866430144 in QWidget::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 No symbol table info available. #22 0x00007ff86683280b in QMenu::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 No symbol table info available. #23 0x00007ff8663df894 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 No symbol table info available. #24 0x00007ff8663e50bf in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 No symbol table info available. #25 0x00007ff867f6f2a6 in QgsApplication::notify(QObject*, QEvent*) () from /usr/lib/libqgis_core.so.1.9.0 No symbol table info available. #26 0x00007ff86705ce9c in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4 No symbol table info available. #27 0x00007ff8663e0862 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 No symbol table info available. #28 0x00007ff8664602c1 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 No symbol table info available. #29 0x00007ff86645ebae in QApplication::x11ProcessEvent(_XEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 No symbol table info available. #30 0x00007ff8664880d2 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 No symbol table info available. #31 0x00007ff862f1ad53 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 No symbol table info available. #32 0x00007ff862f1b0a0 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 No symbol table info available. #33 0x00007ff862f1b164 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 No symbol table info available. #34 0x00007ff86708c3bf in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4 No symbol table info available. #35 0x00007ff866487d5e in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 No symbol table info available. #36 0x00007ff86705bc82 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4 No symbol table info available. #37 0x00007ff86705bed7 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4 No symbol table info available. #38 0x00007ff86682e131 in QMenu::exec(QPoint const&, QAction*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 No symbol table info available. #39 0x00007ff86683d6d2 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 No symbol table info available. #40 0x00007ff867071281 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4 No symbol table info available. #41 0x00007ff8667adae1 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 No symbol table info available. #42 0x00007ff8667ae51c in QAbstractButton::mousePressEvent(QMouseEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 No symbol table info available. #43 0x00007ff866430429 in QWidget::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 No symbol table info available. #44 0x00007ff8663df894 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 No symbol table info available. #45 0x00007ff8663e50bf in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 No symbol table info available. #46 0x00007ff867f6f2a6 in QgsApplication::notify(QObject*, QEvent*) () from /usr/lib/libqgis_core.so.1.9.0 No symbol table info available. #47 0x00007ff86705ce9c in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4 No symbol table info available. #48 0x00007ff8663e0862 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 No symbol table info available. #49 0x00007ff86645fbf5 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 No symbol table info available. #50 0x00007ff86645ebae in QApplication::x11ProcessEvent(_XEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 No symbol table info available. #51 0x00007ff8664880d2 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 No symbol table info available. #52 0x00007ff862f1ad53 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 No symbol table info available. #53 0x00007ff862f1b0a0 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 No symbol table info available. #54 0x00007ff862f1b164 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 No symbol table info available. #55 0x00007ff86708c3bf in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4 No symbol table info available. #56 0x00007ff866487d5e in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 No symbol table info available. #57 0x00007ff86705bc82 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4 No symbol table info available. #58 0x00007ff86705bed7 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4 No symbol table info available. #59 0x00007ff8668af936 in QDialog::exec() () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 No symbol table info available. #60 0x0000000000512ebf in QgisApp::showLayerProperties(QgsMapLayer*) () No symbol table info available. #61 0x0000000000759437 in QgsLegend::mouseDoubleClickEvent(QMouseEvent*) () No symbol table info available. #62 0x00007ff86643015e in QWidget::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 No symbol table info available. #63 0x00007ff8667f03b6 in QFrame::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 No symbol table info available. #64 0x00007ff86690489b in QAbstractItemView::viewportEvent(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 No symbol table info available. #65 0x00007ff86694c4b5 in QTreeView::viewportEvent(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 No symbol table info available. #66 0x00007ff86705d028 in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4 No symbol table info available. #67 0x00007ff8663df85f in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 No symbol table info available. #68 0x00007ff8663e50bf in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 No symbol table info available. #69 0x00007ff867f6f2a6 in QgsApplication::notify(QObject*, QEvent*) () from /usr/lib/libqgis_core.so.1.9.0 No symbol table info available. #70 0x00007ff86705ce9c in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4 No symbol table info available. #71 0x00007ff8663e0862 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 No symbol table info available. #72 0x00007ff86645fbf5 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 No symbol table info available. #73 0x00007ff86645ebae in QApplication::x11ProcessEvent(_XEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 No symbol table info available. #74 0x00007ff8664880d2 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 No symbol table info available. #75 0x00007ff862f1ad53 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 No symbol table info available. #76 0x00007ff862f1b0a0 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 No symbol table info available. #77 0x00007ff862f1b164 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 No symbol table info available. #78 0x00007ff86708c3bf in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4 No symbol table info available. #79 0x00007ff866487d5e in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 No symbol table info available. #80 0x00007ff86705bc82 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4 No symbol table info available. #81 0x00007ff86705bed7 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4 No symbol table info available. #82 0x00007ff867060f67 in QCoreApplication::exec() () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4 No symbol table info available. #83 0x00000000004e421e in main () No symbol table info available. gdb returned 0 Aborted (core dumped)
#2
Updated by John Scott about 11 years ago
I apologize....the .dmp file is 40+ mb and would not attach
#3
Updated by John Scott about 11 years ago
- File qgis-20130816-080923-5988-5568-d61cb25.7z added
#4
Updated by Salvatore Larosa about 11 years ago
the debug message before the crash is:
src/core/symbology-ng/qgsrulebasedrendererv2.cpp: 547: (createFromSld) parser error: unable to convert 'Filter' element to a valid expression: it is not supported yet or it has invalid arguments
#5
Updated by Daniel Vaz almost 11 years ago
Please provide some dataset to reproduce this bug.
Thanks in advance
#6
Updated by Salvatore Larosa almost 11 years ago
Daniel Vaz wrote:
Please provide some dataset to reproduce this bug.
Thanks in advance
it crashes using any dataset, I guess !
is it working fine for you ?
#7
Updated by Daniel Vaz almost 11 years ago
As described in http://www.mapserver.org/development/bugs.html :
The most important thing when reporting a bug is to boil down a minimum example that is needed to reproduce the bug.
The chances of a bug being addressed in a timely manner is directly related to the speed with which the developer can reproduce the bug.
If you make that hard for the developer, chances are the bug will be given up on or ignored for quite a while.
Maybe it is a good idea to put this consideration at the top of "New issue" page.
As you said, maybe this bug causes crash with any dataset. But if I have the shapefile, the .sld file and the expected behaviour in applying this specific .sld on a specific shapefile the process could be faster.
Thanks in advance
#8
Updated by Giovanni Manghi almost 11 years ago
Hi Daniel,
load a vector (I tested shapes and postgis) and make any categorized symbology and save it as sld. Then load the sld style. It crashes all the times here.
Daniel Vaz wrote:
As described in http://www.mapserver.org/development/bugs.html :
The most important thing when reporting a bug is to boil down a minimum example that is needed to reproduce the bug.
The chances of a bug being addressed in a timely manner is directly related to the speed with which the developer can reproduce the bug.
If you make that hard for the developer, chances are the bug will be given up on or ignored for quite a while.Maybe it is a good idea to put this consideration at the top of "New issue" page.
As you said, maybe this bug causes crash with any dataset. But if I have the shapefile, the .sld file and the expected behaviour in applying this specific .sld on a specific shapefile the process could be faster.
Thanks in advance
#9
Updated by Salvatore Larosa almost 11 years ago
I managed to track out the issue, the SLD may be loaded and the crash disappear after commenting out the following line:
if ( mCalc ) delete mCalc;
in QgsExpression destructor (src/core/qgsexpression.cpp). That piece of code was introduced in a261812, so I think this is an easy issue to solve for Jürgen.
Anyway, I noticed another issue here, it seems the SLD has not written correctly:
If a filter is applied the keyword <ogc:Filter> is duplicate, that throws the error reported to the comment nr.4
SLD created by QGIS:
<ogc:Filter> <ogc:Filter> <ogc:PropertyIsEqualTo> <ogc:PropertyName>boroname</ogc:PropertyName> <ogc:Literal>Brooklyn</ogc:Literal> </ogc:PropertyIsEqualTo> </ogc:Filter> </ogc:Filter>
#10
Updated by Jürgen Fischer almost 11 years ago
- Status changed from Open to Closed
Fixed in changeset 6d157123ef91bb46a14207183bb00b193403330c.