Thanks to open the issue.
We encountered the same behavoir on QGIS Server.
The crash is due to `QgsEditorWidgetRegistry::mapLayerWillBeRemoved`
when the cast is done `QgsVectorLayer* vl =
qobject_cast<QgsVectorLayer*>( mapLayer );` QGIS crashed.
Some one to fix it ?
Le 20/06/2016 17:54, Germán Carrillo a écrit :
For reference, this is the ticket I've just opened:
http://hub.qgis.org/issues/15088
Regards,
Germán
2016-06-18 5:56 GMT-05:00 René-Luc Dhont <[email protected]
<mailto:[email protected]>>:
Open a ticket with your code example.
Regards,
Le 18/06/2016 00:28, Germán Carrillo a écrit :
Should I open a ticket reporting this issue to the QGIS issue
tracker?
Regards,
Germán
2016-06-13 15:53 GMT-05:00 Germán Carrillo
<[email protected] <mailto:[email protected]>>:
Hi All,
there seems to be an issue connecting the SIGNAL
layersRemoved from QgsMapLayerRegistry.
For example, if I save this script to a file, and run it from
the Linux terminal:
################################################
import unittest
from qgis.core import QgsApplication, QgsMapLayerRegistry
class SIGNALTest( unittest.TestCase ):
def setUp( self ):
app = QgsApplication([], True)
QgsApplication.setPrefixPath("/usr", True)
QgsApplication.initQgis()
QgsMapLayerRegistry.instance().layersRemoved.connect(
self.myFunction )
def myFunction( self, layerIds ):
print "Called!"
def test1( self ):
self.assertEqual(1,1)
def tearDown( self ):
QgsApplication.exitQgis()
if __name__ == "__main__":
unittest.main()
################################################
I get the following result:
##########
Called!
.
----------------------------------------------------------------------
Ran 1 test in 0.119s
OK
Segmentation fault
###########
If, on the contrary, I comment out the line where the
connection is set or if I use other signals such as
layerRemoved or layersAdded instead of layersRemoved, I get:
###########
.
----------------------------------------------------------------------
Ran 1 test in 0.111s
OK
###########
I'm using QGIS 2.14.2 on a GNU/Linux machine.
Can you confirm such problem? Do you have any clue about it?
Regards,
Germán
--
-----------
|\__
(:>__)(
|/
Soluciones Geoinformáticas Libres
http://geotux.tuxfamily.org/
http://twitter.com/GeoTux2
http://about.me/germancarrillo
<http://gis.stackexchange.com/users/4972/germ%c3%a1n-carrillo>
--
-----------
|\__
(:>__)(
|/
Soluciones Geoinformáticas Libres
http://geotux.tuxfamily.org/
http://twitter.com/GeoTux2
http://about.me/germancarrillo
<http://gis.stackexchange.com/users/4972/germ%c3%a1n-carrillo>
_______________________________________________
Qgis-developer mailing list
[email protected]
<mailto:[email protected]>
List info:http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe:http://lists.osgeo.org/mailman/listinfo/qgis-developer
_______________________________________________
Qgis-developer mailing list
[email protected] <mailto:[email protected]>
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
--
-----------
|\__
(:>__)(
|/
Soluciones Geoinformáticas Libres
http://geotux.tuxfamily.org/
http://twitter.com/GeoTux2
http://about.me/germancarrillo
<http://gis.stackexchange.com/users/4972/germ%c3%a1n-carrillo>
_______________________________________________
Qgis-developer mailing list
[email protected]
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
_______________________________________________
Qgis-developer mailing list
[email protected]
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer