<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Open a ticket with your code example.<br>
    <br>
    Regards,<br>
    <br>
    <div class="moz-cite-prefix">Le 18/06/2016 00:28, Germán Carrillo a
      écrit :<br>
    </div>
    <blockquote
cite="mid:CANaz7mxkwU9CyjkOayvjBAF+gXSCZtg4N6yNaG3YP4GEugMJ3w@mail.gmail.com"
      type="cite">
      <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 moz-do-not-send="true"
              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 class="HOEnZb"><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 moz-do-not-send="true"
                                    href="http://geotux.tuxfamily.org/"
                                    target="_blank">http://geotux.tuxfamily.org/</a><br>
                                  <a moz-do-not-send="true"
                                    href="http://twitter.com/GeoTux2"
                                    target="_blank">http://twitter.com/GeoTux2</a></div>
                                <div><a moz-do-not-send="true"
                                    href="http://about.me/germancarrillo"
                                    target="_blank">http://about.me/germancarrillo</a><br>
                                </div>
                                <div>
                                  <div><br>
                                  </div>
                                  <div><a moz-do-not-send="true"
                                      href="http://gis.stackexchange.com/users/4972/germ%c3%a1n-carrillo"
                                      target="_blank"><img
                                        moz-do-not-send="true"
                                        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 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 moz-do-not-send="true"
                      href="http://geotux.tuxfamily.org/"
                      target="_blank">http://geotux.tuxfamily.org/</a><br>
                    <a moz-do-not-send="true"
                      href="http://twitter.com/GeoTux2" target="_blank">http://twitter.com/GeoTux2</a></div>
                  <div><a moz-do-not-send="true"
                      href="http://about.me/germancarrillo"
                      target="_blank">http://about.me/germancarrillo</a><br>
                  </div>
                  <div>
                    <div><br>
                    </div>
                    <div><a moz-do-not-send="true"
                        href="http://gis.stackexchange.com/users/4972/germ%c3%a1n-carrillo"
                        target="_blank"><img moz-do-not-send="true"
                          src="http://gis.stackexchange.com/users/flair/4972.png"></a></div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Qgis-developer mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Qgis-developer@lists.osgeo.org">Qgis-developer@lists.osgeo.org</a>
List info: <a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/qgis-developer">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a>
Unsubscribe: <a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/qgis-developer">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a></pre>
    </blockquote>
    <br>
  </body>
</html>