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 178095 - [68cat] IllegalStateException: Please attach dump file file:/C:/Documents%20and%20Settings/ersmith/.netbeans/dev/var/log/EDFApprovalTypeBean.jddump to bug.
Summary: [68cat] IllegalStateException: Please attach dump file file:/C:/Documents%20a...
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Compiler (show other bugs)
Version: 6.x
Hardware: All All
: P3 normal (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks: 139147
  Show dependency tree
 
Reported: 2009-12-03 11:01 UTC by esmithbss
Modified: 2010-01-06 00:43 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 163297


Attachments
stacktrace (3.04 KB, text/plain)
2009-12-03 11:01 UTC, esmithbss
Details
stacktrace (3.04 KB, text/plain)
2009-12-03 11:06 UTC, esmithbss
Details
stacktrace (3.04 KB, text/plain)
2009-12-03 11:07 UTC, esmithbss
Details
jddump file (6.25 KB, application/octet-stream)
2009-12-03 11:11 UTC, esmithbss
Details
jddump (6.26 KB, application/octet-stream)
2009-12-03 11:12 UTC, esmithbss
Details
jddump (6.23 KB, application/octet-stream)
2009-12-03 11:12 UTC, esmithbss
Details
jddump (4.59 KB, application/octet-stream)
2009-12-03 11:12 UTC, esmithbss
Details
stacktrace (3.58 KB, text/plain)
2009-12-17 02:21 UTC, Exceptions Reporter
Details

Note You need to log in before you can comment on or make changes to this bug.
Description esmithbss 2009-12-03 11:01:19 UTC
Build: NetBeans IDE Dev (Build 200911291400)
VM: Java HotSpot(TM) Client VM, 14.3-b01, Java(TM) SE Runtime Environment, 1.6.0_17-b04
OS: Windows XP, 5.1, x86

User Comments:
esmithbss: Editing a Java Bean File.



Stacktrace: 
java.lang.IllegalStateException: Please attach dump file file:/C:/Documents%20and%20Settings/ersmith/.netbeans/dev/var/log/EDFApprovalTypeBean.jddump to bug.
        at org.netbeans.modules.java.editor.javadoc.JavadocCompletionUtils.dumpOutOfSyncError(JavadocCompletionUtils.java:511)
        at org.netbeans.modules.java.editor.javadoc.JavadocCompletionUtils.dumpOutOfSyncError(JavadocCompletionUtils.java:593)
        at org.netbeans.modules.java.editor.javadoc.DocPositions$DocPositionsManager.get(DocPositions.java:520)
        at org.netbeans.modules.java.editor.javadoc.DocPositions.get(DocPositions.java:86)
        at org.netbeans.modules.java.editor.javadoc.JavadocImports.computeReferencedElements(JavadocImports.java:116)
        at org.netbeans.modules.java.editor.semantic.SemanticHighlighter$DetectorVisitor.handleJavadoc(SemanticHighlighter.java:736)
Comment 1 esmithbss 2009-12-03 11:01:23 UTC
Created attachment 92060 [details]
stacktrace
Comment 2 esmithbss 2009-12-03 11:06:25 UTC
Created attachment 92061 [details]
stacktrace
Comment 3 esmithbss 2009-12-03 11:07:27 UTC
Created attachment 92062 [details]
stacktrace
Comment 4 esmithbss 2009-12-03 11:11:43 UTC
Created attachment 92063 [details]
jddump file
Comment 5 esmithbss 2009-12-03 11:12:01 UTC
Created attachment 92065 [details]
jddump
Comment 6 esmithbss 2009-12-03 11:12:20 UTC
Created attachment 92066 [details]
jddump
Comment 7 esmithbss 2009-12-03 11:12:37 UTC
Created attachment 92067 [details]
jddump
Comment 8 esmithbss 2009-12-03 11:15:00 UTC
This appears to be generated when you cut and paste an entire class from one file into another file without overwriting the existing class definition.

i.e.:

1) I generated a new java class (to get the formatting, etc...).

2) Copied the contents of an existing file into the new class file as an insert operation below the package line, but above the class definition.

3) I started editing the pasted class by changing the classes name to the file's class name.
Comment 9 Jiri Prox 2009-12-07 03:20:02 UTC
reproducible


java.lang.ArrayIndexOutOfBoundsException: 0
	at org.netbeans.modules.java.editor.javadoc.DocPositions.addBlockTag(DocPositions.java:278)
	at org.netbeans.modules.java.editor.javadoc.DocPositions.resolve(DocPositions.java:166)
