<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" id="owaParaStyle">P {margin-top:0;margin-bottom:0;}</style><style type="text/css" style="">
<!--
-->
</style><style type="text/css">
<!--
-->
</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Hello !<br>
<br>
We have found a solution/workaround for our problem.<br>
<br>
Instead of using directly the signal 'LayerModified', we use the signal 'renderComplete' from QgsMapCanvas.<br>
At this step, we are sure to have a 'clean' state with the others tools/plugins (like Node Tool).<br>
We connect the signal 'layerModified' after the reception of the signal 'renderComplete'.<br>
<br>
We don't know if it's the perfect/good solution, but it seems to work ^^<br>
<br>
Lionel-A<br>
<br>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div style="direction: ltr;" id="divRpF440895"><font face="Tahoma" size="2" color="#000000"><b>De :</b> Lionel Atty<br>
<b>Date d'envoi :</b> samedi 14 février 2015 17:51<br>
<b>À :</b> qgis-developer@lists.osgeo.org<br>
<b>Cc :</b> wonder.sk@gmail.com; remi.cura@gmail.com<br>
<b>Objet :</b> Re: [Qgis-developer] commit change in geometry produce fatal error<br>
</font><br>
</div>
<div></div>
<div>
<div style="direction:ltr; font-family:Tahoma; color:#000000; font-size:10pt">
<div>Hi !</div>
<div><br>
</div>
<div>I work with Remi-C on this project/plugin QGIS.</div>
<div><br>
</div>
<div>What we do now:</div>
<div>- Connect on the signal : 'currentLayerChanged(QgsMapLayer*)' on QgisInterface to track the current layer and the switching layer event </div>
<div>- On the current layer : we use the signal 'layerModified()' to detect modification on current layer -> we try to commitChanges this layer</div>
<div><br>
</div>
<div>The result is ... good but we have a problem when we use multiple selection (nodes) with 'Node Tool'. (single selection work fine)</div>
<div><br>
</div>
<div>A hard-crash QGIS appear. </div>
<div>GDB indicate a problem with NodeTools and the method 'deselectAllVertexes'</div>
<div>Here a short view of gdb stack:</div>
<div>Program received signal SIGSEGV, Segmentation fault.</div>
<div>0x000000000066d9e6 in QgsSelectedFeature::deselectAllVertexes() ()</div>
<div>(gdb) where</div>
<div>#0  0x000000000066d9e6 in QgsSelectedFeature::deselectAllVertexes() ()</div>
<div>#1  0x000000000066bd35 in QgsMapToolNodeTool::canvasReleaseEvent(QMouseEvent*) ()</div>
<div>#2  0x00007ffff3b8c8b8 in QgsMapCanvas::mouseReleaseEvent(QMouseEvent*) () from /usr/lib/libqgis_gui.so.2.6.1</div>
<div>#3  0x00007ffff245c50a in QWidget::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4</div>
<div>#4  0x00007ffff27fdfce in QFrame::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4</div>
<div>#5  0x00007ffff2a097b9 in QGraphicsView::viewportEvent(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4</div>
<div>#6  0x00007ffff3073646 in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) ()</div>
<div>   from /usr/lib/x86_64-linux-gnu/libQtCore.so.4</div>
<div>#7  0x00007ffff240ce0c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4</div>
<div>#8  0x00007ffff24135dd in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4</div>
<div>#9  0x00007ffff41ebcab in QgsApplication::notify(QObject*, QEvent*) () from /usr/lib/libqgis_core.so.2.6.1</div>
<div>#10 0x00007ffff30734dd in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4</div>
<div>#11 0x00007ffff2412d93 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4</div>
<div><br>
</div>
<div>We use QGIS 2.6 (try with 2.7) Python 2.7, on Linux Ubuntu x64 & Windows 7 x64.</div>
<div>The data provider for the Vector Layer is memory.</div>
<div><br>
</div>
<div>Regards,</div>
<div>Lionel-A</div>
</div>
</div>
</div>
</div>
</body>
</html>