Bug 112278 - Editor frozen, CPU at 100%
Editor frozen, CPU at 100%
Product: apisupport
Classification: Unclassified
Component: Project
All Windows XP
: P3 with 3 votes (vote)
: 6.x
Assigned To: Jesse Glick
Depends on:
  Show dependency treegraph
Reported: 2007-08-08 10:09 UTC by Jan Becicka
Modified: 2008-05-22 16:09 UTC (History)
7 users (show)

See Also:
Issue Type: DEFECT

Bunch of FTDs (191.88 KB, text/plain)
2007-08-08 10:11 UTC, Jan Becicka
Messages.log just for record. No exceptions there. (58.13 KB, text/plain)
2007-08-08 10:12 UTC, Jan Becicka
messages.log from editor freeze (29.13 KB, text/plain)
2007-11-17 00:51 UTC, lttldrgn
Thread dump while netbeans locked up (21.45 KB, text/plain)
2007-11-17 00:52 UTC, lttldrgn
Thread dump (14.52 KB, text/plain)
2008-04-25 10:34 UTC, pribyl

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Becicka 2007-08-08 10:09:56 UTC
... while editing java file. Need to kill & restart.
Comment 1 Jan Becicka 2007-08-08 10:11:09 UTC
Created attachment 46310 [details]
Bunch of FTDs
Comment 2 Jan Becicka 2007-08-08 10:12:16 UTC
Created attachment 46311 [details]
Messages.log just for record. No exceptions there.
Comment 3 Jan Lahoda 2007-08-08 12:36:20 UTC
From the thread dumps, it seems that the SourceForBinaryQuery.findSourceRoots takes a very long time to answer on
Comment 4 Jesse Glick 2007-08-08 17:10:32 UTC
Yes, all queries on NBM projects will take a while if it needs to scan for project metadata the first time. Some day
queries will respond faster. (Not clear from description whether this metadata should have already been loaded or not.)
But the proximate cause of the freeze is that JavaCodeTemplateProcessor.initParsing is blocking EQ running a compilation
task, which I understand is forbidden. Check the thread dump for EQ and the log:

WARNING [org.netbeans.api.java.source.JavaSource]: JavaSource.runUserActionTask called in AWT event thread by:
Comment 5 Jan Lahoda 2007-08-08 18:36:15 UTC
As Honza B. stated, he had to kill&restart the IDE. The CPU was hogged for ~5mins. Even if the AWT Thread would not wait
for the code completion to finish, there would be no Java support (no hyperlinks, no CC, no sem. coloring, no mark
occurrences) until the currently running CC query would finish - it is unacceptable to wait for ~5mins, IMO.

