mach0 / qchainage

Chainage Plugin for QGIS
GNU General Public License v3.0
19 stars 18 forks source link

qChainage crashes QGIS 2.18.12 on Linux Mint 18.2 / Ubuntu Xenial x64 #13

Closed mixedbredie closed 7 years ago

mixedbredie commented 7 years ago

I'm running the latest QGIS 2.18.12 from the nightly repositories on x64 Linux Mint 18.2 with version 2.0.0 of the plugin.

QGIS works perfectly but crashes instantly when pressing the qChainage button. It can be a blank project with no layers added or a project with one linestring shapefile or a project with multiple layers.

If you can point me to where QGIS might log any errors I'll add them to this issue.

mach0 commented 7 years ago

Hi! Thanks for the report. Yes - log would be useful because I just tested QGIS 2.18.12 with qChainage 2.0.0 on OSGEO4W/Windows10 and debian9.1 without any problem. As a first suggestion: could you uninstall it - remove the ~/.qgis2/python/plugins/qchainage folder and install it again?

mach0 commented 7 years ago

Just did another test on debian testing.. it might either be the qgis package for Mint or your computer. do you have more information for me?

mixedbredie commented 7 years ago

OK, uninstalled plugin, deleted plugin folder, reinstalled plugin, clicked the button - instant crash.

From the terminal:

src/core/qgspythonrunner.cpp: 32: (run) [3761ms] Running pyplugin_installer.instance().installPlugin('qchainage')
src/core/qgsnetworkaccessmanager.cpp: 94: (queryProxy) [2ms] using fallback proxy for http://plugins.qgis.org/plugins/qchainage/version/2.0.0/download/
src/core/qgspythonrunner.cpp: 32: (run) [3161ms] Running pyplugin_installer.instance().onManagerClose()
src/core/qgsmessagelog.cpp: 45: (logMessage) [3900ms] 2017-08-24T19:57:43 Python warning[1] warning:/home/ross/.qgis2/python/plugins/qchainage/qchainage.py:106: DeprecationWarning: QgsMapCanvas.mapRenderer() is deprecated
  otf = self.iface.mapCanvas().mapRenderer().hasCrsTransformEnabled()

traceback:
src/core/qgsmessagelog.cpp: 45: (logMessage) [6ms] 2017-08-24T19:57:43 Python error[1] Traceback (most recent call last):
  File "/home/ross/.qgis2/python/plugins/qchainage/qchainage.py", line 106, in run
    otf = self.iface.mapCanvas().mapRenderer().hasCrsTransformEnabled()
RuntimeError: wrapped C/C++ object of type QgsMapRenderer has been deleted

Segmentation fault

My installed QGIS:

QGIS version 2.18.12 QGIS code revision 6380a97
Compiled against Qt 4.8.7 Running against Qt 4.8.7
Compiled against GDAL/OGR 1.11.3 Running against GDAL/OGR 1.11.3
Compiled against GEOS 3.5.0-CAPI-1.9.0 Running against GEOS 3.5.0-CAPI-1.9.0 r4084
PostgreSQL Client Version 9.5.2 SpatiaLite Version 4.3.0a
QWT Version 5.2.3 PROJ.4 Version 492
QScintilla2 Version 2.9.1 This copy of QGIS writes debugging output.
mach0 commented 7 years ago

hmmm - thanks for the log. I remember I once ran into the same error, but that was not "solved" in python code but rather in the API. I am afraid I cannot do much until 3.0 is released as you can read in: http://osgeo-org.1560.x6.nabble.com/wrapped-C-C-object-of-type-QgsMapRenderer-has-been-deleted-td5094586.html The QgsMapCanvas.mapRenderer() function is deprecated anyway (I think exactly because of this) and the reworked qchainage is already in the repository for QGIS3.

It seems to happen only in very rare circumstances. Is it only happening on one Computer? Did you try if you have the same problem on other computers as well. As I said - I tried it on Windows and Linux Computer and I cannot reproduce it.

mach0 commented 7 years ago

tried a workaround/fix - can you try if 2.0.1 is working for you?

mixedbredie commented 7 years ago

Yes, that works. If there is no line layer in the project it complains and if there is then it opens the dialogue box for settings. I tested on my Windows machine earlier using 2.0.0 and it worked fine - it was just this Linux Mint box that was crashing. Thanks for the fix.