Bug report #11562

Crash after using memory data provider in python and adding the layer to the layer registry

Added by Thilo Schneider about 10 years ago. Updated almost 10 years ago.

Status:Closed
Priority:Severe/Regression
Assignee:-
Category:PyQGIS Console
Affected QGIS version:2.6.0 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:Yes Copied to github as #:19827

Description

The following code creates an immediate crash when inserted into the python console:


vectorlayer = QgsVectorLayer("Point?crs=epsg:31467", "Player", "memory")
vectorlayer.updateExtents()
QgsMapLayerRegistry.instance().addMapLayer(vectorlayer)

If one first adds the vectorlayer to the layer registry and then updates the extends, QGis crashes not immediately but as soon as the map is redrawn the next time. The crash persists if I add features to the layer before adding it to the layer registry.

All third party plugins are disabled in my installation. The same code has been working in 2.4.

backtrace.txt Magnifier - A backtrace of the crash. (8.19 KB) Thilo Schneider, 2014-11-04 11:43 PM

History

#1 Updated by Thilo Schneider about 10 years ago

Forgot to mention: Testing has been done under Ubuntu Precise.

#2 Updated by Giovanni Manghi about 10 years ago

  • Priority changed from High to Severe/Regression

tagging as a regression waiting for the feedback of a developer.

#3 Updated by Martin Dobias almost 10 years ago

I cannot replicate the crash (ubuntu trusty)

#4 Updated by Giovanni Manghi almost 10 years ago

  • Status changed from Open to Feedback

#5 Updated by Thilo Schneider almost 10 years ago

Is there anything else I can provide to make tracking the problem easier for you?

#6 Updated by Salvatore Larosa almost 10 years ago

Thilo Schneider wrote:

Is there anything else I can provide to make tracking the problem easier for you?

Yes, could you try to run QGIS with the --noplugins option, please?

#7 Updated by Thilo Schneider almost 10 years ago

  • Status changed from Feedback to Closed

Problem solved. It turned out that I had an old dependency installed on my system.

Also available in: Atom PDF