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 34343 - .HtmlBrowser$1.run blocks awt queue
Summary: .HtmlBrowser$1.run blocks awt queue
Status: VERIFIED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Window System (show other bugs)
Version: 3.x
Hardware: All All
: P3 blocker (vote)
Assignee: _ tboudreau
URL:
Keywords: PERFORMANCE, THREAD
Depends on:
Blocks:
 
Reported: 2003-06-12 13:01 UTC by pzajac
Modified: 2008-12-22 19:30 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
awt-que stacktrace (1.66 KB, text/plain)
2003-06-12 13:02 UTC, pzajac
Details

Note You need to log in before you can comment on or make changes to this bug.
Description pzajac 2003-06-12 13:01:35 UTC
The Htmlbrowse resolve address name in AWT-queue.
It can take few seconds. There is better to
reassign this code to request processor.

 
AWT-EventQueue-0" prio=6 tid=0x0833f168 nid=0x10
runnable [cc83f000..cc83fd9c]
        at
java.net.Inet4AddressImpl.lookupAllHostAddr(Native
Method)
        at
java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:770)
        at
java.net.InetAddress.getAddressFromNameService(InetAddress.java:1059)
        at
java.net.InetAddress.getAllByName0(InetAddress.java:1009)
        at
java.net.InetAddress.getAllByName0(InetAddress.java:981)
        at
java.net.InetAddress.getAllByName(InetAddress.java:975)
        at
java.net.InetAddress.getByName(InetAddress.java:889)
        at
java.net.URLStreamHandler.getHostAddress(URLStreamHandler.java:377)
        - locked <0xcef5a9d8> (a
sun.net.www.protocol.http.Handler)
        at
java.net.URLStreamHandler.hostsEqual(URLStreamHandler.java:396)
        at
java.net.URLStreamHandler.sameFile(URLStreamHandler.java:342)
        at
java.net.URLStreamHandler.equals(URLStreamHandler.java:275)
        at java.net.URL.equals(URL.java:810)
        at
org.openide.awt.HtmlBrowser$1.run(HtmlBrowser.java:434)
        at
java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)
        at
java.awt.EventQueue.dispatchEvent(EventQueue.java:454)
        at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
        at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
        at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
        at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
        at
java.awt.EventDispatchThread.run(EventDispatchThread.java:100)

"Java2D Disposer" daemon prio=10 tid=0x0830c0a8
nid=0xf in Object.wait() [cc94f000
Comment 1 pzajac 2003-06-12 13:02:13 UTC
Created attachment 10669 [details]
awt-que stacktrace
Comment 2 _ rkubacki 2003-11-19 10:38:59 UTC
I put the code into HtmlBrowser to avoid #9470. This was caused by
wrong implementation of java.net.URL.equals. Maybe java.net.URI.equals
can be used now but I am afraid that we need to resolve host names
anyway and thus reschedule the part of work out of AWT as Petr suggests.
Comment 3 pzajac 2003-12-01 13:16:44 UTC
Tim,
are you sure that responsivness or performance issue is enhancement? 
Comment 4 _ tboudreau 2003-12-01 19:47:25 UTC
Okay, it's a defect.  It's definitely not a TASK.
Comment 5 _ tboudreau 2003-12-15 17:29:39 UTC
Fixed in trunk - moved it to default request processor.  Doesn't seem
to cause any trouble.

Checking in HtmlBrowser.java;
/cvs/openide/src/org/openide/awt/HtmlBrowser.java,v  <--  HtmlBrowser.java
new revision: 1.86; previous revision: 1.85
done
Processing log script arguments...
Mailing the commit message to cvs@openide.netbeans.org (from
tboudreau@netbeans.
org)
Comment 6 Jesse Glick 2003-12-16 11:54:29 UTC
There is concern over whether the fix is correct; see nbdev & cvs@openide.
Comment 7 _ tboudreau 2003-12-16 12:11:27 UTC
I am attempting to improve the fix, but getting a strange compiler
error (even after cleaning) about a duplicate HtmlBrowser$1.class and
the build will not complete.

I tried moving the second runnable that schedules the change back to
the event queue (which had been created inside an anonymous inner
class declared in a method body) into its own named class, but the
problem persists.  I'm not sure what's wrong.
Comment 8 Jaroslav Tulach 2003-12-16 12:19:13 UTC
I know about the compiler problem. Please do not use annonymous
innerclasses for now. I'll try to fix it.

Second runnable? Why not use invokeLater (this)?

Please also address the problem with RP.
Comment 9 _ tboudreau 2003-12-16 12:26:09 UTC
You're right, I could use the same inner class for both.

What *is* the compiler problem, anyway?
Comment 10 _ tboudreau 2003-12-19 04:14:50 UTC
Fixed.  Again.
Comment 11 pzajac 2004-01-06 16:11:22 UTC
it looks fine