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

2.0.20-Beta2 - [ksp] java.lang.NullPointerException #2001

Open
sureshg opened this issue Jul 15, 2024 · 0 comments
Open

2.0.20-Beta2 - [ksp] java.lang.NullPointerException #2001

sureshg opened this issue Jul 15, 2024 · 0 comments

Comments

@sureshg
Copy link

sureshg commented Jul 15, 2024

Upgrading to Beta2 started throwing the following NPE error on KSP task. Not sure whats the exact cause as there is no more details except the stacktrace.

  • Env
kotlin                   = "2.0.20-Beta2"
kotlin-ksp               = "2.0.20-Beta2-1.0.23"
kotlin-api-version       = "1.9"
kotlin-lang-version      = "2.0"
gradle                   = "8.9"
  • Error
> Task :kspKotlin FAILED
e: [ksp] java.lang.NullPointerException
        at com.google.devtools.ksp.symbol.impl.java.KSClassDeclarationJavaImpl$simpleName$2.invoke(KSClassDeclarationJavaImpl.kt:137)
        at com.google.devtools.ksp.symbol.impl.java.KSClassDeclarationJavaImpl$simpleName$2.invoke(KSClassDeclarationJavaImpl.kt:136)
        at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
        at com.google.devtools.ksp.symbol.impl.java.KSClassDeclarationJavaImpl.getSimpleName(KSClassDeclarationJavaImpl.kt:136)
        at com.google.devtools.ksp.common.symbolCollector.visitDeclaration(IncrementalContextBase.kt:41)
        at com.google.devtools.ksp.common.symbolCollector.visitDeclaration(IncrementalContextBase.kt:34)
        at com.google.devtools.ksp.visitor.KSDefaultVisitor.visitClassDeclaration(KSDefaultVisitor.kt:79)
        at com.google.devtools.ksp.symbol.impl.java.KSClassDeclarationJavaImpl.accept(KSClassDeclarationJavaImpl.kt:166)
        at com.google.devtools.ksp.common.symbolCollector.visitDeclarationContainer(IncrementalContextBase.kt:57)
        at com.google.devtools.ksp.common.symbolCollector.visitDeclarationContainer(IncrementalContextBase.kt:34)
        at com.google.devtools.ksp.visitor.KSDefaultVisitor.visitFile(KSDefaultVisitor.kt:32)
        at com.google.devtools.ksp.symbol.impl.java.KSFileJavaImpl.accept(KSFileJavaImpl.kt:56)
        at com.google.devtools.ksp.common.IncrementalContextBase.collectDefinedSymbols(IncrementalContextBase.kt:111)
        at com.google.devtools.ksp.common.IncrementalContextBase.calcDirtyFiles(IncrementalContextBase.kt:218)
        at com.google.devtools.ksp.AbstractKotlinSymbolProcessingExtension$doAnalysis$2.invoke(KotlinSymbolProcessingExtension.kt:196)
        at com.google.devtools.ksp.AbstractKotlinSymbolProcessingExtension$doAnalysis$2.invoke(KotlinSymbolProcessingExtension.kt:189)
        at com.google.devtools.ksp.AbstractKotlinSymbolProcessingExtension.handleException(KotlinSymbolProcessingExtension.kt:414)
        at com.google.devtools.ksp.AbstractKotlinSymbolProcessingExtension.doAnalysis(KotlinSymbolProcessingExtension.kt:189)
        at org.jetbrains.kotlin.cli.jvm.compiler.TopDownAnalyzerFacadeForJVM.analyzeFilesWithJavaIntegration(TopDownAnalyzerFacadeForJVM.kt:112)
        at org.jetbrains.kotlin.cli.jvm.compiler.TopDownAnalyzerFacadeForJVM.analyzeFilesWithJavaIntegration$default(TopDownAnalyzerFacadeForJVM.kt:75)
        at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.analyze$lambda$12(KotlinToJVMBytecodeCompiler.kt:373)
        at org.jetbrains.kotlin.cli.common.messages.AnalyzerWithCompilerReport.analyzeAndReport(AnalyzerWithCompilerReport.kt:112)
        at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.analyze(KotlinToJVMBytecodeCompiler.kt:364)
        at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.runFrontendAndGenerateIrUsingClassicFrontend(KotlinToJVMBytecodeCompiler.kt:195)
        at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.compileModules$cli(KotlinToJVMBytecodeCompiler.kt:106)
        at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:170)
        at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:43)
        at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:103)
        at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:49)
        at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:101)
        at org.jetbrains.kotlin.daemon.CompileServiceImpl.compile(CompileServiceImpl.kt:1556)
        at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
        at java.base/java.lang.reflect.Method.invoke(Method.java:580)
        at java.rmi/sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:360)
        at java.rmi/sun.rmi.transport.Transport$1.run(Transport.java:200)
        at java.rmi/sun.rmi.transport.Transport$1.run(Transport.java:197)
        at java.base/java.security.AccessController.doPrivileged(AccessController.java:714)
        at java.rmi/sun.rmi.transport.Transport.serviceCall(Transport.java:196)
        at java.rmi/sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:598)
        at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:844)
        at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:721)
        at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
        at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:720)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
        at java.base/java.lang.Thread.run(Thread.java:1575)

e: Error occurred in KSP, check log for detail

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

1 participant