Hi, I am rashly building matplotlib from source on Snow Leopard, and getting a segmentation fault as soon as I try and do a plot. me $ python -c 'import pylab; pylab.plot(range(10))' Segmentation fault I've built python myself with: export MACOSX_DEPLOYMENT_TARGET=10.6 ./configure --prefix=/Users/mb312/usr/local Then numpy using the usual procedure (tests look good) For matplotlib, I've hacked the make.osx file so the top looks like: ---- begin make.osx snippet ---- PYVERSION=2.6 PYTHON=python${PYVERSION} ZLIBVERSION=1.2.3 PNGVERSION=1.2.40 FREETYPEVERSION=2.3.11 MACOSX_DEPLOYMENT_TARGET=10.6 OSX_SDK_VER=10.6 ARCH_FLAGS= ## You shouldn't need to configure past this point PKG_CONFIG_PATH="${PREFIX}/lib/pkgconfig" CFLAGS="${ARCH_FLAGS} -I${PREFIX}/include -I${PREFIX}/include/freetype2 -isysroot /Developer/SDKs/MacOSX${OSX_SDK_VER}.sdk" LDFLAGS="${ARCH_FLAGS} -L${PREFIX}/lib -syslibroot,/Developer/SDKs/MacOSX${OSX_SDK_VER}.sdk" --- end make.osx snippet --- This builds correctly but then causes the segfault above. I've tried with the original make.osx package versions of freetype and libpng with the same outcome. Running simple_script.py: blair:~ mb312$ python scipybuild/matplotlib/examples/pylab_examples/simple_plot.py --verbose-helpful $HOME=/Users/mb312 CONFIGDIR=/Users/mb312/.matplotlib matplotlib data path /Users/mb312/usr/local/lib/python2.6/site-packages/matplotlib/mpl-data loaded rc file /Users/mb312/usr/local/lib/python2.6/site-packages/matplotlib/mpl-data/matplotlibrc matplotlib version 1.0.svn verbose.level helpful interactive is False units is False platform is darwin Using fontManager instance from /Users/mb312/.matplotlib/fontList.cache backend MacOSX version unknown Segmentation fault gcc version is i686-apple-darwin10-gcc-4.2.1 Did I take a mis-step somewhere in the build process? Any advice very gratefully received... Thanks a lot, Matthew
> I am rashly building matplotlib from source on Snow Leopard, and > getting a segmentation fault as soon as I try and do a plot. > > me $ python -c 'import pylab; pylab.plot(range(10))' > Segmentation fault Sorry - here the is top of the build output: export PKG_CONFIG_PATH="/Users/mb312/usr/local/lib/pkgconfig" &&\ export MACOSX_DEPLOYMENT_TARGET=10.6 &&\ export CFLAGS=" -I/Users/mb312/usr/local/include -I/Users/mb312/usr/local/include/freetype2 -isysroot /Developer/SDKs/MacOSX10.6.sdk" &&\ export LDFLAGS=" -L/Users/mb312/usr/local/lib -syslibroot,/Developer/SDKs/MacOSX10.6.sdk" &&\ python2.6 setup.py install --prefix=/Users/mb312/usr/local ============================================================================ BUILDING MATPLOTLIB matplotlib: 1.0.svn python: 2.6.4 (r264:75706, Nov 29 2009, 00:03:57) [GCC 4.2.1 (Apple Inc. build 5646) (dot 1)] platform: darwin REQUIRED DEPENDENCIES numpy: 1.4.0.dev7803 freetype2: found, but unknown version (no pkg-config) * WARNING: Could not find 'freetype2' headers in any * of '.', './freetype2'. OPTIONAL BACKEND DEPENDENCIES libpng: found, but unknown version (no pkg-config) * Could not find 'libpng' headers in any of '.' Tkinter: Tkinter: 73770, Tk: 8.5, Tcl: 8.5 wxPython: no * wxPython not found Gtk+: no * Building for Gtk+ requires pygtk; you must be able * to "import gtk" in your build/install environment Mac OS X native: yes Qt: no Qt4: no Cairo: no OPTIONAL DATE/TIMEZONE DEPENDENCIES datetime: present, version unknown dateutil: matplotlib will provide pytz: 2008c OPTIONAL USETEX DEPENDENCIES dvipng: no ghostscript: /bin/sh: gs: command not found latex: no Thanks a lot, Matthew
Matthew Brett <mat...@gm...> writes: > I am rashly building matplotlib from source on Snow Leopard, and > getting a segmentation fault as soon as I try and do a plot. Can you get a backtrace in gdb? -- Jouni K. Seppänen http://www.iki.fi/jks
Hi, On Sun, Nov 29, 2009 at 1:30 AM, Jouni K. Seppänen <jk...@ik...> wrote: > Matthew Brett <mat...@gm...> writes: > >> I am rashly building matplotlib from source on Snow Leopard, and >> getting a segmentation fault as soon as I try and do a plot. > > Can you get a backtrace in gdb? (gdb) run scipybuild/matplotlib/examples/pylab_examples/simple_plot.py ... Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: 13 at address: 0x0000000000000000 0x0000000102d96ffb in py_to_agg_transformation_matrix (obj=0x102d794d0, errors=false) at src/agg_py_transforms.cpp:21 21 matrix = (PyArrayObject*) PyArray_FromObject(obj, PyArray_DOUBLE, 2, 2); hum... I'm running from the latest svn numpy... Cheers, Matthew
Hi, >> Can you get a backtrace in gdb? > > (gdb) run scipybuild/matplotlib/examples/pylab_examples/simple_plot.py ... > Program received signal EXC_BAD_ACCESS, Could not access memory. > Reason: 13 at address: 0x0000000000000000 > 0x0000000102d96ffb in py_to_agg_transformation_matrix > (obj=0x102d794d0, errors=false) at src/agg_py_transforms.cpp:21 > 21 matrix = (PyArrayObject*) PyArray_FromObject(obj, > PyArray_DOUBLE, 2, 2); > > hum... I'm running from the latest svn numpy... Same outcome with numpy 1.3 though... Matthew
Matthew Brett <mat...@gm...> writes: >> Can you get a backtrace in gdb? > > Program received signal EXC_BAD_ACCESS, Could not access memory. > Reason: 13 at address: 0x0000000000000000 > 0x0000000102d96ffb in py_to_agg_transformation_matrix > (obj=0x102d794d0, errors=false) at src/agg_py_transforms.cpp:21 > 21 matrix = (PyArrayObject*) PyArray_FromObject(obj, > PyArray_DOUBLE, 2, 2); Can you type "bt" in gdb at this point to see the whole call stack? -- Jouni K. Seppänen http://www.iki.fi/jks
On Sun, Nov 29, 2009 at 9:49 AM, Jouni K. Seppänen <jk...@ik...> wrote: > Matthew Brett <mat...@gm...> > writes: > >>> Can you get a backtrace in gdb? >> >> Program received signal EXC_BAD_ACCESS, Could not access memory. >> Reason: 13 at address: 0x0000000000000000 >> 0x0000000102d96ffb in py_to_agg_transformation_matrix >> (obj=0x102d794d0, errors=false) at src/agg_py_transforms.cpp:21 >> 21 matrix = (PyArrayObject*) PyArray_FromObject(obj, >> PyArray_DOUBLE, 2, 2); > > Can you type "bt" in gdb at this point to see the whole call stack? Sorry - yes - here: Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: 13 at address: 0x0000000000000000 0x0000000102cf703b in py_to_agg_transformation_matrix (obj=0x102cde590, errors=false) at src/agg_py_transforms.cpp:21 21 matrix = (PyArrayObject*) PyArray_FromObject(obj, PyArray_DOUBLE, 2, 2); (gdb) bt #0 0x0000000102cf703b in py_to_agg_transformation_matrix (obj=0x102cde590, errors=false) at src/agg_py_transforms.cpp:21 #1 0x0000000102cf762c in get_path_iterator (path=0x102cde710, trans=<value temporarily unavailable, due to optimizations>, remove_nans=1, do_clip=0, rect=0x7fff5fbf9480, quantize_mode=QUANTIZE_AUTO, do_simplify=1) at src/path_cleanup.cpp:58 #2 0x0000000102ce9e90 in GraphicsContext_draw_path (self=0x102cd19d0, args=<value temporarily unavailable, due to optimizations>) at src/_macosx.m:881 #3 0x00000001000b31d8 in PyEval_EvalFrameEx (f=0x102b65f50, throwflag=<value temporarily unavailable, due to optimizations>) at Python/ceval.c:3706 #4 0x00000001000b3f30 in PyEval_EvalCodeEx (co=0x102cd0be8, globals=<value temporarily unavailable, due to optimizations>, locals=<value temporarily unavailable, due to optimizations>, args=0x102b61900, argcount=5, kws=0x102b61928, kwcount=0, defs=0x102cde1a8, defcount=1, closure=0x0) at Python/ceval.c:2968 #5 0x00000001000b1f1d in fast_function [inlined] () at /Users/mb312/stable_trees/Python-2.6.4/Python/ceval.c:3802 #6 0x00000001000b1f1d in PyEval_EvalFrameEx (f=0x102b61720, throwflag=<value temporarily unavailable, due to optimizations>) at Python/ceval.c:3727 #7 0x00000001000b3f30 in PyEval_EvalCodeEx (co=0x10180ceb8, globals=<value temporarily unavailable, due to optimizations>, locals=<value temporarily unavailable, due to optimizations>, args=0x102cae2a8, argcount=2, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2968 #8 0x00000001000362a5 in function_call (func=0x101839b18, arg=0x102cae290, kw=0x0) at Objects/funcobject.c:524 #9 0x0000000100006fe2 in PyObject_Call (func=0x101839b18, arg=0x102cae290, kw=0x0) at Objects/abstract.c:2492 #10 0x00000001000ae352 in PyEval_EvalFrameEx (f=0x102b61530, throwflag=<value temporarily unavailable, due to optimizations>) at Python/ceval.c:4019 #11 0x00000001000b3f30 in PyEval_EvalCodeEx (co=0x1014647b0, globals=<value temporarily unavailable, due to optimizations>, locals=<value temporarily unavailable, due to optimizations>, args=0x102b61100, argcount=2, kws=0x102b61110, kwcount=0, defs=0x0, defcount=0, closure=0x101825dc0) at Python/ceval.c:2968 #12 0x00000001000b1f1d in fast_function [inlined] () at /Users/mb312/stable_trees/Python-2.6.4/Python/ceval.c:3802 #13 0x00000001000b1f1d in PyEval_EvalFrameEx (f=0x102b60f00, throwflag=<value temporarily unavailable, due to optimizations>) at Python/ceval.c:3727 #14 0x00000001000b3f30 in PyEval_EvalCodeEx (co=0x102c90288, globals=<value temporarily unavailable, due to optimizations>, locals=<value temporarily unavailable, due to optimizations>, args=0x102cae260, argcount=2, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2968 #15 0x00000001000362a5 in function_call (func=0x102cad1b8, arg=0x102cae248, kw=0x0) at Objects/funcobject.c:524 #16 0x0000000100006fe2 in PyObject_Call (func=0x102cad1b8, arg=0x102cae248, kw=0x0) at Objects/abstract.c:2492 #17 0x00000001000ae352 in PyEval_EvalFrameEx (f=0x102b607f0, throwflag=<value temporarily unavailable, due to optimizations>) at Python/ceval.c:4019 #18 0x00000001000b3f30 in PyEval_EvalCodeEx (co=0x1014647b0, globals=<value temporarily unavailable, due to optimizations>, locals=<value temporarily unavailable, due to optimizations>, args=0x102cae218, argcount=2, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x102c8d6e0) at Python/ceval.c:2968 #19 0x00000001000362a5 in function_call (func=0x102cad320, arg=0x102cae200, kw=0x0) at Objects/funcobject.c:524 #20 0x0000000100006fe2 in PyObject_Call (func=0x102cad320, arg=0x102cae200, kw=0x0) at Objects/abstract.c:2492 #21 0x000000010001905d in instancemethod_call (func=0x102cad320, arg=0x102cae200, kw=0x0) at Objects/classobject.c:2579 #22 0x0000000100006fe2 in PyObject_Call (func=0x102aa7fa0, arg=0x100438c90, kw=0x0) at Objects/abstract.c:2492 #23 0x000000010000a760 in call_function_tail [inlined] () at /Users/mb312/stable_trees/Python-2.6.4/Objects/abstract.c:2524 #24 0x000000010000a760 in PyObject_CallMethod (o=<value temporarily unavailable, due to optimizations>, name=<value temporarily unavailable, due to optimizations>, format=0x102cfd504 "O") at Objects/abstract.c:2601 #25 0x0000000102ce5653 in -[View drawRect:] (self=0x102b50960, _cmd=<value temporarily unavailable, due to optimizations>, rect={origin = {x = 0, y = 0}, size = {width = 640, height = 480}}) at src/_macosx.m:4517 #26 0x00007fff8676afae in -[NSView _drawRect:clip:] () #27 0x00007fff86769c21 in -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] () #28 0x00007fff86769f8b in -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] () #29 0x00007fff86769f8b in -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] () #30 0x00007fff867682f3 in -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] () #31 0x00007fff86767e17 in -[NSThemeFrame _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] () #32 0x00007fff867646bf in -[NSView _displayRectIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:] () #33 0x00007fff866ddf37 in -[NSView displayIfNeeded] () #34 0x00007fff866a5f87 in -[NSWindow _reallyDoOrderWindow:relativeTo:findKey:forCounter:force:isModal:] () #35 0x00007fff866a5b1c in -[NSWindow orderWindow:relativeTo:] () #36 0x00007fff866a349e in -[NSWindow makeKeyAndOrderFront:] () #37 0x0000000102ce490e in FigureManager_init (self=0x102d30908, args=<value temporarily unavailable, due to optimizations>, kwds=<value temporarily unavailable, due to optimizations>) at src/_macosx.m:3338 #38 0x000000010006533c in wrap_init (self=<value temporarily unavailable, due to optimizations>, args=<value temporarily unavailable, due to optimizations>, wrapped=<value temporarily unavailable, due to optimizations>, kwds=<value temporarily unavailable, due to optimizations>) at Objects/typeobject.c:4694 #39 0x0000000100006fe2 in PyObject_Call (func=0x102cde6d0, arg=0x102cae1b8, kw=0x0) at Objects/abstract.c:2492 #40 0x00000001000ab047 in PyEval_CallObjectWithKeywords (func=0x102cde6d0, arg=0x102cae1b8, kw=0x0) at Python/ceval.c:3575 #41 0x0000000100024164 in wrapperdescr_call (descr=<value temporarily unavailable, due to optimizations>, args=0x102cae1b8, kwds=0x0) at Objects/descrobject.c:304 #42 0x0000000100006fe2 in PyObject_Call (func=0x102cbecd0, arg=0x102c72b40, kw=0x0) at Objects/abstract.c:2492 #43 0x00000001000af47e in do_call [inlined] () at /Users/mb312/stable_trees/Python-2.6.4/Python/ceval.c:3924 #44 0x00000001000af47e in call_function [inlined] () at /Users/mb312/stable_trees/Python-2.6.4/Python/ceval.c:3729 #45 0x00000001000af47e in PyEval_EvalFrameEx (f=0x102b56400, throwflag=<value temporarily unavailable, due to optimizations>) at Python/ceval.c:2389 #46 0x00000001000b3f30 in PyEval_EvalCodeEx (co=0x102cd5f30, globals=<value temporarily unavailable, due to optimizations>, locals=<value temporarily unavailable, due to optimizations>, args=0x3, argcount=3, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2968 #47 0x00000001000362a5 in function_call (func=0x102cdfc80, arg=0x1002a4910, kw=0x0) at Objects/funcobject.c:524 #48 0x0000000100006fe2 in PyObject_Call (func=0x102cdfc80, arg=0x1002a4910, kw=0x0) at Objects/abstract.c:2492 #49 0x000000010001905d in instancemethod_call (func=0x102cdfc80, arg=0x1002a4910, kw=0x0) at Objects/classobject.c:2579 #50 0x0000000100006fe2 in PyObject_Call (func=0x102aa7e60, arg=0x102c84128, kw=0x0) at Objects/abstract.c:2492 #51 0x000000010006bf18 in slot_tp_init (self=<value temporarily unavailable, due to optimizations>, args=0x102c84128, kwds=0x0) at Objects/typeobject.c:5638 #52 0x0000000100068b65 in type_call (type=0x102b44b30, args=0x102c84128, kwds=0x0) at Objects/typeobject.c:745 #53 0x0000000100006fe2 in PyObject_Call (func=0x102b44b30, arg=0x102c84128, kw=0x0) at Objects/abstract.c:2492 #54 0x00000001000af47e in do_call [inlined] () at /Users/mb312/stable_trees/Python-2.6.4/Python/ceval.c:3924 #55 0x00000001000af47e in call_function [inlined] () at /Users/mb312/stable_trees/Python-2.6.4/Python/ceval.c:3729 #56 0x00000001000af47e in PyEval_EvalFrameEx (f=0x102b3d120, throwflag=<value temporarily unavailable, due to optimizations>) at Python/ceval.c:2389 #57 0x00000001000b3f30 in PyEval_EvalCodeEx (co=0x102cd5738, globals=<value temporarily unavailable, due to optimizations>, locals=<value temporarily unavailable, due to optimizations>, args=0x102cce848, argcount=1, kws=0x102b48370, kwcount=6, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2968 #58 0x00000001000363ad in function_call (func=0x102cdf6e0, arg=0x100421450, kw=0x101526720) at Objects/funcobject.c:524 #59 0x0000000100006fe2 in PyObject_Call (func=0x102cdf6e0, arg=0x100421450, kw=0x101526720) at Objects/abstract.c:2492 #60 0x00000001000ae352 in PyEval_EvalFrameEx (f=0x101526a60, throwflag=<value temporarily unavailable, due to optimizations>) at Python/ceval.c:4019 #61 0x00000001000b3f30 in PyEval_EvalCodeEx (co=0x102cb5a08, globals=<value temporarily unavailable, due to optimizations>, locals=<value temporarily unavailable, due to optimizations>, args=0x8, argcount=0, kws=0x102b48188, kwcount=0, defs=0x102ccea08, defcount=7, closure=0x0) at Python/ceval.c:2968 #62 0x00000001000b1f1d in fast_function [inlined] () at /Users/mb312/stable_trees/Python-2.6.4/Python/ceval.c:3802 #63 0x00000001000b1f1d in PyEval_EvalFrameEx (f=0x102b48000, throwflag=<value temporarily unavailable, due to optimizations>) at Python/ceval.c:3727 #64 0x00000001000b237a in PyEval_EvalFrameEx (f=0x100357cf0, throwflag=<value temporarily unavailable, due to optimizations>) at Python/ceval.c:3792 #65 0x00000001000b3f30 in PyEval_EvalCodeEx (co=0x102cb84e0, globals=<value temporarily unavailable, due to optimizations>, locals=<value temporarily unavailable, due to optimizations>, args=0x10035a950, argcount=0, kws=0x10035a950, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2968 #66 0x00000001000b1f1d in fast_function [inlined] () at /Users/mb312/stable_trees/Python-2.6.4/Python/ceval.c:3802 #67 0x00000001000b1f1d in PyEval_EvalFrameEx (f=0x10035a7a0, throwflag=<value temporarily unavailable, due to optimizations>) at Python/ceval.c:3727 #68 0x00000001000b3f30 in PyEval_EvalCodeEx (co=0x102cc4738, globals=<value temporarily unavailable, due to optimizations>, locals=<value temporarily unavailable, due to optimizations>, args=0x102cc0c30, argcount=2, kws=0x100359160, kwcount=1, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2968 #69 0x00000001000b1f1d in fast_function [inlined] () at /Users/mb312/stable_trees/Python-2.6.4/Python/ceval.c:3802 #70 0x00000001000b1f1d in PyEval_EvalFrameEx (f=0x100358fd0, throwflag=<value temporarily unavailable, due to optimizations>) at Python/ceval.c:3727 #71 0x00000001000b3f30 in PyEval_EvalCodeEx (co=0x100426f30, globals=<value temporarily unavailable, due to optimizations>, locals=<value temporarily unavailable, due to optimizations>, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2968 #72 0x00000001000b4016 in PyEval_EvalCode (co=<value temporarily unavailable, due to optimizations>, globals=<value temporarily unavailable, due to optimizations>, locals=<value temporarily unavailable, due to optimizations>) at Python/ceval.c:522 #73 0x00000001000d8a5e in run_mod [inlined] () at /Users/mb312/stable_trees/Python-2.6.4/Python/pythonrun.c:1335 #74 0x00000001000d8a5e in PyRun_FileExFlags (fp=0x7fff7092be80, filename=0x7fff5fbfe17a "scipybuild/matplotlib/examples/pylab_examples/simple_plot.py", start=<value temporarily unavailable, due to optimizations>, globals=0x100312ec0, locals=0x100312ec0, closeit=1, flags=0x7fff5fbfdfb0) at Python/pythonrun.c:1321 #75 0x00000001000d8d19 in PyRun_SimpleFileExFlags (fp=0x7fff7092be80, filename=0x7fff5fbfe17a "scipybuild/matplotlib/examples/pylab_examples/simple_plot.py", closeit=1, flags=0x7fff5fbfdfb0) at Python/pythonrun.c:931 #76 0x00000001000e835c in Py_Main (argc=2523360, argv=0x7fff5fbfe010) at Modules/main.c:599 #77 0x0000000100001544 in start () Current language: auto; currently c++ Mathew
Do you get the segmentation fault also with other backends (e.g. Tkagg) or only with the MacOSX backend? --Michiel. --- On Sun, 11/29/09, Matthew Brett <mat...@gm...> wrote: > From: Matthew Brett <mat...@gm...> > Subject: Re: [matplotlib-devel] Segmentation fault from fresh OSX snow leopard build > To: mat...@li... > Date: Sunday, November 29, 2009, 1:26 PM > On Sun, Nov 29, 2009 at 9:49 AM, > Jouni K. Seppänen <jk...@ik...> wrote: > > Matthew Brett <mat...@gm...> > > writes: > > > >>> Can you get a backtrace in gdb? > >> > >> Program received signal EXC_BAD_ACCESS, Could not > access memory. > >> Reason: 13 at address: 0x0000000000000000 > >> 0x0000000102d96ffb in > py_to_agg_transformation_matrix > >> (obj=0x102d794d0, errors=false) at > src/agg_py_transforms.cpp:21 > >> 21 matrix = (PyArrayObject*) > PyArray_FromObject(obj, > >> PyArray_DOUBLE, 2, 2); > > > > Can you type "bt" in gdb at this point to see the > whole call stack? > > Sorry - yes - here: > > Program received signal EXC_BAD_ACCESS, Could not access > memory. > Reason: 13 at address: 0x0000000000000000 > 0x0000000102cf703b in py_to_agg_transformation_matrix > (obj=0x102cde590, errors=false) at > src/agg_py_transforms.cpp:21 > 21 matrix = > (PyArrayObject*) PyArray_FromObject(obj, > PyArray_DOUBLE, 2, 2); > (gdb) bt > #0 0x0000000102cf703b in > py_to_agg_transformation_matrix > (obj=0x102cde590, errors=false) at > src/agg_py_transforms.cpp:21 > #1 0x0000000102cf762c in get_path_iterator > (path=0x102cde710, > trans=<value temporarily unavailable, due to > optimizations>, > remove_nans=1, do_clip=0, rect=0x7fff5fbf9480, > quantize_mode=QUANTIZE_AUTO, do_simplify=1) at > src/path_cleanup.cpp:58 > #2 0x0000000102ce9e90 in GraphicsContext_draw_path > (self=0x102cd19d0, > args=<value temporarily unavailable, due to > optimizations>) at > src/_macosx.m:881 > #3 0x00000001000b31d8 in PyEval_EvalFrameEx > (f=0x102b65f50, > throwflag=<value temporarily unavailable, due to > optimizations>) at > Python/ceval.c:3706 > #4 0x00000001000b3f30 in PyEval_EvalCodeEx > (co=0x102cd0be8, > globals=<value temporarily unavailable, due to > optimizations>, > locals=<value temporarily unavailable, due to > optimizations>, > args=0x102b61900, argcount=5, kws=0x102b61928, kwcount=0, > defs=0x102cde1a8, defcount=1, closure=0x0) at > Python/ceval.c:2968 > #5 0x00000001000b1f1d in fast_function [inlined] () > at > /Users/mb312/stable_trees/Python-2.6.4/Python/ceval.c:3802 > #6 0x00000001000b1f1d in PyEval_EvalFrameEx > (f=0x102b61720, > throwflag=<value temporarily unavailable, due to > optimizations>) at > Python/ceval.c:3727 > #7 0x00000001000b3f30 in PyEval_EvalCodeEx > (co=0x10180ceb8, > globals=<value temporarily unavailable, due to > optimizations>, > locals=<value temporarily unavailable, due to > optimizations>, > args=0x102cae2a8, argcount=2, kws=0x0, kwcount=0, > defs=0x0, > defcount=0, closure=0x0) at Python/ceval.c:2968 > #8 0x00000001000362a5 in function_call > (func=0x101839b18, > arg=0x102cae290, kw=0x0) at Objects/funcobject.c:524 > #9 0x0000000100006fe2 in PyObject_Call > (func=0x101839b18, > arg=0x102cae290, kw=0x0) at Objects/abstract.c:2492 > #10 0x00000001000ae352 in PyEval_EvalFrameEx > (f=0x102b61530, > throwflag=<value temporarily unavailable, due to > optimizations>) at > Python/ceval.c:4019 > #11 0x00000001000b3f30 in PyEval_EvalCodeEx > (co=0x1014647b0, > globals=<value temporarily unavailable, due to > optimizations>, > locals=<value temporarily unavailable, due to > optimizations>, > args=0x102b61100, argcount=2, kws=0x102b61110, kwcount=0, > defs=0x0, > defcount=0, closure=0x101825dc0) at Python/ceval.c:2968 > #12 0x00000001000b1f1d in fast_function [inlined] () at > /Users/mb312/stable_trees/Python-2.6.4/Python/ceval.c:3802 > #13 0x00000001000b1f1d in PyEval_EvalFrameEx > (f=0x102b60f00, > throwflag=<value temporarily unavailable, due to > optimizations>) at > Python/ceval.c:3727 > #14 0x00000001000b3f30 in PyEval_EvalCodeEx > (co=0x102c90288, > globals=<value temporarily unavailable, due to > optimizations>, > locals=<value temporarily unavailable, due to > optimizations>, > args=0x102cae260, argcount=2, kws=0x0, kwcount=0, > defs=0x0, > defcount=0, closure=0x0) at Python/ceval.c:2968 > #15 0x00000001000362a5 in function_call (func=0x102cad1b8, > arg=0x102cae248, kw=0x0) at Objects/funcobject.c:524 > #16 0x0000000100006fe2 in PyObject_Call (func=0x102cad1b8, > arg=0x102cae248, kw=0x0) at Objects/abstract.c:2492 > #17 0x00000001000ae352 in PyEval_EvalFrameEx > (f=0x102b607f0, > throwflag=<value temporarily unavailable, due to > optimizations>) at > Python/ceval.c:4019 > #18 0x00000001000b3f30 in PyEval_EvalCodeEx > (co=0x1014647b0, > globals=<value temporarily unavailable, due to > optimizations>, > locals=<value temporarily unavailable, due to > optimizations>, > args=0x102cae218, argcount=2, kws=0x0, kwcount=0, > defs=0x0, > defcount=0, closure=0x102c8d6e0) at Python/ceval.c:2968 > #19 0x00000001000362a5 in function_call (func=0x102cad320, > arg=0x102cae200, kw=0x0) at Objects/funcobject.c:524 > #20 0x0000000100006fe2 in PyObject_Call (func=0x102cad320, > arg=0x102cae200, kw=0x0) at Objects/abstract.c:2492 > #21 0x000000010001905d in instancemethod_call > (func=0x102cad320, > arg=0x102cae200, kw=0x0) at Objects/classobject.c:2579 > #22 0x0000000100006fe2 in PyObject_Call (func=0x102aa7fa0, > arg=0x100438c90, kw=0x0) at Objects/abstract.c:2492 > #23 0x000000010000a760 in call_function_tail [inlined] () > at > /Users/mb312/stable_trees/Python-2.6.4/Objects/abstract.c:2524 > #24 0x000000010000a760 in PyObject_CallMethod (o=<value > temporarily > unavailable, due to optimizations>, name=<value > temporarily > unavailable, due to optimizations>, format=0x102cfd504 > "O") at > Objects/abstract.c:2601 > #25 0x0000000102ce5653 in -[View drawRect:] > (self=0x102b50960, > _cmd=<value temporarily unavailable, due to > optimizations>, > rect={origin = {x = 0, y = 0}, size = {width = 640, height > = 480}}) at > src/_macosx.m:4517 > #26 0x00007fff8676afae in -[NSView _drawRect:clip:] () > #27 0x00007fff86769c21 in -[NSView > _recursiveDisplayAllDirtyWithLockFocus:visRect:] () > #28 0x00007fff86769f8b in -[NSView > _recursiveDisplayAllDirtyWithLockFocus:visRect:] () > #29 0x00007fff86769f8b in -[NSView > _recursiveDisplayAllDirtyWithLockFocus:visRect:] () > #30 0x00007fff867682f3 in -[NSView > _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] > () > #31 0x00007fff86767e17 in -[NSThemeFrame > _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] > () > #32 0x00007fff867646bf in -[NSView > _displayRectIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:] > () > #33 0x00007fff866ddf37 in -[NSView displayIfNeeded] () > #34 0x00007fff866a5f87 in -[NSWindow > _reallyDoOrderWindow:relativeTo:findKey:forCounter:force:isModal:] > () > #35 0x00007fff866a5b1c in -[NSWindow > orderWindow:relativeTo:] () > #36 0x00007fff866a349e in -[NSWindow makeKeyAndOrderFront:] > () > #37 0x0000000102ce490e in FigureManager_init > (self=0x102d30908, > args=<value temporarily unavailable, due to > optimizations>, > kwds=<value temporarily unavailable, due to > optimizations>) at > src/_macosx.m:3338 > #38 0x000000010006533c in wrap_init (self=<value > temporarily > unavailable, due to optimizations>, args=<value > temporarily > unavailable, due to optimizations>, wrapped=<value > temporarily > unavailable, due to optimizations>, kwds=<value > temporarily > unavailable, due to optimizations>) at > Objects/typeobject.c:4694 > #39 0x0000000100006fe2 in PyObject_Call (func=0x102cde6d0, > arg=0x102cae1b8, kw=0x0) at Objects/abstract.c:2492 > #40 0x00000001000ab047 in PyEval_CallObjectWithKeywords > (func=0x102cde6d0, arg=0x102cae1b8, kw=0x0) at > Python/ceval.c:3575 > #41 0x0000000100024164 in wrapperdescr_call > (descr=<value temporarily > unavailable, due to optimizations>, args=0x102cae1b8, > kwds=0x0) at > Objects/descrobject.c:304 > #42 0x0000000100006fe2 in PyObject_Call (func=0x102cbecd0, > arg=0x102c72b40, kw=0x0) at Objects/abstract.c:2492 > #43 0x00000001000af47e in do_call [inlined] () at > /Users/mb312/stable_trees/Python-2.6.4/Python/ceval.c:3924 > #44 0x00000001000af47e in call_function [inlined] () at > /Users/mb312/stable_trees/Python-2.6.4/Python/ceval.c:3729 > #45 0x00000001000af47e in PyEval_EvalFrameEx > (f=0x102b56400, > throwflag=<value temporarily unavailable, due to > optimizations>) at > Python/ceval.c:2389 > #46 0x00000001000b3f30 in PyEval_EvalCodeEx > (co=0x102cd5f30, > globals=<value temporarily unavailable, due to > optimizations>, > locals=<value temporarily unavailable, due to > optimizations>, > args=0x3, argcount=3, kws=0x0, kwcount=0, defs=0x0, > defcount=0, > closure=0x0) at Python/ceval.c:2968 > #47 0x00000001000362a5 in function_call (func=0x102cdfc80, > arg=0x1002a4910, kw=0x0) at Objects/funcobject.c:524 > #48 0x0000000100006fe2 in PyObject_Call (func=0x102cdfc80, > arg=0x1002a4910, kw=0x0) at Objects/abstract.c:2492 > #49 0x000000010001905d in instancemethod_call > (func=0x102cdfc80, > arg=0x1002a4910, kw=0x0) at Objects/classobject.c:2579 > #50 0x0000000100006fe2 in PyObject_Call (func=0x102aa7e60, > arg=0x102c84128, kw=0x0) at Objects/abstract.c:2492 > #51 0x000000010006bf18 in slot_tp_init (self=<value > temporarily > unavailable, due to optimizations>, args=0x102c84128, > kwds=0x0) at > Objects/typeobject.c:5638 > #52 0x0000000100068b65 in type_call (type=0x102b44b30, > args=0x102c84128, kwds=0x0) at Objects/typeobject.c:745 > #53 0x0000000100006fe2 in PyObject_Call (func=0x102b44b30, > arg=0x102c84128, kw=0x0) at Objects/abstract.c:2492 > #54 0x00000001000af47e in do_call [inlined] () at > /Users/mb312/stable_trees/Python-2.6.4/Python/ceval.c:3924 > #55 0x00000001000af47e in call_function [inlined] () at > /Users/mb312/stable_trees/Python-2.6.4/Python/ceval.c:3729 > #56 0x00000001000af47e in PyEval_EvalFrameEx > (f=0x102b3d120, > throwflag=<value temporarily unavailable, due to > optimizations>) at > Python/ceval.c:2389 > #57 0x00000001000b3f30 in PyEval_EvalCodeEx > (co=0x102cd5738, > globals=<value temporarily unavailable, due to > optimizations>, > locals=<value temporarily unavailable, due to > optimizations>, > args=0x102cce848, argcount=1, kws=0x102b48370, kwcount=6, > defs=0x0, > defcount=0, closure=0x0) at Python/ceval.c:2968 > #58 0x00000001000363ad in function_call (func=0x102cdf6e0, > arg=0x100421450, kw=0x101526720) at > Objects/funcobject.c:524 > #59 0x0000000100006fe2 in PyObject_Call (func=0x102cdf6e0, > arg=0x100421450, kw=0x101526720) at > Objects/abstract.c:2492 > #60 0x00000001000ae352 in PyEval_EvalFrameEx > (f=0x101526a60, > throwflag=<value temporarily unavailable, due to > optimizations>) at > Python/ceval.c:4019 > #61 0x00000001000b3f30 in PyEval_EvalCodeEx > (co=0x102cb5a08, > globals=<value temporarily unavailable, due to > optimizations>, > locals=<value temporarily unavailable, due to > optimizations>, > args=0x8, argcount=0, kws=0x102b48188, kwcount=0, > defs=0x102ccea08, > defcount=7, closure=0x0) at Python/ceval.c:2968 > #62 0x00000001000b1f1d in fast_function [inlined] () at > /Users/mb312/stable_trees/Python-2.6.4/Python/ceval.c:3802 > #63 0x00000001000b1f1d in PyEval_EvalFrameEx > (f=0x102b48000, > throwflag=<value temporarily unavailable, due to > optimizations>) at > Python/ceval.c:3727 > #64 0x00000001000b237a in PyEval_EvalFrameEx > (f=0x100357cf0, > throwflag=<value temporarily unavailable, due to > optimizations>) at > Python/ceval.c:3792 > #65 0x00000001000b3f30 in PyEval_EvalCodeEx > (co=0x102cb84e0, > globals=<value temporarily unavailable, due to > optimizations>, > locals=<value temporarily unavailable, due to > optimizations>, > args=0x10035a950, argcount=0, kws=0x10035a950, kwcount=0, > defs=0x0, > defcount=0, closure=0x0) at Python/ceval.c:2968 > #66 0x00000001000b1f1d in fast_function [inlined] () at > /Users/mb312/stable_trees/Python-2.6.4/Python/ceval.c:3802 > #67 0x00000001000b1f1d in PyEval_EvalFrameEx > (f=0x10035a7a0, > throwflag=<value temporarily unavailable, due to > optimizations>) at > Python/ceval.c:3727 > #68 0x00000001000b3f30 in PyEval_EvalCodeEx > (co=0x102cc4738, > globals=<value temporarily unavailable, due to > optimizations>, > locals=<value temporarily unavailable, due to > optimizations>, > args=0x102cc0c30, argcount=2, kws=0x100359160, kwcount=1, > defs=0x0, > defcount=0, closure=0x0) at Python/ceval.c:2968 > #69 0x00000001000b1f1d in fast_function [inlined] () at > /Users/mb312/stable_trees/Python-2.6.4/Python/ceval.c:3802 > #70 0x00000001000b1f1d in PyEval_EvalFrameEx > (f=0x100358fd0, > throwflag=<value temporarily unavailable, due to > optimizations>) at > Python/ceval.c:3727 > #71 0x00000001000b3f30 in PyEval_EvalCodeEx > (co=0x100426f30, > globals=<value temporarily unavailable, due to > optimizations>, > locals=<value temporarily unavailable, due to > optimizations>, > args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, > defcount=0, > closure=0x0) at Python/ceval.c:2968 > #72 0x00000001000b4016 in PyEval_EvalCode (co=<value > temporarily > unavailable, due to optimizations>, globals=<value > temporarily > unavailable, due to optimizations>, locals=<value > temporarily > unavailable, due to optimizations>) at > Python/ceval.c:522 > #73 0x00000001000d8a5e in run_mod [inlined] () at > /Users/mb312/stable_trees/Python-2.6.4/Python/pythonrun.c:1335 > #74 0x00000001000d8a5e in PyRun_FileExFlags > (fp=0x7fff7092be80, > filename=0x7fff5fbfe17a > "scipybuild/matplotlib/examples/pylab_examples/simple_plot.py", > start=<value temporarily unavailable, due to > optimizations>, > globals=0x100312ec0, locals=0x100312ec0, closeit=1, > flags=0x7fff5fbfdfb0) at Python/pythonrun.c:1321 > #75 0x00000001000d8d19 in PyRun_SimpleFileExFlags > (fp=0x7fff7092be80, > filename=0x7fff5fbfe17a > "scipybuild/matplotlib/examples/pylab_examples/simple_plot.py", > closeit=1, flags=0x7fff5fbfdfb0) at Python/pythonrun.c:931 > #76 0x00000001000e835c in Py_Main (argc=2523360, > argv=0x7fff5fbfe010) > at Modules/main.c:599 > #77 0x0000000100001544 in start () > Current language: auto; currently c++ > > > Mathew > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal > Reports 2008 30-Day > trial. Simplify your report design, integration and > deployment - and focus on > what you do best, core application coding. Discover what's > new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Matplotlib-devel mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-devel >
Hi, I've been having an almost identical problem with described above with the MacOSX backend. When I switched to the TkAgg backend, the segfault occurs when I try pylab.close() instead. Do you get the segmentation fault also with other backends (e.g. Tkagg) or only with the MacOSX backend? -- View this message in context: http://old.nabble.com/Segmentation-fault-from-fresh-OSX-snow-leopard-build-tp26560316p26575340.html Sent from the matplotlib - devel mailing list archive at Nabble.com.
On Nov 30, 2009, at 9:09 AM, Jcmottram wrote: > > Hi, > I've been having an almost identical problem with described above with > the MacOSX backend. When I switched to the TkAgg backend, the segfault > occurs when I try pylab.close() instead. > > I may have had the same problem. Do you happen to be on a recent revision? Christoph Gohlke pointed out a typo introduced in r7985 (see bug report). The patch below fixed the segfaults on my system. Best, -Tony Index: setupext.py =================================================================== --- setupext.py (revision 7987) +++ setupext.py (working copy) @@ -122,7 +122,7 @@ 'backend': None} defines = [ - ('PY_ARRAYAUNIQUE_SYMBOL', 'MPL_ARRAY_API'), + ('PY_ARRAY_UNIQUE_SYMBOL', 'MPL_ARRAY_API'), ('PYCXX_ISO_CPP_LIB', '1')] # Based on the contents of setup.cfg, determine the build options
Hi, >> I've been having an almost identical problem with described above with >> the MacOSX backend. When I switched to the TkAgg backend, the segfault >> occurs when I try pylab.close() instead. >> > I may have had the same problem. Do you happen to be on a recent revision? > > Christoph Gohlke pointed out a typo introduced in r7985 (see bug report). The patch below fixed the segfaults on my system. Yes - thanks - segfault gone for me... Cheers, Matthew