[Qgis-developer] RE : commit change in geometry produce fatal error

Lionel Atty Lionel.Atty at ign.fr
Tue Feb 17 03:32:33 PST 2015


Hello !

We have found a solution/workaround for our problem.

Instead of using directly the signal 'LayerModified', we use the signal 'renderComplete' from QgsMapCanvas.
At this step, we are sure to have a 'clean' state with the others tools/plugins (like Node Tool).
We connect the signal 'layerModified' after the reception of the signal 'renderComplete'.

We don't know if it's the perfect/good solution, but it seems to work ^^

Lionel-A

________________________________
De : Lionel Atty
Date d'envoi : samedi 14 février 2015 17:51
À : qgis-developer at lists.osgeo.org
Cc : wonder.sk at gmail.com; remi.cura at gmail.com
Objet : Re: [Qgis-developer] commit change in geometry produce fatal error

Hi !

I work with Remi-C on this project/plugin QGIS.

What we do now:
- Connect on the signal : 'currentLayerChanged(QgsMapLayer*)' on QgisInterface to track the current layer and the switching layer event
- On the current layer : we use the signal 'layerModified()' to detect modification on current layer -> we try to commitChanges this layer

The result is ... good but we have a problem when we use multiple selection (nodes) with 'Node Tool'. (single selection work fine)

A hard-crash QGIS appear.
GDB indicate a problem with NodeTools and the method 'deselectAllVertexes'
Here a short view of gdb stack:
Program received signal SIGSEGV, Segmentation fault.
0x000000000066d9e6 in QgsSelectedFeature::deselectAllVertexes() ()
(gdb) where
#0  0x000000000066d9e6 in QgsSelectedFeature::deselectAllVertexes() ()
#1  0x000000000066bd35 in QgsMapToolNodeTool::canvasReleaseEvent(QMouseEvent*) ()
#2  0x00007ffff3b8c8b8 in QgsMapCanvas::mouseReleaseEvent(QMouseEvent*) () from /usr/lib/libqgis_gui.so.2.6.1
#3  0x00007ffff245c50a in QWidget::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#4  0x00007ffff27fdfce in QFrame::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#5  0x00007ffff2a097b9 in QGraphicsView::viewportEvent(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#6  0x00007ffff3073646 in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) ()
   from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#7  0x00007ffff240ce0c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#8  0x00007ffff24135dd in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#9  0x00007ffff41ebcab in QgsApplication::notify(QObject*, QEvent*) () from /usr/lib/libqgis_core.so.2.6.1
#10 0x00007ffff30734dd in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#11 0x00007ffff2412d93 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4

We use QGIS 2.6 (try with 2.7) Python 2.7, on Linux Ubuntu x64 & Windows 7 x64.
The data provider for the Vector Layer is memory.

Regards,
Lionel-A
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20150217/cd319b15/attachment.html>


More information about the Qgis-developer mailing list