Thanks Benhamin.   - I'll certainly look in to that.  The installations are all 
using apt on ubuntu.  Using standard repositories apart from the QGIS nightly 
build.  I'm not sure if QGIS uses qhull directly or indirectly - I'll 
investigate that.  
________________________________________
From: Benjamin Root [ben.v.r...@gmail.com]
Sent: 05 February 2018 11:55
To: Chris Crook
Cc: matplotlib-us...@python.org; qgis-developer@lists.osgeo.org
Subject: Re: [Matplotlib-users] tricontour crashing in QGIS3

Looks like a conflict for the qhull library, which matplotlib vendors and 
builds as a part of its packaging. How did qgis and matplotlib get installed? 
Perhaps they were built with conflicting flags, perhaps? Just a few ideas off 
of the top of my head.

Ben Root


On Sun, Feb 4, 2018 at 3:55 PM, Chris Crook 
<ccr...@linz.govt.nz<mailto:ccr...@linz.govt.nz>> wrote:
I'm looking for help debugging or fixing a problem in matplotlib tricontour.  I 
am using this in a QGIS plugin (www.qgis.org<http://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<http://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<http://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<http://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<http://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<http://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 
i...@linz.govt.nz<mailto:i...@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.
_______________________________________________
Matplotlib-users mailing list
matplotlib-us...@python.org<mailto:matplotlib-us...@python.org>
https://mail.python.org/mailman/listinfo/matplotlib-users

_______________________________________________
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to