Fernando Perez wrote:
>> OK, a bit more info. It turns out that the crash happens
>> whenever the _first_ figure window is deleted with a
>> close(fignum) command. So in order to really block the
>> problem, I had to create a dummy 'sentinel' window, numbered
>> -666, for which close() is never called. It's OK to close this
>> window via the window manager by clicking on its close button,
>> but pylab.close() must NEVER be called on it. The current code
>> looks like this:
> More info, sorry about the noise. It's NOT OK to close
> the sentinel in any way whatsoever, even via the window
> manager. If this window is closed, through any
> mechanism, Tk/VTK is hosed.
Just a guess,
The problem may be arising when the backend tries to quit when the
total figure count reaches zero. The relevant backend_tkagg section
is
def destroy(self, *args):
if Gcf.get_num_fig_managers()==0 and not matplotlib.is_interactive():
if self.window is not None:
self.window.quit()
if self.window is not None:
#print 'calling window destroy'
self.window.destroy()
self.window = None
Try playing with this function and see if you can deduce where the
problem is.
JDH