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

[23][dom ast][rewrite] Random NPE in ASTRewritingModifyingMoveTest #3499

Open
mpalat opened this issue Dec 31, 2024 · 4 comments
Open

[23][dom ast][rewrite] Random NPE in ASTRewritingModifyingMoveTest #3499

mpalat opened this issue Dec 31, 2024 · 4 comments
Labels
bug Something isn't working build test failure Unit Test failures in builds - maynot be a regression caused by the previous change regression Something was broken by a previous change test Work on unit tests, no change of productive code
Milestone

Comments

@mpalat
Copy link
Contributor

mpalat commented Dec 31, 2024

Initial Info:

Ref:https://download.eclipse.org/eclipse/downloads/drops4/I20241230-0520/testresults/html/org.eclipse.jdt.core.tests.model_ep435I-unit-linux-x86_64-java23_linux.gtk.x86_64_23.html

test0002 - fails test0009
org.eclipse.jdt.core.tests.rewrite.modifying.ASTRewritingModifyingCopyTest | test0002 | Error | N/Ajava.lang.NullPointerException

These tests pass in the previous I Build - I20241229-1800

@mpalat mpalat added bug Something isn't working regression Something was broken by a previous change labels Dec 31, 2024
@mpalat mpalat added this to the 4.35 M1 milestone Dec 31, 2024
@mpalat mpalat changed the title NPE in ASTRewritingModifyingMoveTest - I20241230-0520 [dom ast][rewrite] NPE in ASTRewritingModifyingMoveTest - I20241230-0520 Dec 31, 2024
@mpalat
Copy link
Contributor Author

mpalat commented Dec 31, 2024

@subyssurendran666 Can you please take a look?

@mpalat
Copy link
Contributor Author

mpalat commented Jan 2, 2025

The tests are back to normal in the runs after that - closing it for now

@mpalat mpalat closed this as completed Jan 2, 2025
@jukzi
Copy link
Contributor

jukzi commented Jan 8, 2025

3 tests failing again in
https://download.eclipse.org/eclipse/downloads/drops4/I20250108-0430/testresults/html/org.eclipse.jdt.core.tests.model_ep435I-unit-linux-x86_64-java23_linux.gtk.x86_64_23.html

