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 219177 - IDE freezes when opening hyperlinks by external browser
Summary: IDE freezes when opening hyperlinks by external browser
Status: RESOLVED FIXED
Alias: None
Product: ide
Classification: Unclassified
Component: Extbrowser (show other bugs)
Version: 7.3
Hardware: Macintosh Mac OS X
: P2 normal (vote)
Assignee: Denis Anisimov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-28 11:30 UTC by ytn01
Modified: 2012-10-26 01:28 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
NetBeans Thread Dump when freeze occured (18.52 KB, text/plain)
2012-10-19 21:32 UTC, ytn01
Details
patch (1.33 KB, patch)
2012-10-24 11:02 UTC, Denis Anisimov
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description ytn01 2012-09-28 11:30:08 UTC
IDE freezes when opening hyperlinks by external browser.
This can be seen when trying to open links for the issue you just reported from within the issue reporter, by an external browser.

Product Version = NetBeans IDE 7.3 Beta (Build 201209232010)
Operating System = Mac OS X version 10.7.4 running on x86_64
Java; VM; Vendor = 1.6.0_35
Runtime = Java HotSpot(TM) 64-Bit Server VM 20.10-b01-428
Comment 1 Petr Jiricka 2012-10-18 13:16:03 UTC
Hi, can you please attach a thread dump of the IDE when this happens? See this page: http://wiki.netbeans.org/GenerateThreadDump

After this happens, is the IDE frozen forever and you have to kill it, or does it "unfreeze" after a while? Thanks.
Comment 2 ytn01 2012-10-19 21:32:44 UTC
Created attachment 126217 [details]
NetBeans Thread Dump when freeze occured
Comment 3 ytn01 2012-10-19 21:36:52 UTC
This thread dump was taken when this freeze occurred on a newer build (201210180002).
Comment 4 Petr Jiricka 2012-10-23 12:45:28 UTC
Denis, any ideas? Can I help to investigate on Mac?
Comment 5 Denis Anisimov 2012-10-24 11:01:37 UTC
Swing is blocked inside method 
org.netbeans.modules.extbrowser.MacBrowserImpl.getDefaultBrowserFamilyId() 
as I see from thread dump .
The latter method is used to detect default browser type on the OS.
I don't know the exact reason why external process is not terminated 
( thread is blocked on the java.lang.UNIXProcess.waitFor() ) but it seems this
functionality is outdated.
I don't know the current approach with available IDE integrated browsers 
but it seems we have now only predefined browsers ( like Chrome, Chromium ) that
are explicitly integrated with IDE. So they differ even from Chrome that is not 
integrated with IDE.
MacBrowserImpl.getDefaultBrowserFamilyId() method is used to detect system 
default browser identifier which is definitely not an IDE integrated browser.
So we probably don't need the current implementation of this method.
IDE integrated browsers ( Chrome, Chromium ) have this method implemented 
statically ( BrowserFamilyId is CHROME or CHROMIUM and there is no any 
special procedure to detect it ). 
So this method works fine for those browsers.

As a result I think we could avoid call getBrowserFamilyId() method for browsers
that has no enhanced mode.
Please see the proposed patch.
Actually I don't know the details about browser integration and current 
ExtBrowserImpl.getLookup() implementation. I think David is the original author
of this implementation. 
David, could you please review the patch and comment the issue ?
Comment 6 Denis Anisimov 2012-10-24 11:02:20 UTC
Created attachment 126448 [details]
patch
Comment 7 David Konecny 2012-10-25 00:41:45 UTC
The patch will avoid the problem. And most of ClientSide project code is not using SystemDefault browser anyway. I wonder why is it happening though - it sounds like it is always reproducible.
Comment 8 Denis Anisimov 2012-10-25 08:06:02 UTC
(In reply to comment #7)
> The patch will avoid the problem. And most of ClientSide project code is not
> using SystemDefault browser anyway. I wonder why is it happening though - it
> sounds like it is always reproducible.

Thank you.
Comment 9 Denis Anisimov 2012-10-25 08:12:33 UTC
web-main#bc481178e149
Comment 10 Quality Engineering 2012-10-26 01:28:05 UTC
Integrated into 'main-golden', will be available in build *201210260001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/bc481178e149
User: Denis Anisimov <ads@netbeans.org>
Log: Fix for BZ#219177 - IDE freezes when opening hyperlinks by external browser