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?

John

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