QgsVectorLayer 's addFeatures function crashes the app #28514
Labels
Bug
Either a bug report, or a bug fix. Let's hope for the latter!
Crash/Data Corruption
PyQGIS
Related to the PyQGIS API
Author Name: Mehmet Selim BILGIN (@MSBilgin)
Original Redmine Issue: 20694
Affected QGIS version: 3.4.1
Redmine category:python_bindings_/_sipify
I generated Spatialite point layer that has 1M features by using random point plugin. In python I tried to copy all features to memory layer. Here is the sample code:
@sourceFeatures = self.sourceLayer.getSelectedFeatures()
self.targetLayer.startEditing()
self.targetLayer.addFeatures(sourceFeatures)
@---crashed---
But when i try with 10.000 features this time it successfully adds features. Interestingly, I tried to add 1M features with while loop, this time it succeed. And note that adding operation runs on another QThread.
The text was updated successfully, but these errors were encountered: