You do not own this lock

I have a pygtk application which uses matplotlib for graphics. The
application maintains one or more matplotlib.FigureCanvasGTKAgg objects
and correspondig matplotlib.figure.Figure objects, and switches between
them as needed. My problem is that after switching from one
canvas/figure pair to another, the navigation toolbar sometimes loses
the ability to switch out of pan/zoom mode, and pick events fail. I get
tracebacks like those shown below. Can anyone tell me what "You do not
own this lock" means? Or why the axes is trying to delete a property
that doesn't exist?


Traceback (most recent call last):
"/usr/lib/pymodules/python2.6/matplotlib/backends/", line
216, in button_release_event
    FigureCanvasBase.button_release_event(self, x, y, event.button,
  File "/usr/lib/pymodules/python2.6/matplotlib/", line
1219, in button_release_event
    self.callbacks.process(s, event)
  File "/usr/lib/pymodules/python2.6/matplotlib/", line 165, in
    func(*args, **kwargs)
  File "/usr/lib/pymodules/python2.6/matplotlib/", line
2016, in release_pan
  File "/usr/lib/pymodules/python2.6/matplotlib/", line 2458, in
    del self._pan_start
AttributeError: _pan_start
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.6/matplotlib/", line
1929, in pan
  File "/usr/lib/pymodules/python2.6/matplotlib/", line 37, in
    raise ValueError('you do not own this lock')
ValueError: you do not own this lock