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 268429 - NullPointerException at com.sun.tools.javac.jvm.Code.emitop0
Summary: NullPointerException at com.sun.tools.javac.jvm.Code.emitop0
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Compiler (show other bugs)
Version: 8.2
Hardware: All All
: P2 normal with 1 vote (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-09 16:22 UTC by mosca_morta
Modified: 2017-05-27 03:32 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 226656


Attachments
stacktrace (6.14 KB, text/plain)
2016-10-09 16:22 UTC, mosca_morta
Details
stacktrace (6.16 KB, text/plain)
2016-11-28 21:09 UTC, Jesse Glick
Details
stacktrace (6.16 KB, text/plain)
2016-12-05 17:24 UTC, Jesse Glick
Details
stacktrace (6.21 KB, text/plain)
2016-12-13 16:15 UTC, ytn01
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mosca_morta 2016-10-09 16:22:40 UTC
This bug was originally marked as duplicate of bug 246934, that is already resolved. This bug is still valid, so this seems to be another bug, but it might be related.

Build: NetBeans IDE 8.2 (Build 201609300101)
VM: Java HotSpot(TM) 64-Bit Server VM, 25.101-b13, Java(TM) SE Runtime Environment, 1.8.0_101-b13
OS: Mac OS X

User Comments:
mosca_morta: .




Stacktrace: 
java.lang.NullPointerException
   at com.sun.tools.javac.jvm.Code.emitop0(Code.java:558)
   at com.sun.tools.javac.jvm.Items$SelfItem.load(Items.java:367)
   at com.sun.tools.javac.jvm.Gen.genArgs(Gen.java:849)
   at com.sun.tools.javac.jvm.Gen.visitNewClass(Gen.java:1831)
   at com.sun.tools.javac.tree.JCTree$JCNewClass.accept(JCTree.java:1659)
   at com.sun.tools.javac.jvm.Gen.genExpr(Gen.java:830)
Comment 1 mosca_morta 2016-10-09 16:22:41 UTC
Created attachment 162408 [details]
stacktrace
Comment 2 Jesse Glick 2016-11-28 21:09:05 UTC
Created attachment 163061 [details]
stacktrace

Scanning Jenkins core sources.
Comment 3 Jesse Glick 2016-11-28 21:21:59 UTC
Trying to figure out if this is the bug which is causing the IDE to become barely usable for running tests in CoS mode: every time I try to do so, I get an error about some class missing a code attribute on a method. I think this is due to broken classpath scanning. Running a Maven clean build does not help, because cleaning generated sources triggers new IDE scanning that I cannot suppress, which overwrites valid class files with junk. Closing the project(s) and then running a clean build from an external shell allows me to use the right class files, but then makes the CoS part not work at all.
Comment 4 Jesse Glick 2016-12-05 17:24:07 UTC
Created attachment 163155 [details]
stacktrace

Classpath scanning.
Comment 5 Jesse Glick 2016-12-08 23:03:11 UTC
Does seem to be associated with broken CoS testing. Makes dev builds unsuitable for working on Jenkins core.
Comment 6 Jesse Glick 2016-12-09 18:10:12 UTC
Tried deleting my cache. Now I do not seem to get this; I get #200970 instead. I suppose that is an improvement.
Comment 7 Jesse Glick 2016-12-12 13:53:35 UTC
Got this again even after having deleted my cache recently, so it is not attributable merely to having ancient and broken class files lying around.

BTW the code triggering this seems to be github.com/jenkinsci/jenkins/core/src/main/java/jenkins/security/s2m/OpMatcher.java:

interface OpMatcher {
    boolean matches(String op);
    OpMatcher ALL = new OpMatcher() {
        @Override
        public boolean matches(String op) {
            return true;
        }
    };
}
Comment 8 ytn01 2016-12-13 16:15:47 UTC
Created attachment 163224 [details]
stacktrace

Installed IDE and launched it,
IDE asked to set master password ( I entered one)
IDE opened projects from last session (some java, maven, platform and web)
IDE started indexing maven repository

Then exception popped
Comment 9 Jesse Glick 2017-02-21 16:05:06 UTC
Last I checked this was consistently reproducible just by checking out github.com/jenkinsci/jenkins and opening all the modules.
Comment 10 Exceptions Reporter 2017-05-12 12:37:18 UTC
This bug already has 20 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=226656
Comment 12 Quality Engineering 2017-05-27 03:32:35 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.