Hi all, When I write: f = QgsFeature() f.setFields( layer.dataProvider().fields() ) QGIS crashes Here are the two involved methods void QgsFeature::setFields ( const QgsFields * fields ) virtual const QgsFields& QgsVectorDataProvider::fields ( ) const Anybody has an idea??? Did I do something wrong? Thanks Denis