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

After updating moshi to 1.13.0, Backend Internal error: Exception during IR lowering is thrown #77

Open
pavan-meesho opened this issue Feb 10, 2022 · 0 comments

Comments

@pavan-meesho
Copy link

pavan-meesho commented Feb 10, 2022

App is not compiling when I updated the moshi to 1.13.0 throwing the following exception.

Specs -
AGP - 7.0.4
Kotlin - 1.6.10

org.jetbrains.kotlin.backend.common.BackendException: Backend Internal error: Exception during IR lowering
File being compiled: /Users/pavanpm/P1/Projects/Freelance/Nakkalites-Android/app/build/generated/source/kapt/debug/in/nakkalites/mediaclient/data/user/LoginUserEntityJsonAdapter.kt
The root cause java.lang.NullPointerException was thrown at: org.jetbrains.kotlin.backend.common.lower.AnnotationImplementationTransformer.implementAnnotationProperties(AnnotationImplementationTransformer.kt:127)
	at org.jetbrains.kotlin.backend.common.CodegenUtil.reportBackendException(CodegenUtil.kt:239)
	at org.jetbrains.kotlin.backend.common.CodegenUtil.reportBackendException$default(CodegenUtil.kt:235)
	at org.jetbrains.kotlin.backend.common.phaser.PerformByIrFilePhase.invokeSequential(performByIrFile.kt:68)
	at org.jetbrains.kotlin.backend.common.phaser.PerformByIrFilePhase.invoke(performByIrFile.kt:55)
	at org.jetbrains.kotlin.backend.common.phaser.PerformByIrFilePhase.invoke(performByIrFile.kt:41)
	at org.jetbrains.kotlin.backend.common.phaser.NamedCompilerPhase.invoke(CompilerPhase.kt:96)
	at org.jetbrains.kotlin.backend.common.phaser.CompositePhase.invoke(PhaseBuilders.kt:29)
	at org.jetbrains.kotlin.backend.common.phaser.NamedCompilerPhase.invoke(CompilerPhase.kt:96)
	at org.jetbrains.kotlin.backend.common.phaser.CompositePhase.invoke(PhaseBuilders.kt:22)
	at org.jetbrains.kotlin.backend.common.phaser.NamedCompilerPhase.invoke(CompilerPhase.kt:96)
	at org.jetbrains.kotlin.backend.common.phaser.CompilerPhaseKt.invokeToplevel(CompilerPhase.kt:43)
	at org.jetbrains.kotlin.backend.jvm.JvmIrCodegenFactory.doGenerateFilesInternal(JvmIrCodegenFactory.kt:195)
	at org.jetbrains.kotlin.backend.jvm.JvmIrCodegenFactory.generateModule(JvmIrCodegenFactory.kt:60)
	at org.jetbrains.kotlin.codegen.KotlinCodegenFacade.compileCorrectFiles(KotlinCodegenFacade.java:35)
	at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.generate(KotlinToJVMBytecodeCompiler.kt:331)
	at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.compileModules$cli(KotlinToJVMBytecodeCompiler.kt:123)
	at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.compileModules$cli$default(KotlinToJVMBytecodeCompiler.kt:58)
	at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:170)
	at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:52)
	at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:92)
	at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:44)
	at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:98)
	at org.jetbrains.kotlin.incremental.IncrementalJvmCompilerRunner.runCompiler(IncrementalJvmCompilerRunner.kt:434)
	at org.jetbrains.kotlin.incremental.IncrementalJvmCompilerRunner.runCompiler(IncrementalJvmCompilerRunner.kt:120)
	at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compileIncrementally(IncrementalCompilerRunner.kt:357)
	at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compileIncrementally$default(IncrementalCompilerRunner.kt:299)
	at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compileImpl$rebuild(IncrementalCompilerRunner.kt:118)
	at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compileImpl(IncrementalCompilerRunner.kt:169)
	at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compile(IncrementalCompilerRunner.kt:80)
	at org.jetbrains.kotlin.daemon.CompileServiceImplBase.execIncrementalCompiler(CompileServiceImpl.kt:622)
	at org.jetbrains.kotlin.daemon.CompileServiceImplBase.access$execIncrementalCompiler(CompileServiceImpl.kt:100)
	at org.jetbrains.kotlin.daemon.CompileServiceImpl.compile(CompileServiceImpl.kt:1713)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at java.rmi/sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:359)
	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(Native Method)
	at java.rmi/sun.rmi.transport.Transport.serviceCall(Transport.java:196)
	at java.rmi/sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:562)
	at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:796)
	at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:677)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:676)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.NullPointerException
	at org.jetbrains.kotlin.backend.common.lower.AnnotationImplementationTransformer.implementAnnotationProperties(AnnotationImplementationTransformer.kt:127)
	at org.jetbrains.kotlin.backend.common.lower.AnnotationImplementationTransformer.createAnnotationImplementation(AnnotationImplementationTransformer.kt:105)
	at org.jetbrains.kotlin.backend.common.lower.AnnotationImplementationTransformer.visitConstructorCall(AnnotationImplementationTransformer.kt:57)
	at org.jetbrains.kotlin.backend.jvm.lower.JvmAnnotationImplementationTransformer.visitConstructorCall(JvmAnnotationImplementationTransformer.kt:48)
	at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitConstructorCall(IrElementTransformerVoid.kt:202)
	at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitConstructorCall(IrElementTransformerVoid.kt:24)
	at org.jetbrains.kotlin.ir.expressions.impl.IrConstructorCallImpl.accept(IrConstructorCallImpl.kt:28)
	at org.jetbrains.kotlin.ir.expressions.IrExpression.transform(IrExpression.kt:33)
	at org.jetbrains.kotlin.ir.expressions.IrFunctionAccessExpression.transformChildren(IrFunctionAccessExpression.kt:48)
	at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitExpression(IrElementTransformerVoid.kt:131)
	at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitMemberAccess(IrElementTransformerVoid.kt:192)
	at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitFunctionAccess(IrElementTransformerVoid.kt:195)
	at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitCall(IrElementTransformerVoid.kt:198)
	at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitCall(IrElementTransformerVoid.kt:199)
	at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitCall(IrElementTransformerVoid.kt:24)
	at org.jetbrains.kotlin.ir.expressions.impl.IrCallImpl.accept(IrCallImpl.kt:47)
	at org.jetbrains.kotlin.ir.expressions.IrExpression.transform(IrExpression.kt:33)
	at org.jetbrains.kotlin.ir.expressions.IrFunctionAccessExpression.transformChildren(IrFunctionAccessExpression.kt:48)
	at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitExpression(IrElementTransformerVoid.kt:131)
	at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitMemberAccess(IrElementTransformerVoid.kt:192)
	at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitFunctionAccess(IrElementTransformerVoid.kt:195)
	at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitCall(IrElementTransformerVoid.kt:198)
	at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitCall(IrElementTransformerVoid.kt:199)
	at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitCall(IrElementTransformerVoid.kt:24)
	at org.jetbrains.kotlin.ir.expressions.impl.IrCallImpl.accept(IrCallImpl.kt:47)
	at org.jetbrains.kotlin.ir.expressions.IrExpression.transform(IrExpression.kt:33)
	at org.jetbrains.kotlin.ir.expressions.impl.IrTypeOperatorCallImpl.transformChildren(IrTypeOperatorCallImpl.kt:47)
	at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitExpression(IrElementTransformerVoid.kt:131)
	at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitTypeOperator(IrElementTransformerVoid.kt:244)
	at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitTypeOperator(IrElementTransformerVoid.kt:245)
	at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitTypeOperator(IrElementTransformerVoid.kt:24)
	at org.jetbrains.kotlin.ir.expressions.impl.IrTypeOperatorCallImpl.accept(IrTypeOperatorCallImpl.kt:40)
	at org.jetbrains.kotlin.ir.expressions.IrExpression.transform(IrExpression.kt:33)
	at org.jetbrains.kotlin.ir.expressions.IrExpressionBody.transformChildren(IrBody.kt:46)
	at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitBody(IrElementTransformerVoid.kt:108)
	at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitExpressionBody(IrElementTransformerVoid.kt:114)
	at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitExpressionBody(IrElementTransformerVoid.kt:115)
	at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitExpressionBody(IrElementTransformerVoid.kt:24)
	at org.jetbrains.kotlin.ir.expressions.IrExpressionBody.accept(IrBody.kt:36)
	at org.jetbrains.kotlin.ir.expressions.IrExpressionBody.transform(IrBody.kt:39)
	at org.jetbrains.kotlin.ir.declarations.IrField.transformChildren(IrField.kt:41)
	at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitDeclaration(IrElementTransformerVoid.kt:57)
	at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitField(IrElementTransformerVoid.kt:81)
	at org.jetbrains.kotlin.backend.common.IrElementTransformerVoidWithContext.visitFieldNew(IrElementTransformerVoidWithContext.kt:123)
	at org.jetbrains.kotlin.backend.common.IrElementTransformerVoidWithContext.visitField(IrElementTransformerVoidWithContext.kt:61)
	at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitField(IrElementTransformerVoid.kt:82)
	at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitField(IrElementTransformerVoid.kt:24)
	at org.jetbrains.kotlin.ir.declarations.IrField.accept(IrField.kt:34)
	at org.jetbrains.kotlin.ir.IrElement$DefaultImpls.transform(IrElement.kt:32)
	at org.jetbrains.kotlin.ir.IrElementBase.transform(IrElementBase.kt:19)
	at org.jetbrains.kotlin.ir.declarations.IrProperty.transformChildren(IrProperty.kt:58)
	at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitDeclaration(IrElementTransformerVoid.kt:57)
	at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitProperty(IrElementTransformerVoid.kt:78)
	at org.jetbrains.kotlin.backend.common.IrElementTransformerVoidWithContext.visitPropertyNew(IrElementTransformerVoidWithContext.kt:119)
	at org.jetbrains.kotlin.backend.common.IrElementTransformerVoidWithContext.visitProperty(IrElementTransformerVoidWithContext.kt:54)
	at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitProperty(IrElementTransformerVoid.kt:79)
	at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitProperty(IrElementTransformerVoid.kt:24)
	at org.jetbrains.kotlin.ir.declarations.IrProperty.accept(IrProperty.kt:49)
	at org.jetbrains.kotlin.ir.IrElement$DefaultImpls.transform(IrElement.kt:32)
	at org.jetbrains.kotlin.ir.IrElementBase.transform(IrElementBase.kt:19)
	at org.jetbrains.kotlin.ir.util.TransformKt.transformInPlace(transform.kt:35)
	at org.jetbrains.kotlin.ir.declarations.IrClass.transformChildren(IrClass.kt:66)
	at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitDeclaration(IrElementTransformerVoid.kt:57)
	at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitClass(IrElementTransformerVoid.kt:66)
	at org.jetbrains.kotlin.backend.common.IrElementTransformerVoidWithContext.visitClassNew(IrElementTransformerVoidWithContext.kt:111)
	at org.jetbrains.kotlin.backend.common.IrElementTransformerVoidWithContext.visitClass(IrElementTransformerVoidWithContext.kt:47)
	at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitClass(IrElementTransformerVoid.kt:67)
	at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitClass(IrElementTransformerVoid.kt:24)
	at org.jetbrains.kotlin.ir.declarations.IrClass.accept(IrClass.kt:55)
	at org.jetbrains.kotlin.ir.IrElement$DefaultImpls.transform(IrElement.kt:32)
	at org.jetbrains.kotlin.ir.IrElementBase.transform(IrElementBase.kt:19)
	at org.jetbrains.kotlin.ir.declarations.impl.IrFileImpl.transformChildren(IrFileImpl.kt:89)
	at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoidKt.transformChildrenVoid(IrElementTransformerVoid.kt:330)
	at org.jetbrains.kotlin.backend.common.lower.AnnotationImplementationLowering.lower(AnnotationImplementationTransformer.kt:41)
	at org.jetbrains.kotlin.backend.common.phaser.FileLoweringPhaseAdapter.invoke(PhaseBuilders.kt:120)
	at org.jetbrains.kotlin.backend.common.phaser.FileLoweringPhaseAdapter.invoke(PhaseBuilders.kt:116)
	at org.jetbrains.kotlin.backend.common.phaser.NamedCompilerPhase.invoke(CompilerPhase.kt:96)
	at org.jetbrains.kotlin.backend.common.phaser.PerformByIrFilePhase.invokeSequential(performByIrFile.kt:65)
	... 46 more

When I commented out the @FallbackOnNull annotation, it started compiling properly

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