Caused: java.lang.IllegalStateException: ''
org.netbeans.modules.java.editor.javadoc.DocPositions@fefcce
token sequence dump: TokenSequence for text/x-java/text/x-javadoc at tokenIndex=1. TokenList contains 5 tokens:
T[0]: "\n *\n * " <160,167> OTHER_TEXT[5] DefT, IHC=30713183
*[1]: "@author" <167,174> TAG[1] DefT, IHC=28646030
T[2]: " " <174,175> OTHER_TEXT[5] DefT, IHC=14846077
T[3]: "jp159440" <175,183> IDENT[0] DefT, IHC=7265680
T[4]: "\n " <183,185> OTHER_TEXT[5] DefT, IHC=9715748


	at org.netbeans.modules.java.editor.javadoc.DocPositions.resolve(DocPositions.java:194)
	at org.netbeans.modules.java.editor.javadoc.DocPositions.getTags(DocPositions.java:127)
	at org.netbeans.modules.java.editor.javadoc.JavadocImports.computeReferencedElements(JavadocImports.java:118)
	at org.netbeans.modules.java.editor.semantic.SemanticHighlighter$DetectorVisitor.handleJavadoc(SemanticHighlighter.java:736)
	at org.netbeans.modules.java.editor.semantic.SemanticHighlighter$DetectorVisitor.visitClass(SemanticHighlighter.java:1348)
	at org.netbeans.modules.java.editor.semantic.SemanticHighlighter$DetectorVisitor.visitClass(SemanticHighlighter.java:449)
	at com.sun.tools.javac.tree.JCTree$JCClassDecl.accept(JCTree.java:604)
	at com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:67)
	at org.netbeans.api.java.source.support.CancellableTreePathScanner.scan(CancellableTreePathScanner.java:91)
	at com.sun.source.util.TreeScanner.scanAndReduce(TreeScanner.java:80)
	at com.sun.source.util.TreeScanner.scan(TreeScanner.java:90)
	at org.netbeans.api.java.source.support.CancellableTreePathScanner.scan(CancellableTreePathScanner.java:100)
	at org.netbeans.modules.java.editor.semantic.SemanticHighlighter$DetectorVisitor.visitCompilationUnit(SemanticHighlighter.java:801)
	at org.netbeans.modules.java.editor.semantic.SemanticHighlighter$DetectorVisitor.visitCompilationUnit(SemanticHighlighter.java:449)
	at com.sun.tools.javac.tree.JCTree$JCCompilationUnit.accept(JCTree.java:482)
	at com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:67)
	at org.netbeans.api.java.source.support.CancellableTreePathScanner.scan(CancellableTreePathScanner.java:91)
	at org.netbeans.modules.java.editor.semantic.SemanticHighlighter.process(SemanticHighlighter.java:288)
	at org.netbeans.modules.java.editor.semantic.SemanticHighlighter.process(SemanticHighlighter.java:265)
	at org.netbeans.modules.java.editor.semantic.SemanticHighlighter.run(SemanticHighlighter.java:203)
	at org.netbeans.modules.parsing.impl.TaskProcessor$CompilationJob.run(TaskProcessor.java:654)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
[catch] at java.lang.Thread.run(Thread.java:619)
Comment 10 Max Sauer 2009-12-07 05:54:06 UTC
Honzo, please have a look. Thanks.
Comment 11 Exceptions Reporter 2009-12-17 02:12:46 UTC
This bug already has 5 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=163297
Comment 12 Exceptions Reporter 2009-12-17 02:21:47 UTC
Created attachment 92694 [details]
stacktrace

Just opening any .java file for editing..  here the .jddump file :
Out of sync error: source file file:/D:/VSS/33I080002_WebHMI_P2/dis/jhmi/test/module/junit/fasttools/jhmi/set/actionui/NameSpaceManagerTest.java
----- Element: -------------------------------------------------------
kind: METHOD, createItems(fasttools.jhmi.set.actionui.IActionResource,java.lang.String[])
----- Tree: -------------------------------------------------------
kind: METHOD
 
private StructureItem[] createItems(IActionResource resource, String[] strings) {
    StructureItem[] mItems = new StructureItem[strings.length];
    for (int t = 0; t < strings.length; t++) {
        try {
            mItems[t] = new StructureItem(resource, strings[t]);
        } catch (URISyntaxException ex) {
            Assert.fail("Failed, but not part of this test");
        }
    }
    return mItems;
}
----- Offset: -------------------------------------------------------
offset: 4092
----- Token sequence: --------------------------
Comment 13 Jan Pokorsky 2009-12-17 06:00:26 UTC
(In reply to comment #8)
> This appears to be generated when you cut and paste an entire class from one
> file into another file without overwriting the existing class definition.
> 
> i.e.:
> 
> 1) I generated a new java class (to get the formatting, etc...).
> 
> 2) Copied the contents of an existing file into the new class file as an insert
> operation below the package line, but above the class definition.
> 
> 3) I started editing the pasted class by changing the classes name to the
> file's class name.

Thank you very much for .jddump file. Yes in your case the exception arises when the file contains 2 top level classes with the same name.
Comment 14 Jan Pokorsky 2010-01-05 05:39:42 UTC
Using the debugger I have found out that com.sun.tools.javadoc.JavadocEnter does not make a ClassDoc instance in case of erroneous duplicate of top level class (tree.sym.kind != Kinds.TYP). It is opposite what JavacElements.getDocComment returns. IMO both method should be consistent to return null or real javadoc. Me as a java source api client cannot access tree.sym.kind to detect something is wrong as Element.getKind returns CLASS for both top level classes. Reassigning.
Comment 15 Dusan Balek 2010-01-05 07:32:53 UTC
Fixed in jet-main.

http://hg.netbeans.org/jet-main/rev/aa35bd368f17

changeset 3d7ebb1cfb55 in main/nb-javac
details: http://hg.netbeans.org/main/nb-javac?cmd=changeset;node=3d7ebb1cfb55
Comment 16 Quality Engineering 2010-01-06 00:43:19 UTC
Integrated into 'main-golden', will be available in build *201001060200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/aa35bd368f17
User: Dusan Balek <dbalek@netbeans.org>
Log: Issue #178095 fixed.