java.lang.NullPointerException: Cannot invoke "org.eclipse.jdt.core.dom.rewrite.TargetSourceRangeComputer$SourceRange.getStartPosition()" because "range" is null
at org.eclipse.jdt.internal.core.dom.rewrite.ASTRewriteAnalyzer.getExtendedEnd(ASTRewriteAnalyzer.java:264)
at org.eclipse.jdt.internal.core.dom.rewrite.ASTRewriteAnalyzer.doVisit(ASTRewriteAnalyzer.java:420)
at org.eclipse.jdt.internal.core.dom.rewrite.ASTRewriteAnalyzer.voidVisitList(ASTRewriteAnalyzer.java:457)
at org.eclipse.jdt.internal.core.dom.rewrite.ASTRewriteAnalyzer.voidVisit(ASTRewriteAnalyzer.java:451)
at org.eclipse.jdt.internal.core.dom.rewrite.ASTRewriteAnalyzer.doVisitUnchangedChildren(ASTRewriteAnalyzer.java:464)
at org.eclipse.jdt.internal.core.dom.rewrite.ASTRewriteAnalyzer.visit(ASTRewriteAnalyzer.java:2971)
at org.eclipse.jdt.core.dom.FieldDeclaration.accept0(FieldDeclaration.java:265)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:3312)
at org.eclipse.jdt.internal.core.dom.rewrite.ASTRewriteAnalyzer.doVisit(ASTRewriteAnalyzer.java:419)
at org.eclipse.jdt.internal.core.dom.rewrite.ASTRewriteAnalyzer.voidVisitList(ASTRewriteAnalyzer.java:457)
at org.eclipse.jdt.internal.core.dom.rewrite.ASTRewriteAnalyzer.voidVisit(ASTRewriteAnalyzer.java:451)
at org.eclipse.jdt.internal.core.dom.rewrite.ASTRewriteAnalyzer.doVisitUnchangedChildren(ASTRewriteAnalyzer.java:464)
at org.eclipse.jdt.internal.core.dom.rewrite.ASTRewriteAnalyzer.visit(ASTRewriteAnalyzer.java:1869)
at org.eclipse.jdt.core.dom.TypeDeclaration.accept0(TypeDeclaration.java:480)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:3312)
at org.eclipse.jdt.internal.core.dom.rewrite.ASTRewriteAnalyzer.voidVisit(ASTRewriteAnalyzer.java:443)
at org.eclipse.jdt.internal.core.dom.rewrite.ASTRewriteAnalyzer.doTextRemoveAndVisit(ASTRewriteAnalyzer.java:411)
at org.eclipse.jdt.internal.core.dom.rewrite.ASTRewriteAnalyzer$ListRewriter.rewriteList(ASTRewriteAnalyzer.java:744)
at org.eclipse.jdt.internal.core.dom.rewrite.ASTRewriteAnalyzer$ListRewriter.rewriteList(ASTRewriteAnalyzer.java:828)
at org.eclipse.jdt.internal.core.dom.rewrite.ASTRewriteAnalyzer.rewriteParagraphList(ASTRewriteAnalyzer.java:1264)
at org.eclipse.jdt.internal.core.dom.rewrite.ASTRewriteAnalyzer.visit(ASTRewriteAnalyzer.java:1847)
at org.eclipse.jdt.core.dom.CompilationUnit.accept0(CompilationUnit.java:249)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:3312)
at org.eclipse.jdt.core.dom.InternalASTRewrite.rewriteAST(InternalASTRewrite.java:100)
at org.eclipse.jdt.core.dom.AST.rewrite(AST.java:3897)
at org.eclipse.jdt.core.dom.CompilationUnit.rewrite(CompilationUnit.java:985)
at org.eclipse.jdt.core.tests.rewrite.modifying.ASTRewritingModifyingTest.evaluateRewrite(ASTRewritingModifyingTest.java:151)
at org.eclipse.jdt.core.tests.rewrite.modifying.ASTRewritingModifyingTest.evaluateRewrite(ASTRewritingModifyingTest.java:142)
at org.eclipse.jdt.core.tests.rewrite.modifying.ASTRewritingModifyingMoveTest.test0007(ASTRewritingModifyingMoveTest.java:328)

java.lang.NullPointerException: Cannot invoke "org.eclipse.jdt.core.dom.rewrite.TargetSourceRangeComputer$SourceRange.getStartPosition()" because "range" is null
at org.eclipse.jdt.internal.core.dom.rewrite.ASTRewriteAnalyzer.getExtendedEnd(ASTRewriteAnalyzer.java:264)
at org.eclipse.jdt.internal.core.dom.rewrite.ASTRewriteAnalyzer.doVisit(ASTRewriteAnalyzer.java:420)
at org.eclipse.jdt.internal.core.dom.rewrite.ASTRewriteAnalyzer.voidVisitList(ASTRewriteAnalyzer.java:457)
at org.eclipse.jdt.internal.core.dom.rewrite.ASTRewriteAnalyzer.voidVisit(ASTRewriteAnalyzer.java:451)
at org.eclipse.jdt.internal.core.dom.rewrite.ASTRewriteAnalyzer.doVisitUnchangedChildren(ASTRewriteAnalyzer.java:464)
at org.eclipse.jdt.internal.core.dom.rewrite.ASTRewriteAnalyzer.visit(ASTRewriteAnalyzer.java:1830)
at org.eclipse.jdt.core.dom.CompilationUnit.accept0(CompilationUnit.java:249)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:3312)
at org.eclipse.jdt.core.dom.InternalASTRewrite.rewriteAST(InternalASTRewrite.java:100)
at org.eclipse.jdt.core.dom.AST.rewrite(AST.java:3897)
at org.eclipse.jdt.core.dom.CompilationUnit.rewrite(CompilationUnit.java:985)
at org.eclipse.jdt.core.tests.rewrite.modifying.ASTRewritingModifyingTest.evaluateRewrite(ASTRewritingModifyingTest.java:151)
at org.eclipse.jdt.core.tests.rewrite.modifying.ASTRewritingModifyingTest.evaluateRewrite(ASTRewritingModifyingTest.java:142)
at org.eclipse.jdt.core.tests.rewrite.modifying.ASTRewritingModifyingMoveTest.test0008(ASTRewritingModifyingMoveTest.java:376)

