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 25470 - Help viewer frozen on first open over modal dialogs
Summary: Help viewer frozen on first open over modal dialogs
Status: RESOLVED WORKSFORME
Alias: None
Product: platform
Classification: Unclassified
Component: Help System (show other bugs)
Version: 3.x
Hardware: All All
: P4 blocker (vote)
Assignee: Victor Vasilyev
URL:
Keywords:
Depends on: 29448
Blocks: 40668
  Show dependency tree
 
Reported: 2002-07-09 19:26 UTC by John Jullion-ceccarelli
Modified: 2009-05-25 21:03 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Beginnings of debug info (2.21 KB, patch)
2002-07-17 22:21 UTC, Jesse Glick
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description John Jullion-ceccarelli 2002-07-09 19:26:39 UTC
win2k, 7-9 dev build, jdk1.4

Open the IDE, open any modal dialog, click F1 or Help 
button. Help viewer appears over the dialog and is frozen. 
You can't close it, nor can you get back to the IDE window 
by clicking on it or its button in the windows task bar. 
You have to click on the dialog box to give it the focus 
and then close dialog box. Only happens the first time the 
Help window is opened. If the help window fully covers the 
dialog box there's no way to get back to it and you have 
to close the IDE, potential data loss, thus the P1.
Comment 1 Jesse Glick 2002-07-09 20:31:59 UTC
It is only on Windows. On Linux it works fine. Seems that the code to
listen for modal dialogs being opened is not run properly on Windows;
possible JRE bug. Will have to investigate.
Comment 2 Marian Mirilovic 2002-07-10 10:54:56 UTC
Oldest issue, but it works fine in [nb](release 3.3.2).
It didn't work in build [nb_dev](200205070925) - it's the oldest build
available on download.

It doesn't work on Solaris 5.8 && [jdk1.3.1](03) but on [jdk1.4.0](01)
it works fine.
Comment 3 _ ttran 2002-07-10 14:28:32 UTC
fixed.


  User: ttran   
  Date: 02/07/10 06:26:49

  Modified:    javahelp/src/org/netbeans/modules/javahelp Installer.java
  Log:
  #25470: Help viewer frozen on first open over modal dialogs.  Quick
  fix.  See comments in code for details.
  
  Revision  Changes    Path
  1.6       +8 -0     
core/javahelp/src/org/netbeans/modules/javahelp/Installer.java
  
 
http://core.netbeans.org/source/browse/core/javahelp/src/org/netbeans/modules/javahelp/Installer.java.diff?r1=1.5&r2=1.6
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: Installer.java
  ===================================================================
  RCS file:
/cvs/core/javahelp/src/org/netbeans/modules/javahelp/Installer.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -b -r1.5 -r1.6
  --- Installer.java	2002/06/19 20:31:09	1.5
  +++ Installer.java	2002/07/10 13:26:48	1.6
  @@ -38,6 +38,14 @@
           // by the time F1 is first pressed. Otherwise only the second
           // F1 actually gets anything other than the main window help.
           HelpAction.WindowActivatedDetector.install();
  +
  +        // XXX(-ttran) quick fix for #25470: Help viewer frozen on
first open
  +        // over modal dialogs.  JavaHelp seems to try to be lazy
with the
  +        // installation of its Dialog detector (an
AWTEventListener) but it
  +        // doesn't work on Windows.  Here we force JavaHelp
instance to be
  +        // created and thus its AWTEventListener be registered
early enough.
  +        
  +        getDefaultHelp();
       }
       
       public void uninstalled() {
Comment 4 Jesse Glick 2002-07-10 15:11:27 UTC
Alright but this is a quick fix, not a permanent fix. I want to remove
the hack and replace it with a proper fix as time permits.
Comment 5 Jesse Glick 2002-07-10 15:34:34 UTC
(Specifically figure out why the AWTEventListener was broken. If
necessary might file a JRE bug.)

BTW thanks for hot patch Trung!
Comment 6 Jiri Kovalsky 2002-07-11 10:33:12 UTC
Could you please Jesse merge this "hack" into QBE200207100100 branch too ?
Comment 7 _ ttran 2002-07-11 11:29:48 UTC
hotfix merged from trunk to QBE200207100100
Comment 8 Marian Mirilovic 2002-07-11 17:10:13 UTC
verified hotfix in [nb34_beta3](20020711)
Comment 9 Jesse Glick 2002-07-17 22:21:03 UTC
Created attachment 6766 [details]
Beginnings of debug info
Comment 10 Marek Grummich 2002-07-22 08:30:44 UTC
Target milestone was changed from '3.4' to TBD.
Comment 11 Marek Grummich 2002-07-22 08:34:51 UTC
Target milestone was changed from '3.4' to TBD.
Comment 12 Marek Grummich 2002-07-22 08:45:01 UTC
Target milestone was changed from '3.4' to TBD.
Comment 13 Marek Grummich 2002-07-22 08:50:08 UTC
Target milestone was changed from '3.4' to TBD.
Comment 14 Jesse Glick 2002-10-18 21:39:14 UTC
You're as likely to work on these as I am not, I guess. I have no time for
core/javahelp development. Maybe you will at some point.
Comment 15 _ tboudreau 2004-04-19 14:06:13 UTC
Reassigning to Marek, new owner of output window and help system
Comment 16 _ rkubacki 2004-05-13 13:59:58 UTC
We can reconsider Trung's fix that adds work to ModuleInstall. Is it
still needed?
Comment 17 mslama 2005-09-08 12:30:12 UTC
I investigated: Reason is that handling of modal dialogs (in JDK without
modality exclusion support) requires to start AWTEventListener BEFORE user is
able to open any modal dialog in IDE. If call of getDefaultHelp() (creating
instance of JavaHelp class and registering AWTEventListener) is removed from
ModuleInstall.restored JavaHelp instance is created later during warm up when
Menu items are created. It takes some time and if user opens modal dialog before
JavaHelp instance is created current impl of JavaHelp.currentModalDialog does
not work properly (even if there is fallback to
HelpAction.WindowActivatedDetector.getCurrentActivatedWindow() as this is not
the same as it returns any currently activated window instead of current modal
dialog).

Possible fix could be to reconstruct somehow chain of modal dialogs and populate
stack currentModalDialogs when JavaHelp instance is created.
Comment 18 Antonin Nebuzelsky 2008-11-14 15:18:38 UTC
Reassigning to the new "core/help system" owner obarbashov.
Comment 19 Alexei Mokeev 2009-03-05 13:57:42 UTC
Moving JH issues to Victor.
Comment 20 Victor Vasilyev 2009-05-15 19:01:14 UTC
1. jdk1.4 is not supported since NB6.X
2. This issue is not reproducible on both jdk1.5 and jdk1.6
3. Deep investigation of the hacks inside code of the JavaHelp Integration module shows that such issue should never
occur in the NB6.7.

I'll close it. Please re-open this issue if something will be wrong with modality of dialogs around the Help system of
the NetBeans.