Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 367150

Summary: JSDTDebugPlugin#start() cause hanging eclipse!
Product: [WebTools] JSDT Reporter: Lee Wang-soo <hivemind02>
Component: DebugAssignee: Project Inbox <jsdt.debug-inbox>
Status: CLOSED DUPLICATE QA Contact: Michael Rennie <Michael_Rennie>
Severity: normal    
Priority: P3 CC: hivemind02, thatnitind
Version: 3.3.1   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Lee Wang-soo CLA 2011-12-20 02:01:46 EST
Build Identifier: 20110916-0149 

Hi, I'm a fan of webtools and jsdt with great pleasure.

I have suffered hanging eclipse occasionally, and I guess the reason is JSDT breakpoint setting. If I set JSDT breakpoint and restart eclipse, and open debug perspective, then always hanging occurs. If there is no jsdt breakpoint setting, then hanging doesn't occur.

So I look into stacktrace and I found JSDTDebugPluign activation cause hanging. Properly speaking, in stacktrace, job which creating a new instance of JSDTLineBreakPoint registered as extension point cause hanging. But I found creating new instance has something to do with bundle activator starting, and I removed following code from JSDTDebugPlugin#start():

// prefmanager = new JavaScriptPreferencesManager();
// prefmanager.start();

And finally it works without hanging. 

In short, BundleActivator#start() should do only the minimum and the necessary. Otherwise, unexpected hanging can occur when creating new instance of class.

Reproducible: Always

Steps to Reproduce:
1. set jsdt breakpoint in js editor
2. close all editor and switch to web perspective (or any perspective except debug)
3. restart
4. open debug perspective
   or open breakpoints view 
5. crash
Comment 1 Lee Wang-soo CLA 2011-12-20 02:08:37 EST
In addition, I'm using oracle jdk 1.6.30 and vm options:
-Xmx512m -XX:MaxPermSize=256m

Any vm option change birngs the same results.
Comment 2 Nitin Dahyabhai CLA 2011-12-20 10:39:58 EST
Sounds like a duplicate of bug 345298.
Comment 3 Michael Rennie CLA 2012-01-10 14:38:03 EST
(In reply to comment #2)
> Sounds like a duplicate of bug 345298.

Agreed.

*** This bug has been marked as a duplicate of bug 345298 ***