Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
qgib opened this issue Sep 1, 2013 · 4 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Crash/Data Corruption Plugins

Comments

@qgib
Copy link
Contributor

qgib commented Sep 1, 2013

Author Name: Larry Shaffer (Larry Shaffer)
Original Redmine Issue: 8543
Affected QGIS version: master
Redmine category:python_plugins


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()

  1. 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.

@qgib
Copy link
Contributor Author

qgib commented Sep 1, 2013

Author Name: Salvatore Larosa (@slarosa)


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 );

@qgib
Copy link
Contributor Author

qgib commented Sep 1, 2013

Author Name: Larry Shaffer (Larry Shaffer)


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)?

@qgib
Copy link
Contributor Author

qgib commented Sep 1, 2013

Author Name: Salvatore Larosa (@slarosa)


sorry for the overzealous approach, forget my note!

@qgib
Copy link
Contributor Author

qgib commented Jun 21, 2016

Author Name: Jürgen Fischer (@jef-n)


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


  • crashes_corrupts_data was changed from 0 to 1
  • resolution was changed from to worksforme
  • status_id was changed from Open to Closed

@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! Plugins Crash/Data Corruption labels May 24, 2019
@qgib qgib added this to the Future Release - Nice to have milestone May 24, 2019
@qgib qgib closed this as completed May 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Crash/Data Corruption Plugins
Projects
None yet
Development

No branches or pull requests

1 participant