Bug 202755 - [71cat] AssertionError at com.sun.tools.javac.util.Assert.error
[71cat] AssertionError at com.sun.tools.javac.util.Assert.error
Product: java
Classification: Unclassified
Component: Compiler
All All
: P2 (vote)
: 8.1
Assigned To: Dusan Balek
Depends on:
  Show dependency treegraph
Reported: 2011-09-27 20:26 UTC by javydreamercsw
Modified: 2015-09-09 16:42 UTC (History)
25 users (show)

See Also:
Issue Type: DEFECT

stacktrace (5.27 KB, text/plain)
2011-09-27 20:27 UTC, javydreamercsw
stacktrace (4.53 KB, text/plain)
2012-05-09 09:02 UTC, ehsavoie
stacktrace (3.80 KB, text/plain)
2012-11-26 16:59 UTC, sreimers
stacktrace (4.67 KB, text/plain)
2013-02-12 18:01 UTC, Jesse Glick
stacktrace (5.10 KB, text/plain)
2013-06-04 08:31 UTC, stefan79
stacktrace (4.67 KB, text/plain)
2013-06-17 22:34 UTC, Jesse Glick
stack-trace (4.42 KB, text/plain)
2013-09-20 11:11 UTC, Marian Petras
stacktrace (4.60 KB, text/plain)
2014-02-04 22:31 UTC, Jesse Glick
stacktrace (4.81 KB, text/plain)
2014-06-22 05:17 UTC, alied

Note You need to log in before you can comment on or make changes to this bug.
Description javydreamercsw 2011-09-27 20:26:58 UTC
Build: NetBeans IDE Dev (Build 201109260601)
VM: Java HotSpot(TM) Client VM, 21.0-b17, Java(TM) SE Runtime Environment, 1.7.0-b147
OS: Windows 7

User Comments:
javydreamercsw: Removing a module dependency from a module.

GUEST: Scanning a large project.

GUEST: opening a module

GUEST: scrolling with mouse

   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.jvm.Code$State.forceStackTop(Code.java:1723)
   at com.sun.tools.javac.jvm.Gen.visitConditional(Gen.java:1715)
   at com.sun.tools.javac.tree.JCTree$JCConditional.accept(JCTree.java:1113)
   at com.sun.tools.javac.jvm.Gen.genExpr(Gen.java:840)
Comment 1 javydreamercsw 2011-09-27 20:27:02 UTC
Created attachment 111257 [details]
Comment 2 Dusan Balek 2011-10-12 11:18:42 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 3 javydreamercsw 2011-10-12 17:34:17 UTC
As you can see from the reports it appears to happen randomly. I haven't seen it again on recent builds.
Comment 4 ehsavoie 2012-05-09 09:02:54 UTC
Created attachment 119192 [details]
Comment 5 sreimers 2012-11-26 16:59:24 UTC
Created attachment 128413 [details]
Comment 6 Jesse Glick 2013-02-12 18:01:47 UTC
Created attachment 131315 [details]
Comment 7 Jesse Glick 2013-02-12 18:02:34 UTC
Just happened to me in a dev build. Impossible to say how to reproduce; had switched Git branch and did a priming build from an external shell. When I came back to NB I saw this error mixed in with project scanning.
Comment 8 stefan79 2013-06-04 08:31:28 UTC
Created attachment 135304 [details]

Error occured while debugging (java) and then wheeling (mouse).
Comment 9 Jesse Glick 2013-06-17 22:34:49 UTC
Created attachment 135923 [details]

Editing a POM.
Comment 10 Marian Petras 2013-09-20 11:08:47 UTC
It happened when I saved the Java file that I just modified.
The code that I added immediately before I got the exception was:

	final AbstractPayment abstractPayment = getPayment();
	final Payment payment = (abstractPayment instanceof Payment)
	                        ? (Payment) abstractPayment
	                        : null;

(AbstractPayment is an abstract class, Payment is a direct non-abstract subclass of it.)

Product Version: NetBeans IDE 7.4 Dev (Build 201309180002)
Java: 1.7.0_40; Java HotSpot(TM) 64-Bit Server VM 24.0-b56
Runtime: Java(TM) SE Runtime Environment 1.7.0_40-b43
System: Windows 7 version 6.1 running on amd64; Cp1250; cs_CZ (nb)
Comment 11 Marian Petras 2013-09-20 11:11:29 UTC
Created attachment 140287 [details]

nb-javac-impl.jar used was the patched one that was attached to bug #230708 (attachment 140173 [details]).
Comment 12 Marian Petras 2013-09-20 12:38:55 UTC
I am sure that the use of the ternary operator makes the difference. I do not get the exception if I replace the statement

	final Payment payment = (abstractPayment instanceof Payment)
	                        ? (Payment) abstractPayment
	                        : null;

with a trivial statement:

	final Payment payment = null;

If I revert the code back to the use of ternary of-then-else operator, I get the exception again (after Save).

I tried to reproduce the bug in a simple J2SE application but did not succeed. The project that I get the exception on is a large Maven-based J2EE application and both Payment and AbstractPayment are entity classes with multiple methods, fields, JPA-related annotations etc. AbstractPayment and Payment are in one EJB module project, the code containing the critical part of code is in another EJB module project.
Comment 13 Marian Petras 2013-09-20 12:43:02 UTC
Dušan, if you provide a patched, debugging version of nb-javac-impl.jar, I will use it in hope that it would provide more diagnostic data.
Comment 14 Jesse Glick 2014-02-04 22:31:16 UTC
Created attachment 144806 [details]

Opened a Maven project with some missing dependencies and did a (clean) build of it while browsing sources.
Comment 15 alied 2014-06-22 05:17:57 UTC
Created attachment 147737 [details]

working with a very weird free form project
Comment 16 Marian Mirilovic 2015-02-04 10:27:06 UTC
112 duplicates -> P2
Comment 17 Dusan Balek 2015-04-22 07:47:16 UTC
Enhanced logging.

Comment 18 Dusan Balek 2015-09-08 11:58:17 UTC
There are no recent reports (the last came from build 141118) that should contain an enhanced logging information necessary to fix the issue (since there is no reproducible test case) so I'm asking for 8.1 WAIVER.
Comment 19 Jiri Kovalsky 2015-09-09 16:42:01 UTC
Bug waiver for 8.1 approved.

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