Bug report #8543

QgsVectorLayerEditBuffer.addedFeatures() function binding on Windows 8 causes crash

Added by Larry Shaffer about 11 years ago. Updated over 8 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Python plugins
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:worksforme
Crashes QGIS or corrupts data:Yes Copied to github as #:17294

Description

Repeatable steps:

  1. Put a vector layer into edit mode
  2. Add a feature
  3. Run commands in console
    eb = iface.activeLayer().editBuffer()
    eb.addedFeatures()
    
  4. Crash

QgsVectorLayerEditBuffer.addedFeatures() works fine on Mac (10.7.5, latest master), returning a dict.

Will try to get, or inspect, a crash dump soon.

History

#1 Updated by Salvatore Larosa about 11 years ago

Hi Larry,
this should not be hard to solve, I haven't a build environment under windows.

Anyone could try the following patch:

diff --git a/python/core/qgsvectorlayereditbuffer.sip b/python/core/qgsvectorlayereditbuffer.sip
index 0b6af3a..11ff4ab 100644
--- a/python/core/qgsvectorlayereditbuffer.sip
+++ b/python/core/qgsvectorlayereditbuffer.sip
@@ -102,7 +102,7 @@ class QgsVectorLayerEditBuffer : QObject
       \
ote added in v1.6 */
     void committedAttributesDeleted( const QString& layerId, const QgsAttributeList& deletedAttributes );
     void committedAttributesAdded( const QString& layerId, const QList<QgsField>& addedAttributes );
-    void committedFeaturesAdded( const QString& layerId, const QgsFeatureList& addedFeatures );
+    void committedFeaturesAdded( const QString& layerId, const QgsFeatureMap& addedFeatures );
     void committedFeaturesRemoved( const QString& layerId, const QgsFeatureIds& deletedFeatureIds );
     void committedAttributeValuesChanges( const QString& layerId, const QgsChangedAttributesMap& changedAttributesValues );
     void committedGeometriesChanges( const QString& layerId, const QgsGeometryMap& changedGeometries );

#2 Updated by Larry Shaffer about 11 years ago

Hi Salvatore,

Not sure how that signal relates to the QgsVectorLayerEditBuffer.addedFeatures() public function.

Also, wouldn't changing that in the .sip file probably cause a build error when sip doesn't find a matching signature in the header file (qgsvectorlayereditbuffer.h)?

#3 Updated by Salvatore Larosa about 11 years ago

sorry for the overzealous approach, forget my note!

#4 Updated by Jürgen Fischer over 8 years ago

  • Crashes QGIS or corrupts data changed from No to Yes
  • Resolution set to worksforme
  • Status changed from Open to Closed

works fine for me (on windows 10 x86 and x86_64)

Also available in: Atom PDF