#52 Plugin crashes on re-activation

v0.2
open
None
5
2009-02-08
2009-02-08
Michael Zeising
No

A strange problem appears if I "activate then deactivate then activate"
the plugin, the backtrace is the following:

$ gedit
Traceback (most recent call last):
File "/usr/lib/gedit-2/plugins/GeditLaTeXPlugin/src/__init__.py", line
89, in activate
self._window_decorators[window] = GeditWindowDecorator(window)
File "/usr/lib/gedit-2/plugins/GeditLaTeXPlugin/src/base/decorators.py",
line 79, in __init__
self._init_actions()
File "/usr/lib/gedit-2/plugins/GeditLaTeXPlugin/src/base/decorators.py",
line 157, in _init_actions
self._ui_id = self._ui_manager.add_ui_from_string(UI)
glib.GError: Tag iniziale «toolitem» non atteso alla riga 66, carattere 1
Traceback (most recent call last):
File "/usr/lib/gedit-2/plugins/GeditLaTeXPlugin/src/__init__.py", line
98, in deactivate
self._window_decorators[window].destroy()
KeyError: <gedit.Window object at 0x9947f54 (GeditWindow at 0x9256008)>

The moves to repeat the behavior are:
- install the plugin
- open gedit
- open the preferences->plugins dialog.
- activate GeditLaTeXPlugin
- deactivate GeditLaTeXPlugin
- activate again GeditLaTeXPlugin

Discussion