question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

2.25.2 NullPointerException in KotlinClassMetadata$Class.toKmClass

See original GitHub issue
Caused by: java.lang.NullPointerException
	at kotlin.collections.CollectionsKt___CollectionsKt.toCollection(_Collections.kt:1155)
	at kotlin.collections.CollectionsKt___CollectionsKt.toMutableList(_Collections.kt:1188)
	at kotlin.collections.CollectionsKt___CollectionsKt.toList(_Collections.kt:1179)
	at kotlinx.metadata.impl.extensions.MetadataExtensions$Companion$INSTANCES$2.invoke(MetadataExtensions.kt:63)
	at kotlinx.metadata.impl.extensions.MetadataExtensions$Companion$INSTANCES$2.invoke(MetadataExtensions.kt:61)
	at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
	at kotlinx.metadata.impl.extensions.MetadataExtensions$Companion.getINSTANCES(MetadataExtensions.kt)
	at kotlinx.metadata.KmClass.<init>(nodes.kt:102)
	at kotlinx.metadata.jvm.KotlinClassMetadata$Class.toKmClass(KotlinClassMetadata.kt:40)
	at dagger.internal.codegen.kotlin.KotlinMetadataFactory.kmClassOf(KotlinMetadataFactory.java:86)
	at dagger.internal.codegen.kotlin.KotlinMetadataFactory.lambda$create$1(KotlinMetadataFactory.java:61)
	at dagger.internal.codegen.kotlin.KotlinMetadataFactory.create(KotlinMetadataFactory.java:58)
	at dagger.internal.codegen.kotlin.KotlinMetadataUtil.getSyntheticPropertyAnnotations(KotlinMetadataUtil.java:59)
	at dagger.internal.codegen.binding.InjectionAnnotations.getQualifiers(InjectionAnnotations.java:71)
	at dagger.internal.codegen.validation.DependencyRequestValidator.validateDependencyRequest(DependencyRequestValidator.java:55)
	at dagger.internal.codegen.validation.InjectValidator.validateDependencyRequest(InjectValidator.java:244)
	at dagger.internal.codegen.validation.InjectValidator.validateField(InjectValidator.java:205)
	at dagger.internal.codegen.validation.InjectValidator.validateMembersInjectionType(InjectValidator.java:256)
	at dagger.internal.codegen.validation.InjectBindingRegistryImpl.tryRegisterMembersInjectedType(InjectBindingRegistryImpl.java:280)
	at dagger.internal.codegen.validation.InjectBindingRegistryImpl.tryRegisterMembersInjectedType(InjectBindingRegistryImpl.java:264)
	at dagger.internal.codegen.InjectProcessingStep$1.visitVariableAsField(InjectProcessingStep.java:54)
	at dagger.internal.codegen.InjectProcessingStep$1.visitVariableAsField(InjectProcessingStep.java:44)
	at com.sun.tools.javac.code.Symbol$VarSymbol.accept(Symbol.java:1237)
	at dagger.internal.codegen.InjectProcessingStep.process(InjectProcessingStep.java:76)
	at dagger.internal.codegen.validation.TypeCheckingProcessingStep.lambda$process$0(TypeCheckingProcessingStep.java:51)
	at com.google.common.collect.RegularImmutableMap.forEach(RegularImmutableMap.java:185)
	at dagger.internal.codegen.validation.TypeCheckingProcessingStep.process(TypeCheckingProcessingStep.java:48)
	at dagger.internal.codegen.validation.TypeCheckingProcessingStep.process(TypeCheckingProcessingStep.java:34)
	at dagger.internal.codegen.statistics.DaggerStatisticsCollectingProcessingStep.process(DaggerStatisticsCollectingProcessingStep.java:52)
	at dagger.shaded.auto.common.BasicAnnotationProcessor.process(BasicAnnotationProcessor.java:330)
	at dagger.shaded.auto.common.BasicAnnotationProcessor.process(BasicAnnotationProcessor.java:181)
	at org.jetbrains.kotlin.kapt3.base.incremental.IncrementalProcessor.process(incrementalProcessors.kt)
	at org.jetbrains.kotlin.kapt3.base.ProcessorWrapper.process(annotationProcessing.kt:147)
	at com.sun.tools.javac.processing.JavacProcessingEnvironment.callProcessor(JavacProcessingEnvironment.java:802)
	at com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs(JavacProcessingEnvironment.java:713)
	at com.sun.tools.javac.processing.JavacProcessingEnvironment.access$1800(JavacProcessingEnvironment.java:91)
	at com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.run(JavacProcessingEnvironment.java:1043)
	at com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:1184)
	at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1170)
	at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1068)
	at org.jetbrains.kotlin.kapt3.base.AnnotationProcessingKt.doAnnotationProcessing(annotationProcessing.kt:79)

Occasionally experiencing this kapt failure since upgrading to Dagger 2.25.2.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
tevjefcommented, Jan 16, 2020

