Faulty plugins render Kupfer unusable
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
kupfer |
Confirmed
|
Wishlist
|
Unassigned |
Bug Description
Kupfer does not handle plugin failure well at all.
When a plugin internally fails at some aspect of the defined plugin interface, Kupfer punts completely out of whatever it was doing.
This is most noticeable when first going to type in an action into Kupfer: if one of the plugins throws an exception in, say, get_items, Kupfer will just sit there. On the terminal it provides a python exception dump, but in the GUI it will simply "not respond" to the keypress.
This is bad for a few reasons:
1. A plugin should not be able to stop Kupfer from functioning. Kupfer should catch the error earlier and either unload the plugin (I know this is not implemented yet) or at least skip/ignore/remove the plugin's data.
2. If not that, an error that is stopping the proper function of kupfer should give visual feedback. Maybe display an 'error' meta-object, or display some text in the window, or pop up a dialog (preferably not the last one). Some sort feedback is required, since Kupfer still responds to keybindings--having it work in one way but not react at all in another can be baffling to a user.
3. The faulty plugin should be flagged in some way. Maybe put a tick or (!) sign next to it in the preferences screen; some way to tell the user that the plugin is failing. Make all traces accessible from that interface. Users should not have to run Kupfer in a terminal to know that the database a plugin is trying to read from is corrupt, nor should they be unable to access the trace of a transient error (say, they had the error once and had no idea how to reproduce when they run kupfer again in the terminal).
Here's an example traceback that I am having that is stopping me from using the program:
Traceback (most recent call last):
File "/usr/share/
decorator=
File "/usr/share/
items = item_check(
File "/usr/share/
return sort_func(
File "/usr/share/
it = S.get_leaves()
File "/usr/share/
leaves = Source.
File "/usr/share/
datatools.
File "/usr/share/
seq = seq if isinstance(seq, list) else list(seq)
File "/usr/share/
for addrbook_file in self._load_
File "/usr/share/
dtree = minidom.
File "/usr/lib/
return expatbuilder.
File "/usr/lib/
result = builder.
File "/usr/lib/
parser.
xml.parsers.
Upon attempting to type in the kupfer window that trace is dumped to the terminal, and my keypresses are not acknowledged at all in the kupfer window.
I had a similar issue when a custom plugin I made hit a parse error in one of its data files as well, to the same effect of having a nonresponsive Kupfer.
Side note: other than the claws plugin not catching the error, there is nothing wrong with the processing of the address book index file; rather, the latest version of claws-mail can produce invalid XML: http:// www.thewildbeas t.co.uk/ claws-mail/ bugzilla/ show_bug. cgi?id= 2208