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
Crash after calling QgsMapLayerRegistry::addMapLayers #15253
Comments
Author Name: Giovanni Manghi (@gioman) is this a regression since 1.7.4? |
Author Name: Giuseppe Sucameli (@brushtyler) Giovanni Manghi wrote:
no, the QgsMapLayerRegistry::addMapLayers() method is new in 1.8 (it wasn't present in 1.7.x) |
Author Name: Larry Shaffer (Larry Shaffer) Giuseppe, I attempted to confirm with 1.8_1125571 on Mac OS X 10.6.8 and Ubuntu 12.04, but I couldn't get @QgsMapLayerRegistry.addMapLayers()@ to work without an exception being raised:
I tried @from qgis.core import QgsMapLayerRegistry@ but ends in same exception. However, I had no issues adding 7 layers with @QgsMapLayerRegistry.instance().addMapLayers()@, as long as I did not use an existing layer name as the second parameter to the @QgsVectorLayer@ constructor. This works on both platforms:
but this causes the crash on both platforms (sometimes took 3 layers):
Does it still crash on your tested platforms when using dissimilar layer names in @QgsVectorLayer@ constructor? |
Author Name: Jürgen Fischer (@jef-n)
|
Author Name: Jürgen Fischer (@jef-n) Fixed in changeset "d78e6052431192351115eac5720c34721a5085c1".
|
Author Name: Giuseppe Sucameli (@brushtyler)
Original Redmine Issue: 5747
Affected QGIS version: master
Redmine category:python_plugins
The @QgsMapLayerRegistry.addMapLayer@ is deprecated but the newer version @QgsMapLayerRegistry.addMapLayers@ if called two times cause segfault.
From the python console:
Confirmed on both Win7 and Ubuntu 11.04, QGis 1.8
The text was updated successfully, but these errors were encountered: