[Qgis-developer] qgis crash using QThread in a plugin script

Sergio Vignali vignalisergio30 at gmail.com
Tue Sep 6 23:57:52 PDT 2016


I posted my problem in gis.stackexchange, (
http://gis.stackexchange.com/questions/209602/qgis-crash-using-qthread-in-a-plugin-script
).
There you can find the full explanation of the problem and all the code I
used... It would be great to get some feedbacks!
Best
s.

2016-09-06 3:58 GMT+02:00 Akbar Gumbira <akbargumbira at gmail.com>:

> 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 https://snorfalorpagus.net/
> blog/2013/12/07/multithreading-in-qgis-python-plugins/
>
> On Sep 5, 2016 23:01, "Sergio Vignali" <vignalisergio30 at gmail.com> wrote:
>
>> Dear all,
>>
>> 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...
>> I am using qgis 2.14 in a linux machine, do you have any advice?
>>
>> All the best
>>
>>
>>
>> --
>> Sergio Vignali
>>
>>
>> _______________________________________________
>> 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
>>
>


-- 
Sergio Vignali
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20160907/834904bb/attachment-0001.html>


More information about the Qgis-developer mailing list