java.lang.NullPointerException: Cannot invoke "org.eclipse.jdt.core.dom.rewrite.TargetSourceRangeComputer$SourceRange.getStartPosition()" because "range" is null
at org.eclipse.jdt.internal.core.dom.rewrite.ASTRewriteAnalyzer.getExtendedEnd(ASTRewriteAnalyzer.java:264)
at org.eclipse.jdt.internal.core.dom.rewrite.ASTRewriteAnalyzer.doVisit(ASTRewriteAnalyzer.java:420)
at org.eclipse.jdt.internal.core.dom.rewrite.ASTRewriteAnalyzer.voidVisitList(ASTRewriteAnalyzer.java:457)
at org.eclipse.jdt.internal.core.dom.rewrite.ASTRewriteAnalyzer.voidVisit(ASTRewriteAnalyzer.java:451)
at org.eclipse.jdt.internal.core.dom.rewrite.ASTRewriteAnalyzer.doVisitUnchangedChildren(ASTRewriteAnalyzer.java:464)
at org.eclipse.jdt.internal.core.dom.rewrite.ASTRewriteAnalyzer.visit(ASTRewriteAnalyzer.java:1869)
at org.eclipse.jdt.core.dom.TypeDeclaration.accept0(TypeDeclaration.java:480)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:3312)
at org.eclipse.jdt.internal.core.dom.rewrite.ASTRewriteAnalyzer.doVisit(ASTRewriteAnalyzer.java:419)
at org.eclipse.jdt.internal.core.dom.rewrite.ASTRewriteAnalyzer.voidVisitList(ASTRewriteAnalyzer.java:457)
at org.eclipse.jdt.internal.core.dom.rewrite.ASTRewriteAnalyzer.voidVisit(ASTRewriteAnalyzer.java:451)
at org.eclipse.jdt.internal.core.dom.rewrite.ASTRewriteAnalyzer.doVisitUnchangedChildren(ASTRewriteAnalyzer.java:464)
at org.eclipse.jdt.internal.core.dom.rewrite.ASTRewriteAnalyzer.visit(ASTRewriteAnalyzer.java:1830)
at org.eclipse.jdt.core.dom.CompilationUnit.accept0(CompilationUnit.java:249)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:3312)
at org.eclipse.jdt.core.dom.InternalASTRewrite.rewriteAST(InternalASTRewrite.java:100)
at org.eclipse.jdt.core.dom.AST.rewrite(AST.java:3897)
at org.eclipse.jdt.core.dom.CompilationUnit.rewrite(CompilationUnit.java:985)
at org.eclipse.jdt.core.tests.rewrite.modifying.ASTRewritingModifyingTest.evaluateRewrite(ASTRewritingModifyingTest.java:151)
at org.eclipse.jdt.core.tests.rewrite.modifying.ASTRewritingModifyingTest.evaluateRewrite(ASTRewritingModifyingTest.java:142)
at org.eclipse.jdt.core.tests.rewrite.modifying.ASTRewritingModifyingRemoveTest.testBug446446_005(ASTRewritingModifyingRemoveTest.java:852)

@jukzi jukzi reopened this Jan 8, 2025
@jukzi jukzi changed the title [dom ast][rewrite] NPE in ASTRewritingModifyingMoveTest - I20241230-0520 [dom ast][rewrite] Random NPE in ASTRewritingModifyingMoveTest Jan 8, 2025
@jukzi jukzi added test Work on unit tests, no change of productive code build test failure Unit Test failures in builds - maynot be a regression caused by the previous change labels Jan 8, 2025
@jukzi
Copy link
Contributor

jukzi commented Jan 8, 2025

What puzzles me: note that org.eclipse.jdt.internal.core.dom.rewrite.ASTRewriteAnalyzer.getExtendedRange(ASTNode) should never return null according to javadoc and i could not find any implementation that does return anything else then new SourceRange.
Feels like a bug in JDK23

@jukzi jukzi changed the title [dom ast][rewrite] Random NPE in ASTRewritingModifyingMoveTest [23][dom ast][rewrite] Random NPE in ASTRewritingModifyingMoveTest Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working build test failure Unit Test failures in builds - maynot be a regression caused by the previous change regression Something was broken by a previous change test Work on unit tests, no change of productive code
Projects
None yet
Development

No branches or pull requests

2 participants