havatv / qgismultidistancebufferplugin

QGIS Plugin for Multi-distance buffering
GNU General Public License v2.0
4 stars 1 forks source link

User interface freeze in QGIS 3 (thread problem) #12

Closed havatv closed 7 years ago

havatv commented 7 years ago

There were no issues with threading in QGIS 2, but apparently there is a problem with this plugin in QGIS 3 (Ubuntu 16.04, QGIS 2.99.0-Master - 287ed2d; QT 5.5.1, Python 3.5.2):

When running the worker in a thread, the user interface seems to freeze now and then and sometimes QGIS crashes after a while. The following QT error message appears in the log messages panel QT tab:

QObject::killTimer: Timers cannot be stopped from another thread
QObject::~QObject: Timers cannot be stopped from another thread
havatv commented 7 years ago

Seems to have been several problems.

The QT error messages came from QgsGeometryAnalyzer().buffer, which will not run properly in a QThread in QGIS 3. Fixed by removing the "standard" option.

The freezing problem had to do with the initialisation of the thread and worker signals. Hopefully it is now fixed.