Bug 196443 - AWT EventQueue blocked inserting code template
AWT EventQueue blocked inserting code template
Status: VERIFIED FIXED
Product: editor
Classification: Unclassified
Component: Completion & Templates
6.x
PC Other
: P2 (vote)
: 7.0
Assigned To: Dusan Balek
issues@editor
: 70_HR_FIX
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-03-08 15:22 UTC by mklaehn
Modified: 2011-03-16 08:12 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
:


Attachments
five threaddumps made within 15 minutes while the EventQueue is blocked (22.27 KB, application/zip)
2011-03-08 15:22 UTC, mklaehn
Details
profiling snapshot of code template expansion for "fore" after ca 2 minutes blockng the EventQueue (971.62 KB, application/octet-stream)
2011-03-08 16:47 UTC, mklaehn
Details
small project to reproduce (13.63 KB, application/zip)
2011-03-09 09:05 UTC, mklaehn
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mklaehn 2011-03-08 15:22:58 UTC
Created attachment 106825 [details]
five threaddumps made within 15 minutes while the EventQueue is blocked

I've been editing in a constructor and wanted to have for each loop inserted and the EventQueue is blocked since pressing the tab key to expand it. Currently it's going on 15 minutes and the cpu is fully utilized!
I'm using nbm-and-javadoc-6771-on-110303.

I will attach some Threaddumps made with visualVM.
Comment 1 Dusan Balek 2011-03-08 15:39:14 UTC
Could you please create a profiler snapshot and attach it to the issue? Thanks.
Comment 2 mklaehn 2011-03-08 16:46:25 UTC
i'll attach profiling snapshot shortly.
had to switch system due to limited processing power and memory. same build but on mac. was win 2k previously.
Comment 3 mklaehn 2011-03-08 16:47:42 UTC
Created attachment 106828 [details]
profiling snapshot of code template expansion for "fore" after ca 2 minutes blockng the EventQueue
Comment 4 mklaehn 2011-03-08 17:09:23 UTC
problem is also present in netbeans-trunk-nightly-201103080000-ml.zip
Comment 5 Dusan Balek 2011-03-09 08:29:59 UTC
Thanks for the snapshot. It seems that there is an infinite loop inside JavaCodeTemplateProcessor.updateDefaultValues(). Could you please extract a simple reproducible test case from your sources and attach it to the issue? Thanks.
Comment 6 mklaehn 2011-03-09 09:05:13 UTC
Created attachment 106845 [details]
small project to reproduce

the GroupingDataObject classes are the relevant ones. while trying to initialize the array i stumbled upon this problem.
Comment 7 Dusan Balek 2011-03-09 13:30:07 UTC
Thanks for the reproducible test case.
Comment 8 Dusan Balek 2011-03-10 09:15:24 UTC
Fixed in jet-main.

http://hg.netbeans.org/jet-main/rev/f79f4efe2a99
Comment 9 Jan Lahoda 2011-03-10 10:23:28 UTC
The patch seems fine to me.
Comment 10 Quality Engineering 2011-03-11 09:38:20 UTC
Integrated into 'main-golden', will be available in build *201103110400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/f79f4efe2a99
User: Dusan Balek <dbalek@netbeans.org>
Log: Issue #196443: AWT EventQueue blocked inserting code template - fixed.
Comment 11 Jaromir Uhrik 2011-03-14 11:18:07 UTC
Product Version: NetBeans IDE Dev (Build 201103140400)
Java: 1.6.0_24; Java HotSpot(TM) Client VM 19.1-b02
System: Windows XP version 5.1 running on x86; Cp1250; cs_CZ (nb)

Verified in the trunk build above. I agree with integration in 70.
Comment 12 Dusan Balek 2011-03-15 09:35:09 UTC
Fix integrated into release70.

http://hg.netbeans.org/releases/rev/5c5131901dc7
Comment 13 Jaromir Uhrik 2011-03-16 08:12:05 UTC
Verified in 70:
Product Version: NetBeans IDE 7.0 RC1 (Build 201103160000)
Java: 1.6.0_24; Java HotSpot(TM) Client VM 19.1-b02
System: Windows XP version 5.1 running on x86; Cp1250; cs_CZ (nb)


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo