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.

Bug 201194 - Problem with JavaHelp on Mac OSX: view is invalid
Summary: Problem with JavaHelp on Mac OSX: view is invalid
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Help System (show other bugs)
Version: 7.0.1
Hardware: Macintosh Mac OS X
: P3 normal (vote)
Assignee: Jaroslav Havlin
URL: http://java.net/jira/browse/JAVAHELP-33
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-21 20:06 UTC by billooms
Modified: 2011-10-04 14:06 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description billooms 2011-08-21 20:06:01 UTC
When attempting to open a help file, the help window is not shown and a pop-up gives the following error message: java.lang.IllegalArgumentException: view is invalid (see full trace below). 

This is a problem with new NetBeans Platform Applications that are created on either NetBeans 7.0 or 7.0.1. Applications that were created with 6.9.1 still appear to work properly. The problem can easily be observed by the following:

Create a new NetBeans Platform Application (I called mine "TestHelp") and set it as the main project.
Add a new Module (I called mine "MyTest" with a code name base of com.billooms.mytest). 
Add a new Window to the module (I called mine "MyTest") in the editor position and checked "open on application start".
Add a new JavaHelp Help Set to the module. 
Compile and run the application. Then click on "Help" -> "Help Contents". The help window does not appear, but a pop-up indicates an error with the following details:

java.lang.IllegalArgumentException: view is invalid
	at javax.help.search.MergingSearchEngine.merge(MergingSearchEngine.java:91)
	at javax.help.JHelpSearchNavigator.merge(JHelpSearchNavigator.java:168)
	at javax.help.plaf.basic.BasicSearchNavigatorUI.addSubHelpSets(BasicSearchNavigatorUI.java:275)
	at javax.help.plaf.basic.BasicSearchNavigatorUI.reloadData(BasicSearchNavigatorUI.java:225)
	at javax.help.plaf.basic.BasicSearchNavigatorUI.installUI(BasicSearchNavigatorUI.java:174)
	at javax.swing.JComponent.setUI(JComponent.java:662)
	at javax.help.JHelpNavigator.setUI(JHelpNavigator.java:257)
	at javax.help.JHelpNavigator.updateUI(JHelpNavigator.java:276)
	at javax.help.JHelpNavigator.<init>(JHelpNavigator.java:105)
	at javax.help.JHelpSearchNavigator.<init>(JHelpSearchNavigator.java:66)
	at javax.help.SearchView.createNavigator(SearchView.java:80)
	at javax.help.JHelp.setupNavigators(JHelp.java:148)
	at javax.help.JHelp.<init>(JHelp.java:126)
	at javax.help.JHelp.<init>(JHelp.java:76)
[catch] at org.netbeans.modules.javahelp.JavaHelp.createJHelp(JavaHelp.java:919)
	at org.netbeans.modules.javahelp.JavaHelp.createAndDisplayJHelp(JavaHelp.java:495)
	at org.netbeans.modules.javahelp.JavaHelp.showHelp(JavaHelp.java:474)
	at org.netbeans.modules.javahelp.HelpCtxProcessor$ShortcutAction.actionPerformed(HelpCtxProcessor.java:160)
	at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2028)
	at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2351)
	at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
	at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
	at javax.swing.AbstractButton.doClick(AbstractButton.java:389)
	at com.apple.laf.ScreenMenuItem.actionPerformed(ScreenMenuItem.java:95)
	at java.awt.MenuItem.processActionEvent(MenuItem.java:627)
	at java.awt.MenuItem.processEvent(MenuItem.java:586)
	at java.awt.MenuComponent.dispatchEventImpl(MenuComponent.java:337)
	at java.awt.MenuComponent.dispatchEvent(MenuComponent.java:325)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:682)
	at java.awt.EventQueue.access$000(EventQueue.java:85)
	at java.awt.EventQueue$1.run(EventQueue.java:638)
	at java.awt.EventQueue$1.run(EventQueue.java:636)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
	at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
	at java.awt.EventQueue$2.run(EventQueue.java:652)
	at java.awt.EventQueue$2.run(EventQueue.java:650)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:649)
	at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:148)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

Note that I have presented a simple case above with default help files. The same problem persists with a more typical application having a number of modules and more complete help files. 

Doing this same procedure on a Windows 7 computer with NetBeans 7.0.1 works OK and shows the help window as expected. Compiling the application on a Windows 7 machine and creating the Mac Installer results in an application that appears to work OK on the Mac. Thus, it appears that the problem is with the Mac version of NetBeans and not with the JRE on the Mac.

This problem was observed on two different Mac computers with NetBeans 7.0.1: a Mac Pro 2.66GHz Quad-Core Xeon and also on a MacBook Pro Intel Core 2 Duo 2.16GHz. Both computers were running OSX 10.6.8 with the latest updates as of this date. Both had the latest Java Developers Package installed (javadeveloper_for_mac_os_x_10.6__10m3425.dmg dated June 29, 2011).
Comment 1 Jesse Glick 2011-09-30 14:55:21 UTC
Fixed upstream.
Comment 2 Jaroslav Havlin 2011-10-03 07:36:48 UTC
core-main/rev/a7d35714f947

Added workaround for problem in the current version of JavaHelp. 
When fixed version of JavaHelp is released and bundled in NetBeans, this workaround should be removed.
Comment 3 Quality Engineering 2011-10-04 14:06:32 UTC
Integrated into 'main-golden', will be available in build *201110040601* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/a7d35714f947
User: Jaroslav Havlin <jhavlin@netbeans.org>
Log: #201194 - Problem with JavaHelp on Mac OSX: view is invalid