I'm really not sure which mailing list to report this on -- it has got to rank up there with one of the most obscure errors of all times. I suspect it's an error in gcc's new openmp implementation, gomp, but not sure; I can report it there if people think I should.
In gcc 4.4.1, when I compile a completely empty .pyx module in (1) c++ mode and (2) pass -lgomp to the linker, simply (3) importing that empty module causes any subsequent use of matplotlib to segfault the program. Changing either (1), (2) or (3) makes the error go away. I'm using the latest 32bit ubuntu (9.10), python 2.6.4, with the latest cython-devel (2820:105c661599c9) and the latest matplotlib from svn (8097). In matplotlib, I'm using the qt4agg backend. Everything else appears to be working save for this error. If my main file is simply: import tests.emptymodule import tests.plottest where emptymodules is a completely empty cython module and plottest is from matplotlib.pylab import * figure() plot([0,1], [0,1], '-b') show() The program segfaults on the plot() call, with backtrace (gdb) bt 8 #0 0x00e03bc7 in __cxa_allocate_exception () from /usr/lib/libstdc++.so.6 #1 0x0093f282 in py_to_agg_transformation_matrix (obj=0x8223f58, errors=false) at src/agg_py_transforms.cpp:20 #2 0x00946ff3 in _path_module::update_path_extents (this=0x8856098, args=...) at src/path.cpp:346 #3 0x0094e2fd in Py::ExtensionModule<_path_module>::invoke_method_varargs (this=<value optimized out>, method_def=0x8476e00, args=...) at ./CXX/Python2/ExtensionModule.hxx:184 #4 0x0093ae26 in method_varargs_call_handler (_self_and_name_tuple=0x888448c, _args=0x8f052fc) at CXX/Python2/cxx_extensions.cxx:1714 #5 0x080dc0d0 in PyEval_EvalFrameEx () #6 0x080dddf2 in PyEval_EvalCodeEx () #7 0x080dc1b4 in PyEval_EvalFrameEx () Other commands like imshow also cause a segfault. Anyway, I can get by for now without openmp, but I'm curious if anyone has ideas about this bug. I've attached a tarball with the code that reproduces it for me; simply run build.sh and run. Thanks! -- hoyt ++++++++++++++++++++++++++++++++++++++++++++++++ + Hoyt Koepke + University of Washington Department of Statistics + http://www.stat.washington.edu/~hoytak/ + hoy...@gmail.com ++++++++++++++++++++++++++++++++++++++++++
cython-gomp-matplotlib-error.tar.bz2
Description: BZip2 compressed data
------------------------------------------------------------------------------ The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com
_______________________________________________ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel