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 116593 - netbeans hangs when i try to do a code-template-expand
Summary: netbeans hangs when i try to do a code-template-expand
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Completion & Templates (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-09-25 00:46 UTC by jamespb
Modified: 2007-11-05 13:38 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
dump file (17.28 KB, text/plain)
2007-09-25 00:47 UTC, jamespb
Details
user dir (2.06 MB, application/octet-stream)
2007-09-25 00:53 UTC, jamespb
Details
dump file (14.33 KB, text/plain)
2007-09-26 03:25 UTC, jamespb
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jamespb 2007-09-25 00:46:02 UTC
Current session has been up for a while, and I hit <tab> after 'doc' in the ruby editor.  NetBeans is now completely
unresponsive, isn't using CPU, and the process size seems static (921meg virtual size, 350meg working set)

10 or so open .rb files, no html or rhtml files open.  (I'm pretty sure I haven't opened any (r)html files since I
started netbeans, but can't be certain.)

NetBeans Beta 1.

I'll include the dump file.
Comment 1 jamespb 2007-09-25 00:47:23 UTC
Created attachment 49401 [details]
dump file
Comment 2 jamespb 2007-09-25 00:50:43 UTC
Product Version: NetBeans IDE 6.0 Beta 1 (Build 200709141330) Java: 1.6.0_01; Java HotSpot(TM) Client VM 1.6.0_01-b06
System: Windows Vista version 6.0 running on x86; Cp1252; en_US (nb) Userdir: C:\Users\James\.netbeans\6.0beta1
Comment 3 jamespb 2007-09-25 00:53:18 UTC
Created attachment 49402 [details]
user dir
Comment 4 Torbjorn Norbye 2007-09-25 01:43:53 UTC
Looks like a threading problem in the code completion code.

However, it looks like this code was -just- changed this morning. Your thread dump matches the previous revision of this
file, which does not include the fix for issue 116391 which also talks about completion related deadlocks.

Since Dusan made those changes I'm starting evaluation with him in case this is indeed the same bug.

James, perhaps you can grab a new build from this afternoon and see if it works better. We've also checked in various
changes to RHTML indentation today so hopefully that should be mostly working now.
Comment 5 Torbjorn Norbye 2007-09-25 01:44:37 UTC
By the way, I saw that you modified the Java-side of completion as well. Can you explain what's going on here? (I
probably have to make similar adjustments to the Ruby completion)
Comment 6 Dusan Balek 2007-09-25 12:28:06 UTC
AWT thread should not be blocked in the situation when user tries to insert a common prefix of all items contained in
the completion result list (by pressing Tab when the code completion popup is visible) and the result list is not
up-to-date (some of the completion providers did not respond yet to refresh() caused by the recent document modifications).

Since refresh() could be a time consuming task (for some special completion providers) we decided that it is better just
to beep and do nothing than wait().

Fixed.

Checking in CompletionImpl.java;
/cvs/editor/completion/src/org/netbeans/modules/editor/completion/CompletionImpl.java,v  <--  CompletionImpl.java
new revision: 1.84; previous revision: 1.83
done
Comment 7 jamespb 2007-09-26 03:21:47 UTC
I got another hang in 4185 - I'm reopening this since I think 4185 is after dbalek's Tue Sep 25 11:28:06 entry. 
(Probably just a duplicate report if that's not the case)

Slightly different way to get this problem though - I hit as<ctrl-space> this time, not doc<tab>.

Dump included.
Comment 8 jamespb 2007-09-26 03:25:28 UTC
Created attachment 49536 [details]
dump file
Comment 9 Dusan Balek 2007-09-26 08:28:15 UTC
Is seems that 4185 does not contain my fix of this issue since your thread dump matches the 1.83 revision of
CompletionImpl.java. Please try to use some newer build.