This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
[dev feb 12] After uninstalling and reinstalling modules, sometimes links in the Help menu become "dead". Some kind of refresh bug either in JavaHelp module or in org.openide.awt.MenuBar; need to investigate.
Created attachment 6311 [details] Sample log file after the problem appears
Created attachment 6312 [details] More helpful log
I inserted some additional debugging code and tracked down the problem somewhat. As far as I can tell, MenuBar is working correctly, but FolderInstance is not. The problem is easily reproducible in current dev builds by just turning the XML Core module on or off. A fix of issue #22628 would probably solve this too. What I found out (see second log): after turning off (or on) the XML Core module, all the .xml files which represent help shortcut menu items get rerecognized (of course). New XMLDataObject.Processor's are created and attached to them, too. *However* the FolderInstance continues to the InstanceCookie's belonging to the old data objects, I think - at least it continues to call instanceCreate() on the old XMLDO.P's, which return cached menu presenters, which are still bound to the old XMLDO's and so give the menu item text "dead" because the associated file now !isValid(). See e.g. the _last_ occurrence of [org.netbeans.modules.javahelp.HelpCtxProcessor@ec0b80] Reusing cached help context presenter from Menu/Help/HelpShortcuts/org-netbeans-modules-usersguide-mainpage.xml where the reused presenter shows "dead". HelpCtxProcessor@b5efb was just created and is the new XMLDO.P which is attachTo()'d the new XMLDO (from the XML Core module which was just turned on). Yet that processor is not being used by FolderInstance. If you open Menu/Help/HelpShortcuts/ in the Bean Browser, the current InstanceCookie's on the available data objects show valid, working menu items. Note that Lookup.default.lookup(HelpSet.class) appears to works fine even after turning on/off XML Core. As far as I know this lookup uses FolderInstance too (FolderLookup to be precise) and the XMLDO.P for the help set reference XML files which produce HelpSet's in Lookup is written analogously to that for the help context references. (In HelpCtxProcessor for testing purposes I inserted this line into attachTo: p = null; in the fear that the HCP was being cached and attachTo called with the new XMLDO, and I was overcaching the presenter. But this does not appear to be the case, as described above, and the patch does not solve the problem.) I found out however that the current XMLDO.P impl for help set refs does not check whether the XMLDO is valid when createInstance() is called. When I inserted such a check, indeed the XMLDO's were invalid, and lookup on HelpSet failed. This adds a further argument that FolderInstance or perhaps XMLDataObject is at fault, not MenuBar.
Due to the fix of issue #22628, the problem is now solved in [dev jun 24]. I believe FolderInstance is still not working exactly correctly, but there is no visible symptom. Could reopen if you think openide code needs fixing for some other reason.
verified
Resolved for 3.4.x or earlier, no new info since then -> closing.