Hi,
I was getting segfaults attempting to use matplotlib, and after a few hours of
poking, I believe that I have isolated the likely source of the problem. It
seems like there is a conflict with player/stage (the robot simulator) in the
latest version. Specifically this code works as per the tutorial:
import matplotlib.pyplot
matplotlib.pyplot.plot([1,2,3])
matplotlib.pyplot.ylabel('some numbers')
matplotlib.pyplot.show()
This code, however, does not:
import playerc
import matplotlib.pyplot
matplotlib.pyplot.plot([1,2,3])
matplotlib.pyplot.ylabel('some numbers')
matplotlib.pyplot.show()
This results in a segmentation fault.
Running gdb on this yields the following:
GNU gdb 6.8-debian
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu"...
(no debugging symbols found)
(gdb) set args test.py
(gdb) run
Starting program: /usr/bin/python test.py
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[New Thread 0x7f5495eb06f0 (LWP 25907)]
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7f5495eb06f0 (LWP 25907)]
0x00007f54916b64af in __cxa_allocate_exception () from /usr/lib/libstdc++.so.6
So I am not sure what is going on, my guess is some kind of memory allocation
collision? But this diagnosis could be incorrect as I am inexperienced with
gdb.
Other related information:
OS: Linux ubuntu 2.6.28-11-generic #42-Ubuntu SMP Fri Apr 17 01:58:03 UTC 2009
x86_64 GNU/Linux
Matplotlib version: 0.98.6svn (Got the latest SVN checkout after I was having
the same issue with the matplotlib installed under Synaptic which is 0.98.5.2)
Numpy: 1.4.0.dev7029 (Again, got latest SVN in a futile attempt to eliminate
any possible issues)
Scipy: 0.8.0.dev5795 (same, although I don't think this is even a dependency)
Player: 2.1.2
Stage: 3.0.1
I have not made any changes to the matplotlibrc file, or setup.py, and the
verbose-debug option to python yields the following output.
$HOME=/home/anu
CONFIGDIR=/home/anu/.matplotlib
matplotlib data path /usr/local/lib/python2.6/dist-packages/matplotlib/mpl-data
loaded rc file
/usr/local/lib/python2.6/dist-packages/matplotlib/mpl-data/matplotlibrc
matplotlib version 0.98.6svn
verbose.level debug
interactive is False
units is False
platform is linux2
Lastly, my gcc version is gcc version 4.3.3 (Ubuntu 4.3.3-5ubuntu4)
I did have matplotlib and player/stage playing nicely in a previous
incarnation, using older versions of both from about 8 months ago.
Unfortunately going back is not an option for me, and since this seems like it
may be a third party conflict, I may need to refactor my code to avoid loading
both in the same script. But any help would be appreciated!
Thanks for your attention!
Anu
_________________________________________________________________
Windows Liveā¢: Keep your life in sync.
http://windowslive.com/explore?ocid=TXT_TAGLM_WL_BR_life_in_synch_062009
------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises
looking to deploy the next generation of Solaris that includes the latest
innovations from Sun and the OpenSource community. Download a copy and
enjoy capabilities such as Networking, Storage and Virtualization.
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users