<div dir="ltr">For reference, this is the ticket I've just opened: <a href="http://hub.qgis.org/issues/15088">http://hub.qgis.org/issues/15088</a><br><div><br></div><div style="">Regards, </div><div style=""><br></div><div style="">Germán</div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-06-18 5:56 GMT-05:00 René-Luc Dhont <span dir="ltr"><<a href="mailto:rldhont@gmail.com" target="_blank">rldhont@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    Open a ticket with your code example.<br>
    <br>
    Regards,<div><div class="h5"><br>
    <br>
    <div>Le 18/06/2016 00:28, Germán Carrillo a
      écrit :<br>
    </div>
    </div></div><blockquote type="cite"><div><div class="h5">
      <div dir="ltr">Should I open a ticket reporting this issue to the
        QGIS issue tracker?
        <div><br>
        </div>
        <div>Regards,</div>
        <div><br>
        </div>
        <div>Germán</div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">2016-06-13 15:53 GMT-05:00 Germán
          Carrillo <span dir="ltr"><<a href="mailto:carrillo.german@gmail.com" target="_blank">carrillo.german@gmail.com</a>></span>:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div dir="ltr">Hi All,
              <div><br>
              </div>
              <div>there seems to be an issue connecting the SIGNAL
                layersRemoved from QgsMapLayerRegistry.</div>
              <div><br>
              </div>
              <div>For example, if I save this script to a file, and run
                it from the Linux terminal:</div>
              <div><br>
              </div>
              <div>################################################</div>
              <div>
                <div>import unittest</div>
                <div>from qgis.core import QgsApplication,
                  QgsMapLayerRegistry</div>
                <div><br>
                </div>
                <div>class SIGNALTest( unittest.TestCase ):</div>
                <div><br>
                </div>
                <div>    def setUp( self ):</div>
                <div>        app = QgsApplication([], True)</div>
                <div>        QgsApplication.setPrefixPath("/usr", True)</div>
                <div>        QgsApplication.initQgis()</div>
                <div>        </div>
                <div>       
                  QgsMapLayerRegistry.instance().layersRemoved.connect(
                  self.myFunction )             </div>
                <div>        </div>
                <div>    def myFunction( self, layerIds ):</div>
                <div>        print "Called!"</div>
                <div>        </div>
                <div>    def test1( self ):</div>
                <div>        self.assertEqual(1,1)</div>
                <div><br>
                </div>
                <div>    def tearDown( self ):   </div>
                <div>        QgsApplication.exitQgis()    </div>
                <div>               </div>
                <div>if __name__ == "__main__":</div>
                <div>    unittest.main()</div>
              </div>
              <div>################################################</div>
              <div><br>
              </div>
              <div>I get the following result:</div>
              <div><br>
              </div>
              <div>##########</div>
              <div>
                <div>Called!</div>
                <div>.</div>
                <div>----------------------------------------------------------------------</div>
                <div>Ran 1 test in 0.119s</div>
                <div><br>
                </div>
                <div>OK</div>
                <div>Segmentation fault</div>
                <div>###########</div>
              </div>
              <div><br>
              </div>
              <div>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:</div>
              <div><br>
              </div>
              <div>###########<br>
              </div>
              <div>
                <div>.</div>
                <div>----------------------------------------------------------------------</div>
                <div>Ran 1 test in 0.111s</div>
                <div><br>
                </div>
                <div>OK</div>
              </div>
              <div>###########<br>
              </div>
              <div><br>
              </div>
              <div>I'm using QGIS 2.14.2 on a GNU/Linux machine.</div>
              <div><br>
              </div>
              <div>Can you confirm such problem? Do you have any clue
                about it?</div>
              <div><br>
              </div>
              <div><br>
              </div>
              <div>Regards, </div>
              <span><font color="#888888">
                  <div><br>
                  </div>
                  <div>Germán</div>
                  <div><br>
                    <div>-- <br>
                      <div data-smartmail="gmail_signature">
                        <div dir="ltr">
                          <div>
                            <div dir="ltr">
                              <div dir="ltr">
                                <div>-----------<br>
                                </div>
                                <div>   |\__  <br>
                                  (:>__)(<br>
                                     |/    <br>
                                  Soluciones Geoinformáticas Libres    
                                                         <br>
                                  <a href="http://geotux.tuxfamily.org/" target="_blank">http://geotux.tuxfamily.org/</a><br>
                                  <a href="http://twitter.com/GeoTux2" target="_blank">http://twitter.com/GeoTux2</a></div>
                                <div><a href="http://about.me/germancarrillo" target="_blank">http://about.me/germancarrillo</a><br>
                                </div>
                                <div>
                                  <div><br>
                                  </div>
                                  <div><a href="http://gis.stackexchange.com/users/4972/germ%c3%a1n-carrillo" target="_blank"><img src="http://gis.stackexchange.com/users/flair/4972.png"></a></div>
                                </div>
                              </div>
                            </div>
                          </div>
                        </div>
                      </div>
                    </div>
                  </div>
                </font></span></div>
          </blockquote>
        </div>
        <br>
        <br clear="all">
        <div><br>
        </div>
        -- <br>
        <div data-smartmail="gmail_signature">
          <div dir="ltr">
            <div>
              <div dir="ltr">
                <div dir="ltr">
                  <div>-----------<br>
                  </div>
                  <div>   |\__  <br>
                    (:>__)(<br>
                       |/    <br>
                    Soluciones Geoinformáticas Libres                  
                             <br>
                    <a href="http://geotux.tuxfamily.org/" target="_blank">http://geotux.tuxfamily.org/</a><br>
                    <a href="http://twitter.com/GeoTux2" target="_blank">http://twitter.com/GeoTux2</a></div>
                  <div><a href="http://about.me/germancarrillo" target="_blank">http://about.me/germancarrillo</a><br>
                  </div>
                  <div>
                    <div><br>
                    </div>
                    <div><a href="http://gis.stackexchange.com/users/4972/germ%c3%a1n-carrillo" target="_blank"><img src="http://gis.stackexchange.com/users/flair/4972.png"></a></div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <br>
      <fieldset></fieldset>
      <br>
      </div></div><pre>_______________________________________________
Qgis-developer mailing list
<a href="mailto:Qgis-developer@lists.osgeo.org" target="_blank">Qgis-developer@lists.osgeo.org</a>
List info: <a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a>
Unsubscribe: <a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a></pre>
    </blockquote>
    <br>
  </div>

<br>_______________________________________________<br>
Qgis-developer mailing list<br>
<a href="mailto:Qgis-developer@lists.osgeo.org">Qgis-developer@lists.osgeo.org</a><br>
List info: <a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
Unsubscribe: <a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div>-----------<br></div><div>   |\__  <br>(:>__)(<br>   |/    <br>Soluciones Geoinformáticas Libres                            <br><a href="http://geotux.tuxfamily.org/" target="_blank">http://geotux.tuxfamily.org/</a><br><a href="http://twitter.com/GeoTux2" target="_blank">http://twitter.com/GeoTux2</a></div><div><a href="http://about.me/germancarrillo" target="_blank">http://about.me/germancarrillo</a><br></div><div><div><br></div><div><a href="http://gis.stackexchange.com/users/4972/germ%c3%a1n-carrillo" target="_blank"><img src="http://gis.stackexchange.com/users/flair/4972.png"></a></div></div></div></div></div></div></div>
</div>