On Sat, 6 May 2006, Jon A. Cruz wrote:
What it turns out to be is a problem with the null checking on the std::map used to store the ids. They end up with entries with null (e.g. 0) pointers for id's to be in there twice (beginning and end). "org.inkscape.dialogs.extensioneditor" didn't fail because of its dots, but because it was the last item in the table before the null.
Cool. Good catch. There is a lot of NULLs in the Verbs code that are valid values (NULL documents for actions, etc.).
I can fix the comparison function, but that leaves the main problem with two verbs being added with null IDs.
Here are the guilty parties:
/* Header */ new Verb(SP_VERB_INVALID, NULL, NULL, NULL, NULL), ... /* Footer */ new Verb(SP_VERB_LAST, NULL, NULL, NULL, NULL)
My current take on things is that once the comparator is fixed, SP_VERB_LAST will stomp over SP_VERB_INVALID. Is that fine, or should we tweak some magic "last" verb ID so that SP_VERB_INVALID will stay in there?
I don't think that we need both, and I'd question whether we need either. But, both are used throughout the code. I'd say go for removing atleast one of them.
--Ted