From: Charles M. <cm...@in...> - 2005-08-25 19:26:12
|
It must be some kind of race condition. I can easily recreate the error on agg and non-agg wx and gtk backends (don't have qt). Here is what I do to cause the error fast. plot(rand(100)) # just to have something up f = get_current_fig_manager() f.canvas<hold down tab> # the key repeat will cause rapid fire on the completion Straight Gtk periodically spits out something other than seg fault: "In [6]:f.canvas.Fatal Python error: PyEval_SaveThread: NULL tstate" Hope this helps, Charlie John Hunter wrote: >>>>>>"Fernando" == Fernando Perez <Fer...@co...> writes: > > > Fernando> Charles Moad wrote: > >> I can't seem to crash TkAgg, but WXAgg and GTKAgg still do. > >> This seems to not be related to the repr issue from before. > >> This is all mpl-cvs btw. > > Fernando> OK, I'm afraid this one may require John's help to > Fernando> debug. I don't know the mpl internals nearly well > Fernando> enough to even begin to guess where this could be coming > Fernando> from. > > Fernando> The fact that it's a segfault and not an uncaught > Fernando> exception means the bug is triggered inside C code. > Fernando> <TAB> triggers dir() and getattr() calls, which have to > Fernando> traverse the object's internal dictionary. If the > Fernando> object is implemented in C/C++, that traversal can do > Fernando> arbitrary things, including any number of > Fernando> segfault-inducing manipulations. > > The canvas object (eg FigureCanvasGTKAgg) is implemented in python. > It inherits from a gtk base class and an Agg base class. It would be > useful to test whether you get this behavior on the GTK and WX > backends (no Agg). My guess is that this is some is caused by a > threading problem, but can't be sure. This would explain why you see > it with GTKAgg and WXAgg but not TkAgg. > > JDH |