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.
Under some circumstances com.sun.javadoc.Doc differs from document snapshot of javac. It appears to be caused by JavadocEnv.getRawCommentFor that computes javadoc content inside new JavaSource.runUserActionTask. This task may use javac with another document snapshot. My usecase is code running as a java source factory and calling e.g. Doc.getRawCommentText(). User modifies document before JavadocEnv.getRawCommentFor is invoked and as a consequence I get new javadoc. It seems that js factories do not share the same javac with JavaSource.runUserActionTask as in case of recursively invoked JavaSource.runUserActionTask.
*** Issue 139232 has been marked as a duplicate of this issue. ***
*** Issue 134122 has been marked as a duplicate of this issue. ***
*** Issue 138897 has been marked as a duplicate of this issue. ***
Build: NetBeans IDE Dev (Build 20080708124741) VM: Java HotSpot(TM) Client VM, 11.0-b13, Java(TM) SE Runtime Environment, 1.6.0_10-rc-b26 OS: Linux, 2.6.22-15-generic, i386 User Comments: ISE when staritng to write annotation for whole class. package javaa2; /** * * * @author jp159440 */ @ public class NewClass { }
Created attachment 64095 [details] stacktrace
java.source part fixed. changeset 2a47df2f7f6c in main/nb-javac details: http://hg.netbeans.org/main/nb-javac?cmd=changeset;node=2a47df2f7f6c changeset a5f6f5fd0090 in main details: http://hg.netbeans.org/main?cmd=changeset;node=a5f6f5fd0090
Build: NetBeans IDE Dev (Build 200807080009) VM: Java HotSpot(TM) Client VM, 11.0-b13, Java(TM) SE Runtime Environment, 1.6.0_10-rc-b26 OS: Linux, 2.6.24-19-generic, i386 User Comments: I created new (Persistence) entity class from database. When I opened the .java file, created from the db table (books.java), this Exception was thrown. (It happens regullary, even with NB restarted and clean userdir) TestSpec I followed: http://wiki.netbeans.org/TS_61_FormSimpleJTableDataBinding#section-TS_61_FormSimpleJTableDataBinding-TestSuiteJTableBindingUsingWizards
Created attachment 64163 [details] stacktrace
I have fixed the javadoc part as http://hg.netbeans.org/main/rev/a30cfd14baa6.
Integrated into 'main-golden', available in NB_Trunk_Production #309 build Changeset: http://hg.netbeans.org/main/rev/a5f6f5fd0090 User: Dusan Balek <dbalek@netbeans.org> Log: Issue #139147: JavadocEnv.getRawCommentFor is out of sync sometimes - partial fix.
*** Issue 139607 has been marked as a duplicate of this issue. ***
Reopening - reproduced in NetBeans IDE 6.5 Beta (Build 200808111757)
jddestouches: I cannot reproduce on test cases mentioned above. Please provide more details what you did reproduce.
confirming problem: still exists in NB 6.5: Product Version: NetBeans IDE Dev (Build 200811181401) Java: 1.6.0_10; Java HotSpot(TM) Client VM 11.0-b15 System: Linux version 2.6.24-21-generic running on i386; UTF-8; en_US (nb) I edited svn versioned file with more syntax/semantic errors. I will submit messages.log file
Created attachment 74000 [details] messages.log file
Reopening - reproduced in NetBeans IDE 6.5 (Build 200811100001) http://statistics.netbeans.org/exceptions/detail.do?id=47124
I would say last duplicates are slightly different issue. It does not relate to lazy loading of javadoc of elements comming from other files but the result is same. It is that Doc instance and javadoc token sequence are out of sync. I guess it is caused by syntactically corrupted source but I cannot find the case to reproduce the issue. Thus I have added more debugging info and I would like to ask everyone who will encounter the issue again to attach var/log/*.jddump files here or to send them by email to me if possible. What file to send is mentioned in details of the exception notification and in your var/log/messages.log. http://hg.netbeans.org/main/rev/04fdafb04e06
Integrated into 'main-golden', will be available in build *200902060201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/04fdafb04e06 User: Jan Pokorsky <jpokorsky@netbeans.org> Log: #139147: added debugging info to identify cases when Doc and javadoc token sequence are out of sync
I'm getting this. I can send you my dump file (offline). It seems to happen when I just edited in an EMPTY javadoc - e.g. I typed /** <caret> */ (or I may have deleted something to get to this state).
Yep, I just reproduced it. I had this: /** Foo */ I backspaced over Foo to get to /** ^ */ and it threw warnings.
By the way I'm seeing this with a 7.0 daily build fresh as of a day or two ago.
In 7.0 it can be caused by out dated snapshot.
tor: your dump file is not necessary. Your test case is reproducible. Unfortunately it is a false alarm. I did not realize that token sequence with white spaces results to trimmed string. I will tweak the check. Anyway thank you for the report.
tor: fixed as issue #159389
*** Issue 161272 has been marked as a duplicate of this issue. ***
Honza, there is couple additional comments in exceptions database ... see http://statistics.netbeans.org/exceptions/detail.do?id=47124
Yes, there is but I need a log from build 200903060201 or newer. There should be available dump files with details what is wrong.
The requested info was not provided and there is no new occurrence of this issue in build after nov 2008, so I guess it is fixed now
*** Issue 161134 has been marked as a duplicate of this issue. ***
Reopening. We have a reproducible test case now
Dusane, it looks that JavadocEnter creates wrong ClassDocImpl instance. The debugger shows that it passes docCommnet text as null for TestClass in JavadocEnter.visitClassDef(). Use following class to reproduce it: /* * To change this template, choose Tools | Templates * and open the template in the editor. */ /** * * @author a */ @Deprecated public class TestClass { } The file content snapshot and TokenHierarchy seem to be OK. See http://www.netbeans.org/nonav/issues/showattachment.cgi/78840/TestClass_4.jddump
Fixed in jet-main. http://hg.netbeans.org/jet-main/rev/91a2c2a3a2f9 changeset 0407d629b1af in main/nb-javac details: http://hg.netbeans.org/main/nb-javac?cmd=changeset;node=0407d629b1af
Integrated into 'main-golden', will be available in build *200904100201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/91a2c2a3a2f9 User: Dusan Balek <dbalek@netbeans.org> Log: Issue #139147: JavadocEnv.getRawCommentFor is out of sync sometimes - fixed.
I'm still able to reproduce this issue in latest build NetBeans IDE Dev (Build 200904141401) use this code in Java file - : -------------------- /** * and open the template in the editor. */ package javaapplication1; /** * * @author jindra */ public class Main { } --------------------------
Second attempt pushed to jet-main. changeset 9be8ec15ad39 in main/nb-javac details: http://hg.netbeans.org/main/nb-javac?cmd=changeset;node=9be8ec15ad39
Got again in 2009 04 22 0201 To reproduce: 1) Have a method which is fairly simple 2) Go to where the editor would insert javadoc if /** [enter] were typed 3) Type /** (space) (space) **/ [enter] illegal state exception In context: /** **/ public long till(){ return Math.max(when - System.currentTimeMillis(), 0); }
Created attachment 80813 [details] Dump file 1/15
Changed to P1 as this does not go away, keeps throwing and throwing. Produced 16 dump files, will upload a few...
Created attachment 80815 [details] Dump file 15/15
Honzo, empty javadoc is returned correctly in this case (additional stars are skipped).
I will have a look at it.
fixed http://hg.netbeans.org/jet-main/rev/cd41abea3de9 As a workaround do not use multiple trailing asterisks in javadocs. /** */ works properly.
Integrated into 'main-golden', will be available in build *200904250201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/cd41abea3de9 User: Jan Pokorsky <jpokorsky@netbeans.org> Log: #139147: javadoc parser considers white spaces + trailing asterisks as empty javadoc /** **/
I just ran across this bug in Netbeans 6.7 final. Please see http://statistics.netbeans.org/analytics/exception.do?id=230573 for more information. Please note I do not recall what I did to trigger this issue.
None of the reports are coming from the post 6.7 builds --> making it P2 instead of P1 and waiting for furhter reports.
not reproducible in current trunk, looks like its fixed.
Reproduced in dev build 200910160201
Created attachment 89662 [details] build 200910160201 messages.log
Created attachment 89663 [details] build 200910160201 dump file
The following code triggered this issue: /** * Reloads the device state. * * @param <A> the attachment type * @param completionHandler invoked when the operation completes * @param attachment user-object passed to the completion handler */ public void final CompletionHandler<Void, A> completionHandler, final A attachment) Granted, the method signature is invalid but it should not cause Netbeans to fail.
Honzo, Dusane, could you guys please have a look? Thanks
gtzabari: Thanks a lot for the reproducible test case. We will investigate what's wrong.
reproducible
gtzabari's test case has been fixed as issue #174864. There are further reports from tmhealy, bburette and others but without requested .jddump files it is impossible to fix them. Closing as INCOMPLETE for now.
*** Bug 158726 has been marked as a duplicate of this bug. ***
type before the invalid code fragment: /** [enter] public void final CompletionHandler<Void, A> completionHandler, final A attachment) java.lang.IllegalStateException: Please attach dump file file:/Users/noel/.netbeans/dev/var/log/T_5.jddump to bug. at org.netbeans.modules.java.editor.javadoc.JavadocCompletionUtils.dumpOutOfSyncError(JavadocCompletionUtils.java:511) at org.netbeans.modules.java.editor.javadoc.JavadocCompletionUtils.findJavadoc(JavadocCompletionUtils.java:192) at org.netbeans.modules.java.editor.javadoc.JavadocImports.findReferencedElement(JavadocImports.java:287) at org.netbeans.modules.java.editor.semantic.MarkOccurrencesHighlighter.processImpl(MarkOccurrencesHighlighter.java:372) at org.netbeans.modules.java.editor.semantic.MarkOccurrencesHighlighter.run(MarkOccurrencesHighlighter.java:153) at org.netbeans.modules.parsing.impl.TaskProcessor$CompilationJob.run(TaskProcessor.java:654) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:417) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269) at java.util.concurrent.FutureTask.run(FutureTask.java:123) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:651) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:676)
Created attachment 93278 [details] dump file
(In reply to comment #58) > Created an attachment (id=93278) [details] > dump file It looks like when a method declaration contains an error the tree does not contain method's javadoc. This causes the tree-vs-tokensequence consistency check to generate a false alarm. It is consistently reproducible with the java class from the above attachment in recent 6.9dev builds. I'm trading this issue with tzezula for issue #180581.
Next case fixed. fixed in jet-main: 0c62c91780b1
Integrated into 'main-golden', will be available in build *201002170200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/0c62c91780b1 User: Tomas Zezula <tzezula@netbeans.org> Log: #139147:JavadocEnv.getRawCommentFor is out of sync sometimes