[Qgis-developer] Segmentation fault when using layersRemoved SIGNAL.

René-Luc Dhont rldhont at gmail.com
Sat Jun 18 03:56:56 PDT 2016


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 <carrillo.german at gmail.com 
> <mailto:carrillo.german at gmail.com>>:
>
>     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
> Qgis-developer at lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20160618/26a50aea/attachment.html>


More information about the Qgis-developer mailing list