<div dir="ltr"><div><div>I posted my problem in gis.stackexchange, (<a href="http://gis.stackexchange.com/questions/209602/qgis-crash-using-qthread-in-a-plugin-script">http://gis.stackexchange.com/questions/209602/qgis-crash-using-qthread-in-a-plugin-script</a>).<br>There you can find the full explanation of the problem and all the code I used... It would be great to get some feedbacks!<br></div>Best<br></div>s.<br></div><div class="gmail_extra"><br><div class="gmail_quote">2016-09-06 3:58 GMT+02:00 Akbar Gumbira <span dir="ltr"><<a href="mailto:akbargumbira@gmail.com" target="_blank">akbargumbira@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">It would be more helpful if you point to the code here. I had a problem with QThread (was initially inheriting QThread) but managed to fix the problem by creating workers and move the worker object to thread. This is a good article about multithreading in qgis<a href="https://snorfalorpagus.net/blog/2013/12/07/multithreading-in-qgis-python-plugins/" target="_blank"> https://snorfalorpagus.net/<wbr>blog/2013/12/07/<wbr>multithreading-in-qgis-python-<wbr>plugins/</a></p>
<div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Sep 5, 2016 23:01, "Sergio Vignali" <<a href="mailto:vignalisergio30@gmail.com" target="_blank">vignalisergio30@gmail.com</a>> wrote:<br type="attribution"></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr"><div>Dear all,<br><br>I wrote a python script that aims to execute neighbourhood statistics in raster layer. My script uses QThread to update a QList and a QProgressBar and everithing works fine if I run the script from PyCharm, the progressbar and the list are updated. The problem appears when I move my script in a Qgis plugin, the UI appears correctly but clicking OK the software crashes...<br>I am using qgis 2.14 in a linux machine, do you have any advice?<br><br>All the best<br><br></div><br clear="all"><div><div><div><div><br>-- <br><div><div dir="ltr">Sergio Vignali<div><br></div></div></div>
</div></div></div></div></div>
<br></div></div>______________________________<wbr>_________________<br>
Qgis-developer mailing list<br>
<a href="mailto:Qgis-developer@lists.osgeo.org" target="_blank">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<wbr>/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<wbr>/listinfo/qgis-developer</a><br></blockquote></div></div>
</blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Sergio Vignali<div><br></div></div></div>
</div>