[matplotlib-devel] need advice on a crash report
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 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 lis
Re: [matplotlib-devel] Website needs love
On Thu, May 19, 2011 at 6:27 PM, Benjamin Root wrote: > On Mon, May 16, 2011 at 5:28 PM, Benjamin Root wrote: > >> On Monday, May 16, 2011, John Hunter wrote: >> > >> > >> > On Mon, May 16, 2011 at 2:52 PM, Eric Firing >> wrote: >> > >> > >> > >> > I had no idea this would open such a big can of worms! The strategy >> > question here is, what do we want to include in the html API docs? >> > >> > It looks like the process of setting up the sphinx API docs was never >> > completed; the present set of modules that are included ranges from the >> > fundamental (e.g. figure.py) to the peripheral (e.g. afm.py), but I >> > doubt that text.py, for example, was deliberately excluded. >> > >> > I don't see any major disadvantage to including all modules. It might >> > make sense to present them in categories, though, instead of dumping >> > them all into a single alphabetical list. >> > >> > Perhaps Mike and John will have sage advice. >> > >> > >> > Not all of the doc strings have been converted to rest. Back when I was >> actively working on the docs, I would add a module to the API table of >> contents when I had at least done a first pass at converting the docs to >> rest. This isn't a requirement, but it helps explain why some modules and >> not others are in the list. >> > >> >> Well, I will take a look at what is currently converted and see if any >> of those can get added. >> >> Ben Root >> > > Ok, on my pull request, I have made a number of commits. In particular, I > have ReST-ified widgets.py (although there are still some more things to do > in it). I have added a widgets api file to the api docs, and also renamed > the headers for each api file so that the "matplotlib" part didn't show up > repeatedly in the ToC. > > There are still plenty of odds and ends that can be done. I want to clean > up the examples page so that the "matplotlib: " string doesn't show up for > every entry as well. Furthermore, the widgets module has some docstrings > that seems like the author got distracted halfway through writing it and > never came back. I marked those docstrings with FIXME comments. > > Let me know what you all think! > > Ben Root > > I have made a few more small changes, and I have an additional change that I have not committed yet. The table of contents for the examples page has every single example titled as something like "animation example code:". This is repeatitive and distracting. In the same spirit of removing "matplotlib" from the titles of the api subsections, I wanted to do the same here. I figured out how to do that without changing the actual titles of the subsections. So, my question is, do we want that? If so, I can push up the change to my pull request. I still have to do some merge work apparently, but otherwise, I think I am done with the major changes to the v1.0.x docs. Is there anything else we want to fix before I merge this pull request? Some other ideas I have had is to include a link to the glossary page in the page header next to "docs", and maybe the FAQ, as well? I also want to expand the glossary page, and comb through the docstrings to incorporate more ":term:" usage. However, I probably want to hold off on those ideas for the master branch. Let me know what you all think of the docs! Ben Root -- 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
Re: [matplotlib-devel] Website needs love
On 05/20/2011 11:48 AM, Benjamin Root wrote: > > > I have made a few more small changes, and I have an additional change > that I have not committed yet. The table of contents for the examples > page has every single example titled as something like "animation > example code:". This is repeatitive and distracting. In the same > spirit of removing "matplotlib" from the titles of the api subsections, > I wanted to do the same here. I figured out how to do that without > changing the actual titles of the subsections. > > So, my question is, do we want that? If so, I can push up the change to Yes! > my pull request. I still have to do some merge work apparently, but > otherwise, I think I am done with the major changes to the v1.0.x docs. > Is there anything else we want to fix before I merge this pull request? Sounds to me like this is a good time to merge it. > > Some other ideas I have had is to include a link to the glossary page in > the page header next to "docs", and maybe the FAQ, as well? I also want Glossary? I didn't even know there was one, so putting in a prominent link to it sounds like a good idea. I think that putting a FAQ link up front is also a good idea; maybe it will help remind us to keep expanding the FAQ when we keep seeing the same question on the mailing list. > to expand the glossary page, and comb through the docstrings to > incorporate more ":term:" usage. However, I probably want to hold off > on those ideas for the master branch. > > Let me know what you all think of the docs! I have not yet tried to build from your branch, but based on descriptions and discussions, it should be a substantial improvement. Go ahead and push when you feel ready. Thank you for all the work. Eric > Ben Root > -- 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
Re: [matplotlib-devel] Website needs love
On 05/20/2011 11:48 AM, Benjamin Root wrote: > Some other ideas I have had is to include a link to the glossary page in > the page header next to "docs", and maybe the FAQ, as well? I also want > to expand the glossary page, and comb through the docstrings to > incorporate more ":term:" usage. However, I probably want to hold off > on those ideas for the master branch. Ben, There is a tradeoff involved in adding more directives like ":term:" (which I was not even aware of): they make the html more clickable but they clutter the plain text. Even for html, having too many links can be distracting and reduce readability. So, use with caution. If it is easy to find the glossary, then I am not sure there is any net advantage in using "term" directives. Eric -- 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