AlisterH / QGISflowEstimator

Open Channel Flow Estimator QGIS Plugin
2 stars 0 forks source link

Miscellaneous errors to be tidied up #13

Open AlisterH opened 4 years ago

AlisterH commented 4 years ago
  1. There is an error if you click save on the "channel from DEM" tab when you haven't actually sampled a channel from a DEM.

  2. It seems we don't properly disconnect the single and/or double click action before connecting our own.

  3. Resizing the window often crashes QGIS 3.x badly, possibly depending on what tab is active - usually I can't get a proper error message, but sometimes I get this (I guess I really need to get debug symbols to get the main QGIS stack trace as well):

    
    An error has occurred while executing Python code: 

RuntimeError: wrapped C/C++ object of type FigureCanvasQTAgg has been deleted Traceback (most recent call last): File "C:\Users\alister\Desktop\QGIS-3~1.1-1\apps\Python37\lib\site-packages\matplotlib\backends\backend_qt5agg.py", line 39, in paintEvent painter = QtGui.QPainter(self) RuntimeError: wrapped C/C++ object of type FigureCanvasQTAgg has been deleted

Python version: 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD64)] QGIS version: 3.12.1-București București, 121cc00ff0

Python Path: C:/Users/alister/Desktop/QGIS-3~1.1-1/apps/qgis/./python C:/Users/alister/AppData/Roaming/QGIS/QGIS3\profiles\test/python C:/Users/alister/AppData/Roaming/QGIS/QGIS3\profiles\test/python/plugins C:/Users/alister/Desktop/QGIS-3~1.1-1/apps/qgis/./python/plugins C:\Users\alister\Desktop\QGIS-3~1.1-1\apps\Python37 C:\Users\alister\Desktop\QGIS-3~1.1-1\apps\Python37\Scripts C:\Users\alister\Desktop\QGIS-3.12.1-1\bin\python37.zip C:\Users\alister\Desktop\QGIS-3~1.1-1\apps\Python37\DLLs C:\Users\alister\Desktop\QGIS-3~1.1-1\apps\Python37\lib C:\Users\alister\Desktop\QGIS-3.12.1-1\bin C:\Users\alister\Desktop\QGIS-3~1.1-1\apps\Python37\lib\site-packages C:\Users\alister\Desktop\QGIS-3~1.1-1\apps\Python37\lib\site-packages\win32 C:\Users\alister\Desktop\QGIS-3~1.1-1\apps\Python37\lib\site-packages\win32\lib C:\Users\alister\Desktop\QGIS-3~1.1-1\apps\Python37\lib\site-packages\Pythonwin C:/Users/alister/AppData/Roaming/QGIS/QGIS3\profiles\test/python

AlisterH commented 4 years ago
  1. If the python console is open when you start the plugin it freezes QGIS (unless you have previously opened and then closed the plugin). Google suggested in QGIS2 this could be caused by print, but not in QGIS3, but for us this problem only occurred in QGIS3. I tried switching from print to QgsMessageLog.logMessage anyway, but it didn't help.
  2. If you click the down arrow on slope or roughness, down to zero, and then keep clicking or perhaps click up and down again, QGIS seems to crash, although there is no crash dialog.
AlisterH commented 4 years ago
  1. There is an error if you click save on the "channel from DEM" tab when you haven't actually sampled a channel from a DEM.

Fixed in recent (or perhaps pending) commit.

AlisterH commented 4 years ago

Resizing the window often crashes QGIS 3.x badly, possibly depending on what tab is active

For now I have disabled resizing (by changing something in the .ui file IIRC) - sorry QGIS2 users.