Hi All, I'm trying to track down a sporadic Fatal python error in a complicated data analysis program I'm writing. Quick explanation: I have a qt gui that launches a python task-manager thread. That thread creates a multiprocessing.Pool, and iterates through a list of data in an hdf5 file, passing each item of data to Pool.apply_async. A callback takes the result and updates an entry in the hdf5 file, and appends an item to a queue. The qt gui uses a qtimer to check the queue once a second. If the queue is not empty, it reads the hdf5 file and updates an imshow image. I can click a pixel in the image, which plots the spectrum and fit associated with that pixel. I can then click a qt button to switch between lin and log scales in the spectrum plot. If the taskmanager thread is running, changing between lin and log scales can pretty reliably cause a crash (especially on Fedora 14):
python: /builddir/build/BUILD/Python-2.7/Modules/gcmodule.c:311: update_refs: Assertion `gc->gc.gc_refs != 0' failed. Aborted (core dumped) That's not a lot of information to go on, and I'm drawing on a ton of extension modules in my program: numpy, h5py, qt, matplotlib, pymca. We've also been able to get the program to crash on mac: Exception AttributeError: "'BboxTransformTo' object has no attribute 'data'" in <function remove at 0x128752410> ignored Traceback (most recent call last): File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/backends/backend_qt4agg.py", line 83, in paintEvent FigureCanvasAgg.draw(self) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/backends/backend_agg.py", line 394, in draw self.figure.draw(self.renderer) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/artist.py", line 55, in draw_wrapper draw(artist, renderer, *args, **kwargs) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/figure.py", line 798, in draw func(*args) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/artist.py", line 55, in draw_wrapper draw(artist, renderer, *args, **kwargs) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/axes.py", line 1946, in draw a.draw(renderer) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/artist.py", line 55, in draw_wrapper draw(artist, renderer, *args, **kwargs) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/legend.py", line 430, in draw self._legend_box.draw(renderer) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/offsetbox.py", line 240, in draw c.draw(renderer) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/offsetbox.py", line 240, in draw c.draw(renderer) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/offsetbox.py", line 240, in draw c.draw(renderer) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/offsetbox.py", line 239, in draw c.set_offset((px+ox, py+oy)) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/offsetbox.py", line 460, in set_offset self.offset_transform.clear() File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/transforms.py", line 1549, in clear self.invalidate() File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/transforms.py", line 124, in invalidate stack.extend(root._parents.keys()) AttributeError: 'list' object has no attribute 'keys' Fatal Python error: GC object already tracked Abort trap All access to hdf5 is protected with a thread lock, and I have made some fairly stressful scripts testing h5py/threading/multiprocessing and haven't been able to produce a crash. Does anyone have suggestions on how I can try to track down this problem? These GC reports are not giving me much to go on, how can I determine to which extension module these objects with bad reference counts belong? Thanks, and sorry for the long and obscure post. Darren ------------------------------------------------------------------------------ What Every C/C++ and Fortran developer Should Know! Read this article and learn how Intel has extended the reach of its next-generation tools to help Windows* and Linux* C/C++ and Fortran developers boost performance applications - including clusters. http://p.sf.net/sfu/intel-dev2devmay _______________________________________________ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel