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 []
Sent: 05 February 2018 11:55
To: Chris Crook
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 
<<>> wrote:
I'm looking for help debugging or fixing a problem in matplotlib tricontour.  I 
am using this in a QGIS plugin (<>).  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 ()
#0  0x00007fff4f7ca098 in qh_initstatistics ()
#1  0x00007fff4f7c6f82 in qh_initqhull_start ()
#2  0x00007fff4f7d12bc in qh_new_qhull ()
#3  0x00007fff4f7a3821 in ?? ()
#4  0x00007fff5d977039 in PyCFunction_Call ()
   from /usr/lib/x86_64-linux-gnu/
#5  0x00007fff5da831b5 in PyEval_EvalFrameEx ()
   from /usr/lib/x86_64-linux-gnu/
#6  0x00007fff5db13cac in ?? ()
   from /usr/lib/x86_64-linux-gnu/
#7  0x00007fff5db13d83 in PyEval_EvalCodeEx ()
   from /usr/lib/x86_64-linux-gnu/
#8  0x00007fff5d99bad8 in ?? ()
   from /usr/lib/x86_64-linux-gnu/

The python code is

                cs = plt.tricontour(x, y, z, levels, extend=extend)

I've called matplotlib from a simple python script using the saved data 
( 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!

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<>) 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<>

QGIS-Developer mailing list
List info:

Reply via email to