[QGIS-Developer] tricontour crashing in QGIS3
Chris Crook
ccrook at linz.govt.nz
Sun Feb 4 12:55:04 PST 2018
I'm looking for help debugging or fixing a problem in matplotlib tricontour. I am using this in a QGIS plugin (www.qgis.org). The call to tricontour causes QGIS to crash. Running python3 on ubuntu 16.04 (matplotlib 1.5.1) and 17.10 (matplotlib 2.0.0).
Running in the debugger gives the following result
Thread 1 "qgis.bin" received signal SIGSEGV, Segmentation fault.
0x00007fff4f7ca098 in qh_initstatistics ()
from /usr/lib/python3/dist-packages/matplotlib/_qhull.cpython-35m-x86_64-linux-gnu.so
#0 0x00007fff4f7ca098 in qh_initstatistics ()
from /usr/lib/python3/dist-packages/matplotlib/_qhull.cpython-35m-x86_64-linux-gnu.so
#1 0x00007fff4f7c6f82 in qh_initqhull_start ()
from /usr/lib/python3/dist-packages/matplotlib/_qhull.cpython-35m-x86_64-linux-gnu.so
#2 0x00007fff4f7d12bc in qh_new_qhull ()
from /usr/lib/python3/dist-packages/matplotlib/_qhull.cpython-35m-x86_64-linux-gnu.so
#3 0x00007fff4f7a3821 in ?? ()
from /usr/lib/python3/dist-packages/matplotlib/_qhull.cpython-35m-x86_64-linux-gnu.so
#4 0x00007fff5d977039 in PyCFunction_Call ()
from /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0
#5 0x00007fff5da831b5 in PyEval_EvalFrameEx ()
from /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0
#6 0x00007fff5db13cac in ?? ()
from /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0
#7 0x00007fff5db13d83 in PyEval_EvalCodeEx ()
from /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0
#8 0x00007fff5d99bad8 in ?? ()
from /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0
....
The python code is
np.save('/home/chris/temp/data.x',x)
np.save('/home/chris/temp/data.y',y)
np.save('/home/chris/temp/data.z',z)
np.save('/home/chris/temp/data.l',levels)
print("Extend",repr(extend))
cs = plt.tricontour(x, y, z, levels, extend=extend)
I've called matplotlib from a simple python script using the saved data (np.save) in a simply python script and it runs without problem, so the problem appears to arise running within the QGIS3 python environment.
Can you suggest any reason why it might be different running from within QGIS and how I can work around/fix this!
Thanks
Chris Crook
________________________________
This message contains information, which may be in confidence and may be subject to legal privilege. If you are not the intended recipient, you must not peruse, use, disseminate, distribute or copy this message. If you have received this message in error, please notify us immediately (Phone 0800 665 463 or info at linz.govt.nz) and destroy the original message. LINZ accepts no responsibility for changes to this email, or for any attachments, after its transmission from LINZ. Thank You.
More information about the QGIS-Developer
mailing list