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 200970 - AssertionError at com.sun.tools.javac.util.Assert.error
Summary: AssertionError at com.sun.tools.javac.util.Assert.error
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Compiler (show other bugs)
Version: 7.0
Hardware: All All
: P1 normal with 2 votes (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-15 18:25 UTC by bondolo
Modified: 2017-05-27 03:32 UTC (History)
16 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 179675


Attachments
stacktrace (9.80 KB, text/plain)
2011-08-15 18:25 UTC, bondolo
Details
stacktrace (9.05 KB, text/plain)
2011-09-07 02:41 UTC, emiddio
Details
stacktrace (10.08 KB, text/plain)
2011-09-07 02:44 UTC, emiddio
Details
stacktrace (7.63 KB, text/plain)
2012-01-09 16:32 UTC, Jesse Glick
Details
stacktrace (9.80 KB, text/plain)
2014-04-04 14:37 UTC, Vladimir Voskresensky
Details
stacktrace (8.11 KB, text/plain)
2014-07-15 18:25 UTC, Jesse Glick
Details
stacktrace (7.97 KB, text/plain)
2014-09-16 13:33 UTC, Jesse Glick
Details
stacktrace (12.01 KB, text/plain)
2016-02-19 11:37 UTC, Alexander Simon
Details
stacktrace (10.25 KB, text/plain)
2016-10-12 12:58 UTC, ehsavoie
Details
stacktrace (15.56 KB, text/plain)
2016-11-09 08:40 UTC, ehsavoie
Details
stacktrace (15.72 KB, text/plain)
2016-11-15 10:19 UTC, ehsavoie
Details
stacktrace (9.34 KB, text/plain)
2016-11-29 10:24 UTC, nleck
Details

Note You need to log in before you can comment on or make changes to this bug.
Description bondolo 2011-08-15 18:25:52 UTC
Build: NetBeans IDE 7.0.1 (Build 201107282000)
VM: Java HotSpot(TM) Client VM, 21.0-b17, Java(TM) SE Runtime Environment, 1.7.0-b147
OS: Linux

User Comments:
bondolo: java 8 lambda source




Stacktrace: 
java.lang.AssertionError
   at com.sun.tools.javac.util.Assert.error(Assert.java:126)
   at com.sun.tools.javac.util.Assert.check(Assert.java:45)
   at com.sun.tools.javac.comp.Lower.access(Lower.java:1058)
   at com.sun.tools.javac.comp.Lower.visitIdent(Lower.java:3154)
   at com.sun.tools.javac.tree.JCTree$JCIdent.accept(JCTree.java:1710)
   at com.sun.tools.javac.tree.TreeTranslator.translate(TreeTranslator.java:58)
Comment 1 bondolo 2011-08-15 18:25:56 UTC
Created attachment 109990 [details]
stacktrace
Comment 2 emiddio 2011-09-07 02:41:07 UTC
Created attachment 110457 [details]
stacktrace
Comment 3 emiddio 2011-09-07 02:44:07 UTC
Created attachment 110458 [details]
stacktrace
Comment 4 Dusan Balek 2011-10-12 14:06:51 UTC
Hard to fix without a reproducible test case. Are you able to reproduce the
issue? If so, could you please create a simple test case and attach it to the
issue? Thanks.
Comment 5 bondolo 2011-10-12 16:52:39 UTC
You can use the j2se netbeans project which is part of the openjdk lambda project (http://hg.openjdk.java.net/lambda/lambda/jdk/). Unfortunately the error message doesn't give context to where the error is generated so I can't be more specific as to where the error is located.
Comment 6 Jesse Glick 2012-01-09 16:32:26 UTC
Created attachment 114737 [details]
stacktrace
Comment 7 Vladimir Voskresensky 2014-04-04 14:37:27 UTC
Created attachment 146557 [details]
stacktrace

opened jni.h file
Comment 8 Jesse Glick 2014-07-15 18:25:21 UTC
Created attachment 148074 [details]
stacktrace

Background scanning I guess.
Comment 9 Jesse Glick 2014-09-16 13:33:07 UTC
Created attachment 149258 [details]
stacktrace

Scanning completed.
Comment 10 Jesse Glick 2014-12-10 16:42:50 UTC
(In reply to Dusan Balek from comment #4)
> Hard to fix without a reproducible test case.

Surely you could start by making the assertion statement assert something specific about what is wrong? This exception happens to me on a more or less daily basis so it would not be long before you got some more details.
Comment 11 bondolo 2014-12-10 17:39:08 UTC
In(In reply to Jesse Glick from comment #10)
> (In reply to Dusan Balek from comment #4)
> > Hard to fix without a reproducible test case.
> 
> Surely you could start by making the assertion statement assert something
> specific about what is wrong? This exception happens to me on a more or less
> daily basis so it would not be long before you got some more details.

Indeed. This can still be trivially replicated with the j2se netbeans project in openjdk jdk8-dev. The Netbeans projects for JDK9 are different because of jigsaw modularization.
Comment 12 Jesse Glick 2015-10-02 14:28:09 UTC
Still happening four years later in a 20150921 dev build. Regardless of whether it is reproducible, an AssertionError with no detail message to continue diagnosis is something that should be fixed.
Comment 13 bondolo 2015-10-02 16:17:21 UTC
I have been able to replicate this fairly easily by switching between VCS branches without recompiling. It seems to be related to a mismatch between the  anonymous inner classes declared by the source vs the compiled bits vs the previously scanned source. Usually a "Clean and Build" will help resolve the problem but on occasion I have to blow away the scanned project cache:

rm -rf ~/Library/Application\ Support/NetBeans/8.1beta/var/log/* ~/Library/Caches/NetBeans/8.1beta/

Upon restarting the IDE things are generally much happier.

This is still rather annoying. Switching between git/hg branches using the same workspace should be smarter about clearing project scan caches.
Comment 14 Alexander Simon 2016-02-19 11:37:50 UTC
Created attachment 158567 [details]
stacktrace

open class
Comment 15 Alexander Simon 2016-02-19 11:45:55 UTC
82 reports => P1
Comment 16 ehsavoie 2016-10-12 12:58:30 UTC
Created attachment 162468 [details]
stacktrace

Building project
Comment 17 ehsavoie 2016-11-09 08:40:28 UTC
Created attachment 162839 [details]
stacktrace

Rebasing the currnt git branch
Comment 18 ehsavoie 2016-11-15 10:19:35 UTC
Created attachment 162916 [details]
stacktrace

recompiling the project on the console (maven build) and not in netbeans
Comment 19 nleck 2016-11-29 10:24:09 UTC
Created attachment 163073 [details]
stacktrace

running tests
Comment 21 Quality Engineering 2017-05-27 03:32:24 UTC
Integrated into 'main-silver', will be available in build *201705270001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/657a3e870b85
User: Dusan Balek <dbalek@netbeans.org>
Log: Issues #270696, #268429, #200970, and #257649 fixed.