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 35470

Summary: Setting context classloader for AWT event thread is done too late
Product: platform Reporter: David Strupl <dstrupl>
Component: Module SystemAssignee: Jesse Glick <jglick>
Status: VERIFIED FIXED    
Severity: blocker CC: issues
Priority: P3    
Version: 3.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Bug Depends on:    
Bug Blocks: 28536    
Attachments: Proposed patch

Description David Strupl 2003-08-18 22:35:38 UTC
The fix for issue 28536. Is applied too late
during the startup sequence. There is at least one
scenario where some module code is called in AWT
without the context classloader being properly
set. Please check my suggested patch to 28536 for
moving the code in question up in the method
Main.initializeMainWindow(). I don't insist on the
patch being exactly like I suggest but only to
make sure that before any module code is called in
AWT thread the hack described in 28536 should be
applied. Assigned directly to Jesse since he fixed
the previous issue.
Comment 1 Jesse Glick 2003-08-19 06:06:37 UTC
Could you attach a -u format diff please? The contextless diff is hard
to verify.
Comment 2 David Strupl 2003-08-19 11:32:41 UTC
Created attachment 11359 [details]
Proposed patch
Comment 3 David Strupl 2003-08-19 11:35:51 UTC
Please note that I have changed invokeLater to invokeAndWait. Don't
know whether that is really needed. As I said with this patch at work
my xtest tests now running without problem. Could this be done even
earlier? e.g. as soon as the module system knows the classloader? But
maybe only in case something goes to AWT not to initialize AWT in a
non gui session. So the method initializeMainWindow is probably the
right place ...
Comment 4 Jesse Glick 2003-08-19 15:32:33 UTC
Will use invokeAndWait; would be necessary only if something in window
mgr init uses it too (which I don't know about).

Would rather not put this code elsewhere - as you say, do not want to
initialize AWT unless it will be used.
Comment 5 Jesse Glick 2003-08-19 15:37:56 UTC
Will use invokeAndWait; would be necessary only if something in window
mgr init uses it too (which I don't know about).

Would rather not put this code elsewhere - as you say, do not want to
initialize AWT unless it will be used.
Comment 6 Jesse Glick 2003-08-19 16:39:16 UTC
Did I mark this fixed? Sorry, not yet.
Comment 7 Jesse Glick 2003-08-19 22:43:59 UTC
committed     Up-To-Date  1.169       core/src/org/netbeans/core/Main.java
Comment 8 Marian Mirilovic 2005-07-13 13:24:17 UTC
closed