Merge lp:~mconley/globalmenu-extension/fix-segfault-with-lightning into lp:~chrisccoulson/globalmenu-extension/trunk
Proposed by
Mike Conley
Status: | Merged |
---|---|
Merged at revision: | 76 |
Proposed branch: | lp:~mconley/globalmenu-extension/fix-segfault-with-lightning |
Merge into: | lp:~chrisccoulson/globalmenu-extension/trunk |
Diff against target: |
13 lines (+3/-0) 1 file modified
extensions/globalmenu/components/src/uGlobalMenu.cpp (+3/-0) |
To merge this branch: | bzr merge lp:~mconley/globalmenu-extension/fix-segfault-with-lightning |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Chris Coulson | Needs Information | ||
Review via email: mp+47954@code.launchpad.net |
Description of the change
While going through <menubar> nodes, the extension was only expecting menuSeperator, menuItem and the like. If it saw something it didn't expect (<observes>, for example), it'd hang.
Now, if the extension sees a tag it doesn't recognize, it just skips over it.
To post a comment you must log in.
Thanks for figuring this out.
I had a thought this morning though. Whilst this fixes the original crash, I think there is still an unsolved issue here that will manifest later on.
The way this is designed, relies on each DbusmenuMenuitem to be inserted in to it's DbusmenuMenuitem parent at the same index as it's corresponding DOM node. If we skip a node, I think everything ends up going off-by-1.
Once this has happened, I think we'll end with bits of the menu ending up in the wrong order as other menuitems are inserted, and we could end up removing the wrong menuitems (or crashing) when nodes are removed.
Does this make sense?
I'm not sure of the best way to fix that, other than creating invisible dummy nodes in the menu, just to keep everything in sync.