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 12870 - IDE hangup for 30sec when launching Web browser
Summary: IDE hangup for 30sec when launching Web browser
Status: CLOSED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 3.x
Hardware: PC Windows ME/2000
: P3 blocker (vote)
Assignee: _ ttran
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-06-15 11:14 UTC by Adam Sotona
Modified: 2008-12-22 22:10 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Full Thread Dump when IDE is freezed (19.04 KB, text/plain)
2001-06-15 11:16 UTC, Adam Sotona
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Sotona 2001-06-15 11:14:53 UTC
When trying to launch Web browser IDE hangs up for about 30 seconds and then 
ICE Browser appears.
Comment 1 Adam Sotona 2001-06-15 11:16:57 UTC
Created attachment 1585 [details]
Full Thread Dump when IDE is freezed
Comment 2 Jan Zajicek 2001-06-18 11:04:19 UTC
Assigning to radim. Not sure where is the bug. Problem can be, that following
code runs in AWT:

...
at org.openide.awt.SwingBrowserImpl.setURL(SwingBrowserImpl.java:75)

at org.openide.awt.HtmlBrowser$1.run(HtmlBrowser.java:401)
...
Comment 3 _ rkubacki 2001-06-18 12:21:46 UTC
It is not the ICEBrowser what grabs your AWTThread. It is JEditorPane from
Swing. Namely the implementation of setPage that read URL content from AWT thread.
Comment 4 _ rkubacki 2001-09-18 09:05:56 UTC
One way how to fix this bug is to make browser window non-persistent.
Similarly if IDE display URLs in external browser they are not
reopened when IDE is restarted so can cancel deserialization of
internal browser too. 

Moreover the internal browser is not deserialized in current version
if we can't connect to URL. This handles cases when there was browser
showing executed/debugged JSP or servlet page. 
Comment 5 _ ttran 2001-09-18 17:32:18 UTC
this bug is not JDK 1.4 specific.  Radim's evaluation is right: the
root of trouble is JEditorPane.setPage(URL) which runs in AWT thread
and runs asynchronously.

javadoc of this method says you can make JEditorPane.setPage async by
calling setAsynchronousLoadPriority on the AbstractDocument associated
with the JEditorPane.  I fixed the bug by doing so iff the URL's
protocol is http or ftp, otherwise do it synchronously  (http and ftp
are the only two network protocols, JDK/NB understands).  There is a
cost attached with async loading of the URL (one more thread), so I
don't want to enable it in all cases
Comment 6 Jan Zajicek 2001-09-21 09:23:10 UTC
Adame, can you verify this issue, thanks.
Comment 7 Adam Sotona 2001-09-24 10:51:17 UTC
verified
Comment 8 Quality Engineering 2003-07-01 16:18:46 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.