For the code templates running in AWT, it is question to Dusan how much can be done about this.
Comment 6 Jesse Glick 2007-08-08 19:14:21 UTC
Have not heard of such long delays. Is the D drive a local disk? Which project was being worked on?
Comment 7 Jesse Glick 2007-08-09 19:17:55 UTC
Anyone else had a similar problem? Nothing that I know of has changed recently in apisupport.
Comment 8 Jesse Glick 2007-08-09 19:48:06 UTC
I just ran 070808 (Basic) with JDK 6 on a fresh userdir and opened java/sourceui. Took maybe 5-10 seconds to open with
the progress dialog. Java scanning started a few seconds later, took maybe a minute or less incl. JRE (5) scanning.
After that, editor on random source files in the project was responsive for code completion at least. No freezes or
unreasonable delays encountered.
Comment 9 Jan Becicka 2007-08-10 06:11:59 UTC
What information is needed now? Not clear why is this bug INCOMPLETE.
Comment 10 Jesse Glick 2007-08-10 17:41:36 UTC
Whether the problem is reproducible (on your normal development machine or on other machines), whether anyone else is
seeing similar problems, whether the problem began happening recently or has been a problem for a long time, etc. I
cannot reproduce any delays on the same order of magnitude as what you describe, so it is unlikely I am going to be able
to improve anything.
Comment 11 Jan Becicka 2007-08-13 17:05:23 UTC
I cannot reproduce it again. It happened once. I propose to lower priority and remove INCOMPLETE kw.
Comment 12 Jesse Glick 2007-08-13 19:50:27 UTC
Good to know it is not always like this, anyway. I can try to track I/O usage opening or editing a typical module since
I suspect it was just a bad day for I/O for some reason, and apisupport certainly uses a lot of I/O.
Comment 13 Antonin Nebuzelsky 2007-08-29 09:42:28 UTC
Should be fixed for 6.0 if possible (and if reproducible). TM=6.0 for now.
Comment 14 Jesse Glick 2007-09-27 18:20:22 UTC
Not known to be reproducible, and anyway likely affects only developers of nb.org modules (rather than general
apisupport users).
Comment 15 lttldrgn 2007-11-17 00:49:20 UTC
I have experienced this a handful of times as well.  I just d/l NB6.0rc1 and it still seems to happen when I work with
large projects (10000+ files).  While working, performance seems to degrade over time and sometimes it will lock up and
not return.  I've been running jconsole to monitor NB and some other performance issues related to the Navigator window
when switching source tabs (see issue 117602).  Basically when the heap limit is reached it gets stuck in a continual
garbage collection and obviously can not recover.  In the past I did not get any errors, but I let it run a while longer
(30+ minutes) and finally got a OutOfMemoryError exception in the messages.log that may help point to what is causing
this error.  I will attach that along with a thread dump in case it helps.
Comment 16 lttldrgn 2007-11-17 00:51:16 UTC
Created attachment 53152 [details]
messages.log from editor freeze
Comment 17 lttldrgn 2007-11-17 00:52:19 UTC
Created attachment 53153 [details]
Thread dump while netbeans locked up
Comment 18 pribyl 2008-04-25 10:31:24 UTC
Product Version: NetBeans IDE 6.1 RC2 (Build 200804170002)
Java: 1.6.0_10-beta; Java HotSpot(TM) Client VM 11.0-b11
System: Windows XP version 5.1 running on x86; Cp1250; cs_CZ (nb)

Well, this happened to me too. The IDE was frozen, CPU 100%
I happened after working with code completion in a really small sample project ( I created new one, added just one
class. No additional libraries).

I started to type some word, like sys|  , togled code completion and deleted the "sys" (letter after letter, with the CC
still on). The CC was changing according to the current word. Then the IDE freezed. It happened again, after restarting
of the IDE, this time I did not deleted the letters in "sys" word, I just set the cursor to the start of the word by
arrow keys.
I am attaching the thread dump (But I am sorry, but it is probably not complete, although I copied all that was in the
console output)
Comment 19 pribyl 2008-04-25 10:34:12 UTC
Created attachment 60682 [details]
Thread dump
Comment 20 pribyl 2008-04-25 10:39:38 UTC
But it seems to be really random. I just started with new userdir, created the same project, tried the same approach and
it works smooth and fast :(
Comment 21 Jesse Glick 2008-04-25 16:09:13 UTC
The newly attached thread dumps do not even mention apisupport, so if you can reproduce even sometimes, probably better
to file a separate bug.
Comment 22 Dusan Balek 2008-04-25 16:36:08 UTC
The last thread dump is rather an #132864 incarnation. That should be fixed in the current dev build.
Comment 23 Jesse Glick 2008-04-25 20:39:18 UTC
Issue #132864 "Content of Copy to Folder editbox..." in php/project? Typo?
Comment 24 lttldrgn 2008-04-26 01:57:54 UTC
Though I was still seeing the original problem in 6.1beta, I stopped seeing the issue with 6.1 RC2.  In fact the latest
release is fantastic.  No more out of memory exceptions.  Good jobs NB developers.
Comment 25 Dusan Balek 2008-04-28 07:45:57 UTC
OOPS - #132863 is the correct issue number. Sorry.
Comment 26 Jesse Glick 2008-05-22 16:09:58 UTC
No clearly identifiable problem here. If future freezes occur, as usual file them with thread dumps and any steps to
reproduce that might be available.

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