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

NPE in ProceedOnErrorGen.visitAssign #1104

Closed
akurtakov opened this issue Jan 9, 2025 · 2 comments
Closed

NPE in ProceedOnErrorGen.visitAssign #1104

akurtakov opened this issue Jan 9, 2025 · 2 comments

Comments

@akurtakov
Copy link

Didn't manage to narrow the case but it happens multiple times with eclipse.platform.ui workspace:

!ENTRY org.eclipse.jdt.core 4 0 2025-01-09 22:21:40.876
!MESSAGE Cannot read field "type" because "tree" is null
!STACK 0
java.lang.NullPointerException: Cannot read field "type" because "tree" is null
	at jdk.compiler/com.sun.tools.javac.jvm.Gen.genExpr(Gen.java:847)
	at jdk.compiler/com.sun.tools.javac.jvm.Gen.visitAssign(Gen.java:2097)
	at org.eclipse.jdt.internal.javac.ProceedOnErrorGen.visitAssign(ProceedOnErrorGen.java:124)
	at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCAssign.accept(JCTree.java:2101)
	at jdk.compiler/com.sun.tools.javac.jvm.Gen.genExpr(Gen.java:859)
	at jdk.compiler/com.sun.tools.javac.jvm.Gen.visitExec(Gen.java:1802)
	at org.eclipse.jdt.internal.javac.ProceedOnErrorGen.visitExec(ProceedOnErrorGen.java:115)
	at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCExpressionStatement.accept(JCTree.java:1644)
	at jdk.compiler/com.sun.tools.javac.jvm.Gen.genDef(Gen.java:588)
	at jdk.compiler/com.sun.tools.javac.jvm.Gen.genStat(Gen.java:623)
	at jdk.compiler/com.sun.tools.javac.jvm.Gen.genStat(Gen.java:609)
	at jdk.compiler/com.sun.tools.javac.jvm.Gen.genStats(Gen.java:660)
	at jdk.compiler/com.sun.tools.javac.jvm.Gen.internalVisitBlock(Gen.java:1121)
	at jdk.compiler/com.sun.tools.javac.jvm.Gen.visitBlock(Gen.java:1085)
	at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCBlock.accept(JCTree.java:1133)
	at jdk.compiler/com.sun.tools.javac.jvm.Gen.genDef(Gen.java:588)
	at jdk.compiler/com.sun.tools.javac.jvm.Gen.genStat(Gen.java:623)
	at jdk.compiler/com.sun.tools.javac.jvm.Gen.genMethod(Gen.java:949)
	at jdk.compiler/com.sun.tools.javac.jvm.Gen.visitMethodDef(Gen.java:912)
	at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCMethodDecl.accept(JCTree.java:957)
	at jdk.compiler/com.sun.tools.javac.jvm.Gen.genDef(Gen.java:588)
	at jdk.compiler/com.sun.tools.javac.jvm.Gen.genClass(Gen.java:2494)
	at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.genCode(JavaCompiler.java:770)
	at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.generate(JavaCompiler.java:1700)
	at org.eclipse.jdt.internal.javac.JavacCompiler$2.generate(JavacCompiler.java:161)
	at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.generate(JavaCompiler.java:1668)
	at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:977)
	at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:897)
	at org.eclipse.jdt.internal.javac.JavacCompiler.compile(JavacCompiler.java:193)
	at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:441)
	at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.compile(BatchImageBuilder.java:250)
	at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:372)
	at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.build(BatchImageBuilder.java:118)
	at org.eclipse.jdt.internal.core.builder.JavaBuilder.buildAll(JavaBuilder.java:317)
	at org.eclipse.jdt.internal.core.builder.JavaBuilder.build(JavaBuilder.java:220)
	at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:1077)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:47)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:296)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:352)
	at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:441)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:47)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:444)
	at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:555)
	at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:503)
	at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:585)
	at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:207)
	at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:300)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
@mickaelistria
Copy link

We could just add some extra checks but I'm not sure it'd be suitable. I suggest we leave it open for a few days to capture some potential examples to reproduce.

@mickaelistria
Copy link

This one was probably fixed with #1152

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants