Closed Bug 530169 Opened 16 years ago Closed 16 years ago

Jetpack 0.6.2 seems to have strange interactions with add-ons that add toolbars and toolbar buttons

Categories

(Mozilla Labs :: Jetpack Prototype, defect, P1)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: osunick, Assigned: adw)

References

Details

Attachments

(1 file)

I've noticed that occasionally my toolbars and toolbar buttons from the Delicious Bookmarks extension and Destroy The Web extension disappear and removing Jetpack seems to fix the issue. Perhaps unrelated but it's worth investigating whether or not the latest jetpack builds can affect normal add-ons in this way.
Confirmed (at least in my Firefox), when you disable jetpack the delicious, adblockplus and clear cache buttons reappears in toolbar.
For me the problem goes away after I restart firefox the second time. To duplicate this problem, disable jetpack, restart, enable jetpack again, restart and all the tools & menus disappear. Restart again and everything is fine again. When I restart the first time with jetpack enabled, the console says "nsHeaderInfo: registerSelf called!" twice. In menu.js the function called... makeMenubarMenus_setupPopup() If I put a "return" before the below line, the problem goes away... let popup = doc.getElementById(v[0]); But if I put a return after this line, I can duplicate the problem. Don't know why a simple getElementById could cause things to disappear.
(In reply to comment #2) > In menu.js the function called... > makeMenubarMenus_setupPopup() > > If I put a "return" before the below line, the problem goes away... Are there any errors in the console related to this line? > Don't know why a simple getElementById could cause things to disappear. If there's an error there, it will mess things up, but I don't see why it would cause toolbars and other menus to disappear. I tried manually throwing an error but still couldn't reproduce the problem. If you uninstall all jetpacks that use menus, does the problem still happen?
Thanks for the suggestion, I uninstalled all the jetpacks and cleared the develop screen and the problem went away. No errors in the black terminal console or the error console. Do I need to do anything to verbose more errors? I am using windows xp btw. I can duplicate it by putting this line into the develop screen... jetpack.future.import("menu"); Or I can put this into the develop screen, disable the jetpack addon, enable it again and the menus disappear... let Cc = Components.classes; let Ci = Components.interfaces; function simpleGetElementById() { let winEnum = Cc["@mozilla.org/appshell/window-mediator;1"]. getService(Ci.nsIWindowMediator). getEnumerator("navigator:browser"); while (winEnum.hasMoreElements()) { var doc=winEnum.getNext().QueryInterface(Ci.nsIDOMWindow).document; let popup = doc.getElementById("menu_ToolsPopup"); } } simpleGetElementById(); ...comment out the getElementById and the menu is ok again. firefox 3.5.6 jetpack 0.6.2
That's really interesting, thanks for debugging. I have no idea what's going on. I wonder if Jetpack is colliding with some other common extension. Could you do me a huge favor and try disabling all extensions except Jetpack, then re-enable them one by one to see when the problem starts?
Do you have the Menu Editor extension? I can reproduce the missing toolbar items when I install it, but not the missing menu items. https://addons.mozilla.org/en-US/firefox/addon/710
Thanks, you're right it's only certain extensions. I've disabled my extensions here's what doesn't work with just one extension + jetpack... pixlr grabber 1.3.0 web developer 1.1.8 These ones work with just jetpack + one extension... greasemonkey 0.8.20091209.4 live http headers 0.15 fireftp 1.0.7 firebug 1.4.5
Attached patch patchSplinter Review
Thanks for your help, Hankin. The problem seems to be that we don't wait for the XUL doc to load before trying to get the menu popup element. I don't understand why not doing that would screw up the toolbars of other add-ons, but it does seem to, and waiting for the doc to load is the right thing to do anyway. My guess is that with more add-ons installed with more toolbars, the XUL doc doesn't load instantaneously like it does with only Jetpack installed. This is a hacky patch that waits for the doc to load if need be. I'm not sure if it's foolproof, but it works in my tests. If your toolbar items are still missing, you may have to drag them from the customization palette back to the toolbar.
Assignee: nobody → adw
Status: NEW → ASSIGNED
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
OS: Mac OS X → All
Priority: -- → P1
Hardware: x86 → All
Resolution: --- → FIXED
Target Milestone: -- → 0.7
Sorry, I still have the same problem after applying the patch. It occurs only once when I disable jetpack, then enable it again. But when I restart firefox after re-enabling it all the toolbars & tools menu are ok again. It's strange, when I go to the customization palette, don't change anything and close the window then all the items missing from the tools menu show up again. But toggling the web developer toolbar doesn't bring it back. Doesn't matter to me cause I know that it works after I restart it, but other users may think that jetpack is doing something to other addons. Thanks for your time on this. :)
Could you test if you can reproduce in a new profile? With this patch I couldn't in a new profile. In some of my tests it also fixed existing profiles, but sometimes it didn't.
Yes you're right, it's working. I had left some testing code in the develop screen, I removed it and it worked!
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: