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 106871 - ide hangs at 100% cpu after code gen followed by navigate to source
Summary: ide hangs at 100% cpu after code gen followed by navigate to source
Status: VERIFIED WORKSFORME
Alias: None
Product: uml
Classification: Unclassified
Component: Code Generation (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: Viktor Lapitski
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-06-15 19:42 UTC by Peter Lam
Modified: 2007-08-24 01:32 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
thread dump for the hang (13.41 KB, text/plain)
2007-06-15 19:43 UTC, Peter Lam
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Lam 2007-06-15 19:42:33 UTC
in build netbeans-hudson-trunk-733-full.zip (070614) and also happened in earlier builds too.

This issue happened a few times already but was not able to get a consistent reproducible case. However, the problem
occurred when I was doing the following, especially on the enumeration class.

- create a class diagram
- add and name an enumeration element on the diagram
- generate code for the element
- navigate to source
- add a literal to the element
- regenerate code
- navigate to source again
Result: source has never been seen but ide hangs at 100% of cpu cycle indefinitely
See attached for a thread dump.
Comment 1 Peter Lam 2007-06-15 19:43:05 UTC
Created attachment 43811 [details]
thread dump for the hang
Comment 2 Peter Lam 2007-06-15 20:00:05 UTC
Looks like I can get into it a bit easier now.
After I restarted ide, I expanded the uml project and did a navigate to source on a previously generated Enumeration
element. Once the source editor opens to display the enumeration source with something like the following, I click my
mouse pointer on the source and the ide starts to hover at 99-100% cpu. This happened 3 out of 5 times. The command
console window shows the following message when I clicked on the source.

// <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
// #[regen=yes,id=DCE.23732E85-F3A7-879D-B64E-8A6AF2C06D9E]
// </editor-fold> 
public enum Enum10 {

    A, B, C;

}


message from command console window:

WARNING [org.netbeans.api.java.source.JavaSource]: JavaSource.runUserActionTask
called in AWT event thread by: org.netbeans.modules.uml.integration.netbeans.NBF
ileUtils.getTypeElement(NBFileUtils.java:536)
WARNING [org.openide.loaders]: Should override getLookup() in class org.netbeans
.modules.java.JavaDataObject, e.g.: [MultiDataObject.this.]getCookieSet().getLoo
kup()
WARNING [org.netbeans.api.java.source.JavaSource]: JavaSource.runUserActionTask
called in AWT event thread by: org.netbeans.api.java.source.UiUtils.getOffset(Ui
Utils.java:334)
WARNING [org.openide.loaders]: Should override getLookup() in class org.openide.
loaders.InstanceDataObject, e.g.: [MultiDataObject.this.]getCookieSet().getLooku
p()
WARNING [org.openide.loaders]: Should override getLookup() in class org.openide.
loaders.DefaultDataObject, e.g.: [MultiDataObject.this.]getCookieSet().getLookup
()
WARNING [org.openide.loaders]: Should override getLookup() in class org.openide.
loaders.DataShadow, e.g.: [MultiDataObject.this.]getCookieSet().getLookup()
WARNING [org.netbeans.modules.j2ee.metadata.model.api.support.annotation.Annotat
ionScanner]: findAnnotatedTypes: could not find type javax.persistence.Entity
WARNING [org.netbeans.api.java.source.JavaSource]: JavaSource.runUserActionTask
called in AWT event thread by: org.netbeans.modules.editor.java.JavaCodeTemplate
Filter.<init>(JavaCodeTemplateFilter.java:63)
Comment 3 Peter Lam 2007-06-15 20:01:26 UTC
Other times that did not happen when I clicked on the sources but if I just moved the mouse to select the enum source,
it started to hover.
Comment 4 Viktor Lapitski 2007-06-21 00:23:31 UTC
need more info as i can't reproduce it myself; something like 
more reproducible test case.
According to the thread dump the cycle that is going forever 
is in java editor hints module and supposed to be finite. 
It looks like be a bug there that makes it going forever, yet 
without a good reproducible case it is hardly possible to tell 
anything specific.
Comment 5 Peter Lam 2007-06-21 00:48:02 UTC
Using today's build netbeans-hudson-trunk-997-full.zip (070620), the issue is no longer reproducible now. Maybe it's
fixed somewhere. Will re-open when the problem occurs again.
Comment 6 Peter Lam 2007-08-24 01:32:38 UTC
verified issue no longer exists in build 070823.