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.
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 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.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)
Created attachment 111257 [details] stacktrace
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.
As you can see from the reports it appears to happen randomly. I haven't seen it again on recent builds.
Created attachment 119192 [details] stacktrace
Created attachment 128413 [details] stacktrace
Created attachment 131315 [details] stacktrace
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.
Created attachment 135304 [details] stacktrace Error occured while debugging (java) and then wheeling (mouse).
Created attachment 135923 [details] stacktrace Editing a POM.
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)
Created attachment 140287 [details] stack-trace nb-javac-impl.jar used was the patched one that was attached to bug #230708 (attachment 140173 [details]).
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.
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.
Created attachment 144806 [details] stacktrace Opened a Maven project with some missing dependencies and did a (clean) build of it while browsing sources.
Created attachment 147737 [details] stacktrace working with a very weird free form project
112 duplicates -> P2
Enhanced logging. http://hg.netbeans.org/nb-javac/rev/3fa2d0a790fb
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.
Bug waiver for 8.1 approved.
Created attachment 159158 [details] stacktrace Sources externally updated.
Created attachment 159221 [details] stacktrace When sources were updated externally.
Created attachment 159223 [details] stacktrace just git pulled new modifications in java files
Created attachment 159246 [details] stacktrace While scanning.
Created attachment 159301 [details] stacktrace Moved a class
Created attachment 159370 [details] stacktrace Opened spi.palette
Created attachment 159469 [details] stacktrace external update of sources
Should be fixed together with #258733.