Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Commit validation tests fail on 19ea #4299

Closed
mbien opened this issue Jun 30, 2022 · 1 comment
Closed

Commit validation tests fail on 19ea #4299

mbien opened this issue Jun 30, 2022 · 1 comment
Labels
kind:bug Bug report or fix tests

Comments

@mbien
Copy link
Member

mbien commented Jun 30, 2022

The tests were running in headless mode until #4233, while switching the xserver on, I noticed that the commit validation tests started to fail on 19ea (locally reproducible too) (11, 17, 18 works fine).

org.netbeans.modules.ide.kit.VerifySimpleTemplatesTest fails on 19ea with:

    [junit] An error occurred during parsing of '/home/runner/work/netbeans/netbeans/ide/ide.kit/build/test/qa-functional/work/o.n.m.i.k.V/at/Test41.java'. Please report a bug against java/source and attach dump file '/home/runner/work/netbeans/netbeans/ide/ide.kit/build/test/qa-functional/work/userdir0/var/log/Test41.dump'.
    [junit] Caused: java.lang.NullPointerException: Cannot read field "tsym" because "imp.qualid.selected.type" is null
    [junit] 	at com.sun.tools.javac.comp.Check.checkImportedPackagesObservable(Check.java:4031)
    [junit] 	at com.sun.tools.javac.comp.TypeEnter.finishImports(TypeEnter.java:229)
    [junit] 	at com.sun.tools.javac.comp.TypeEnter.complete(TypeEnter.java:214)
    [junit] 	at com.sun.tools.javac.code.Symbol.complete(Symbol.java:682)
    [junit] 	at com.sun.tools.javac.code.Symbol$ClassSymbol.complete(Symbol.java:1410)
    [junit] 	at com.sun.tools.javac.comp.Enter.complete(Enter.java:610)
    [junit] 	at com.sun.tools.javac.comp.Enter.main(Enter.java:587)
    [junit] 	at com.sun.tools.javac.main.JavaCompiler.enterTrees(JavaCompiler.java:1042)
    [junit] 	at com.sun.tools.javac.api.JavacTaskImpl.enter(JavacTaskImpl.java:345)
    [junit] 	at com.sun.tools.javac.api.JavacTaskImpl.enter(JavacTaskImpl.java:282)
    [junit] 	at org.netbeans.modules.java.source.parsing.JavacParser.moveToPhase(JavacParser.java:747)
    [junit] 	at org.netbeans.modules.java.source.parsing.JavacParser.getResult(JavacParser.java:540)
    [junit] 	at org.netbeans.modules.java.source.parsing.JavacParser.getResult(JavacParser.java:141)
    [junit] 	at org.netbeans.modules.parsing.impl.TaskProcessor.callGetResult(TaskProcessor.java:608)
    [junit] 	at org.netbeans.modules.parsing.impl.SourceCache.getResult(SourceCache.java:241)
    [junit] 	at org.netbeans.modules.parsing.impl.TaskProcessor$RequestPerformer.run(TaskProcessor.java:775)
    [junit] 	at org.openide.util.lookup.Lookups.executeWith(Lookups.java:279)
    [junit] 	at org.netbeans.modules.parsing.impl.TaskProcessor$RequestPerformer.execute(TaskProcessor.java:702)
    [junit] [catch] at org.netbeans.modules.parsing.impl.TaskProcessor$CompilationJob.run(TaskProcessor.java:663)
    [junit] 	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:577)
    [junit] 	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
    [junit] 	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418)
    [junit] 	at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45)
    [junit] 	at org.openide.util.lookup.Lookups.executeWith(Lookups.java:278)
    [junit] 	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)

The test should be using nb-javac, however it appears as if 19ea javac is used anyway?

we saw this before in travis: #3862 (comment)

There is another interesting warnings in the log which might be related to the issue:
17, 18 and 19 all have this, no matter if in headless mode or not:

    [junit] WARNING: Unknown module: jdk.compiler specified to --add-exports
    [junit] WARNING: Unknown module: jdk.compiler specified to --add-opens

The module is obviously there. I suppose the boot classpath is tweaked at some point.

@mbien mbien added the kind:bug Bug report or fix label Jun 30, 2022
@mbien mbien added the tests label Jun 30, 2022
mbien added a commit to mbien/netbeans that referenced this issue Jul 2, 2022
enable xserver for for all JDKs except 19-ea due to:

NPE in org.netbeans.modules.ide.kit.VerifySimpleTemplatesTest
Caused: java.lang.NullPointerException: Cannot read field
        "tsym" because "imp.qualid.selected.type" is null

see apache#4299
mbien added a commit to mbien/netbeans that referenced this issue Jul 2, 2022
enable xserver for for all JDKs except 19-ea due to:

NPE in org.netbeans.modules.ide.kit.VerifySimpleTemplatesTest
Caused: java.lang.NullPointerException: Cannot read field
        "tsym" because "imp.qualid.selected.type" is null

see apache#4299
@mbien
Copy link
Member Author

mbien commented Dec 19, 2022

no longer reproducible in #5122 (20ea, nb-javac 19)

@mbien mbien closed this as completed Dec 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bug Bug report or fix tests
Projects
None yet
Development

No branches or pull requests

1 participant