I’m still seeing this on 2.25.3.

0reactions
tevjefcommented, Apr 8, 2020

I’m still seeing this on 2.27. Kotlin 1.3.71

Caused by: java.lang.NullPointerException
	at kotlin.collections.CollectionsKt___CollectionsKt.toCollection(_Collections.kt:1155)
	at kotlin.collections.CollectionsKt___CollectionsKt.toMutableList(_Collections.kt:1188)
	at kotlin.collections.CollectionsKt___CollectionsKt.toList(_Collections.kt:1179)
	at kotlinx.metadata.impl.extensions.MetadataExtensions$Companion$INSTANCES$2.invoke(MetadataExtensions.kt:63)
	at kotlinx.metadata.impl.extensions.MetadataExtensions$Companion$INSTANCES$2.invoke(MetadataExtensions.kt:61)
	at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
	at kotlinx.metadata.impl.extensions.MetadataExtensions$Companion.getINSTANCES(MetadataExtensions.kt)
	at kotlinx.metadata.impl.ReadContext.<init>(readers.kt:20)
	at kotlinx.metadata.impl.ReadContext.<init>(readers.kt:18)
	at kotlinx.metadata.impl.ReadersKt.accept(readers.kt:41)
	at kotlinx.metadata.jvm.KotlinClassMetadata$Class.accept(KotlinClassMetadata.kt:49)
	at dagger.internal.codegen.kotlin.KotlinMetadata.from(KotlinMetadata.java:194)
	at dagger.internal.codegen.kotlin.KotlinMetadataFactory.create(KotlinMetadataFactory.java:56)
	at dagger.internal.codegen.kotlin.KotlinMetadataUtil.isMissingSyntheticPropertyForAnnotations(KotlinMetadataUtil.java:76)
	at dagger.internal.codegen.validation.DependencyRequestValidator.checkQualifiers(DependencyRequestValidator.java:74)
	at dagger.internal.codegen.validation.DependencyRequestValidator.validateDependencyRequest(DependencyRequestValidator.java:67)
	at dagger.internal.codegen.validation.InjectValidator.validateDependencyRequest(InjectValidator.java:256)
	at dagger.internal.codegen.validation.InjectValidator.validateField(InjectValidator.java:212)
	at dagger.internal.codegen.validation.InjectValidator.validateMembersInjectionType(InjectValidator.java:268)
	at dagger.internal.codegen.validation.InjectBindingRegistryImpl.tryRegisterMembersInjectedType(InjectBindingRegistryImpl.java:280)
	at dagger.internal.codegen.validation.InjectBindingRegistryImpl.tryRegisterMembersInjectedType(InjectBindingRegistryImpl.java:264)
	at dagger.internal.codegen.InjectProcessingStep$1.visitVariableAsField(InjectProcessingStep.java:54)
	at dagger.internal.codegen.InjectProcessingStep$1.visitVariableAsField(InjectProcessingStep.java:44)
	at com.sun.tools.javac.code.Symbol$VarSymbol.accept(Symbol.java:1237)
	at dagger.internal.codegen.InjectProcessingStep.process(InjectProcessingStep.java:76)
	at dagger.internal.codegen.validation.TypeCheckingProcessingStep.lambda$process$0(TypeCheckingProcessingStep.java:51)
	at com.google.common.collect.RegularImmutableMap.forEach(RegularImmutableMap.java:185)
	at dagger.internal.codegen.validation.TypeCheckingProcessingStep.process(TypeCheckingProcessingStep.java:48)
	at dagger.internal.codegen.validation.TypeCheckingProcessingStep.process(TypeCheckingProcessingStep.java:34)
	at dagger.internal.codegen.statistics.DaggerStatisticsCollectingProcessingStep.process(DaggerStatisticsCollectingProcessingStep.java:52)
	at dagger.shaded.auto.common.BasicAnnotationProcessor.process(BasicAnnotationProcessor.java:330)
	at dagger.shaded.auto.common.BasicAnnotationProcessor.process(BasicAnnotationProcessor.java:181)
	at org.jetbrains.kotlin.kapt3.base.incremental.IncrementalProcessor.process(incrementalProcessors.kt)
	at org.jetbrains.kotlin.kapt3.base.ProcessorWrapper.process(annotationProcessing.kt:147)
	at com.sun.tools.javac.processing.JavacProcessingEnvironment.callProcessor(JavacProcessingEnvironment.java:802)
	at com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs(JavacProcessingEnvironment.java:713)
	at com.sun.tools.javac.processing.JavacProcessingEnvironment.access$1800(JavacProcessingEnvironment.java:91)
	at com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.run(JavacProcessingEnvironment.java:1043)
	at com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:1184)
	at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1170)
	at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1068)
	at org.jetbrains.kotlin.kapt3.base.AnnotationProcessingKt.doAnnotationProcessing(annotationProcessing.kt:79)
	... 27 more
Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found