opwvhk / avro-schema-support

Extend IntelliJ, PyCharm and other JetBrains IDEs to more easily work with Avro schemata and protocols in both IDL and JSON format.
https://plugins.jetbrains.com/plugin/15728-avro-schema-support
MIT License
19 stars 2 forks source link

Crash Report: java.lang.IllegalArgumentException: Argument for @NotNull parameter 'schemaObject' of opwvhk/intellij/avro_idl/json_schema/AvroJsonSchemaPsiWalkerFactory.create must not be null #151

Closed avro-support-error-reporter[bot] closed 4 months ago

avro-support-error-reporter[bot] commented 4 months ago

Crash Report

What happened

(The user did not submit additional information)

Context information

Exception

java.lang.IllegalArgumentException: java.lang.IllegalArgumentException: Argument for @NotNull parameter 'schemaObject' of opwvhk/intellij/avro_idl/json_schema/AvroJsonSchemaPsiWalkerFactory.create must not be null
    at java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:62)
    at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:502)
    at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:486)
    at java.base/java.util.concurrent.ForkJoinTask.getException(ForkJoinTask.java:555)
    at java.base/java.util.concurrent.ForkJoinTask.reportException(ForkJoinTask.java:573)
    at java.base/java.util.concurrent.ForkJoinTask.join(ForkJoinTask.java:663)
    at java.base/java.util.concurrent.ForkJoinTask.invoke(ForkJoinTask.java:677)
    at com.intellij.concurrency.JobLauncherImpl.procInOrderAsync(JobLauncherImpl.java:554)
    at com.intellij.codeInsight.daemon.impl.InspectionRunner.lambda$inspect$12(InspectionRunner.java:202)
    at com.intellij.codeInspection.InspectionEngine.withSession(InspectionEngine.java:205)
    at com.intellij.codeInsight.daemon.impl.InspectionRunner.inspect(InspectionRunner.java:162)
    at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.collectInformationWithProgress(LocalInspectionsPass.java:140)
    at com.intellij.codeInsight.daemon.impl.ProgressableTextEditorHighlightingPass.doCollectInformation(ProgressableTextEditorHighlightingPass.java:84)
    at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:57)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$2(PassExecutorService.java:418)
    at com.intellij.platform.diagnostic.telemetry.helpers.TraceKt.runWithSpanIgnoreThrows(trace.kt:118)
    at com.intellij.platform.diagnostic.telemetry.helpers.TraceUtil.runWithSpanThrows(TraceUtil.java:36)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$3(PassExecutorService.java:413)
    at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.tryRunReadAction(AnyThreadWriteThreadingSupport.kt:291)
    at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:965)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$4(PassExecutorService.java:404)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$13(CoreProgressManager.java:660)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:735)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:691)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:659)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:79)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.doRun(PassExecutorService.java:403)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$run$0(PassExecutorService.java:379)
    at com.intellij.openapi.fileTypes.impl.FileTypeManagerImpl.cacheFileTypesInside(FileTypeManagerImpl.java:797)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$run$1(PassExecutorService.java:379)
    at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.executeByImpatientReader(AnyThreadWriteThreadingSupport.kt:486)
    at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:179)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:377)
    at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:190)
    at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:507)
    at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1491)
    at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:2073)
    at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:2035)
    at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:187)
Caused by: java.lang.IllegalArgumentException: Argument for @NotNull parameter 'schemaObject' of opwvhk/intellij/avro_idl/json_schema/AvroJsonSchemaPsiWalkerFactory.create must not be null
    at opwvhk.intellij.avro_idl.json_schema.AvroJsonSchemaPsiWalkerFactory.$$$reportNull$$$0(AvroJsonSchemaPsiWalkerFactory.java)
    at opwvhk.intellij.avro_idl.json_schema.AvroJsonSchemaPsiWalkerFactory.create(AvroJsonSchemaPsiWalkerFactory.java)
    at com.jetbrains.jsonSchema.extension.JsonLikePsiWalker.lambda$getWalker$1(JsonLikePsiWalker.java:90)
    at java.base/java.util.Optional.map(Optional.java:260)
    at com.jetbrains.jsonSchema.extension.JsonLikePsiWalker.getWalker(JsonLikePsiWalker.java:90)
    at com.jetbrains.jsonSchema.extension.JsonLikePsiWalker.getWalker(JsonLikePsiWalker.java:81)
    at com.jetbrains.jsonSchema.impl.tree.IfThenElseBranchOperation.getContainingObjectAdapterOrSelf(IfThenElseBranchOperation.kt:71)
    at com.jetbrains.jsonSchema.impl.tree.IfThenElseBranchOperation.computeEffectiveIfThenElseBranches(IfThenElseBranchOperation.kt:40)
    at com.jetbrains.jsonSchema.impl.tree.IfThenElseBranchOperation.map(IfThenElseBranchOperation.kt:15)
    at com.jetbrains.jsonSchema.impl.tree.Operation.doMap(Operation.java:40)
    at com.jetbrains.jsonSchema.impl.tree.Operation.doMap(Operation.java:43)
    at com.jetbrains.jsonSchema.impl.tree.Operation.doMap(Operation.java:43)
    at com.jetbrains.jsonSchema.impl.tree.Operation.doMap(Operation.java:43)
    at com.jetbrains.jsonSchema.impl.tree.Operation.doMap(Operation.java:43)
    at com.jetbrains.jsonSchema.impl.tree.Operation.doMap(Operation.java:43)
    at com.jetbrains.jsonSchema.impl.JsonSchemaVariantsTreeBuilder.getOperation(JsonSchemaVariantsTreeBuilder.java:105)
    at com.jetbrains.jsonSchema.impl.JsonSchemaVariantsTreeBuilder.expandChildSchema(JsonSchemaVariantsTreeBuilder.java:94)
    at com.jetbrains.jsonSchema.impl.JsonSchemaVariantsTreeBuilder.buildTree(JsonSchemaVariantsTreeBuilder.java:35)
    at com.jetbrains.jsonSchema.impl.JsonSchemaResolver.detailedResolve(JsonSchemaResolver.java:69)
    at com.jetbrains.jsonSchema.impl.inspections.JsonSchemaDeprecationInspection$1.annotate(JsonSchemaDeprecationInspection.java:45)
    at com.jetbrains.jsonSchema.impl.inspections.JsonSchemaDeprecationInspection$1.visitProperty(JsonSchemaDeprecationInspection.java:37)
    at com.intellij.json.psi.impl.JsonPropertyImpl.accept(JsonPropertyImpl.java:21)
    at com.intellij.json.psi.impl.JsonPropertyImpl.accept(JsonPropertyImpl.java:26)
    at com.intellij.codeInsight.daemon.impl.InspectionRunner$InspectionProblemHolder.visitElement(InspectionRunner.java:598)
    at com.intellij.codeInsight.daemon.impl.InspectionRunner.lambda$processContext$20(InspectionRunner.java:415)
    at com.intellij.codeInsight.daemon.impl.InspectionVisitorOptimizer.acceptElements(InspectionVisitorOptimizer.java:207)
    at com.intellij.codeInsight.daemon.impl.InspectionRunner.processContext(InspectionRunner.java:413)
    at com.intellij.codeInsight.daemon.impl.InspectionRunner.lambda$inspect$7(InspectionRunner.java:192)
    at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.tryRunReadAction(AnyThreadWriteThreadingSupport.kt:291)
    at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:965)
    at com.intellij.codeInsight.daemon.impl.InspectionRunner.lambda$executeInImpatientReadAction$17(InspectionRunner.java:394)
    at com.intellij.util.AstLoadingFilter.forceAllowTreeLoading(AstLoadingFilter.java:158)
    at com.intellij.util.AstLoadingFilter.forceAllowTreeLoading(AstLoadingFilter.java:150)
    at com.intellij.codeInsight.daemon.impl.InspectionRunner.lambda$executeInImpatientReadAction$18(InspectionRunner.java:385)
    at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:129)
    at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:118)
    at com.intellij.codeInsight.daemon.impl.InspectionRunner.executeInImpatientReadAction(InspectionRunner.java:385)
    at com.intellij.codeInsight.daemon.impl.InspectionRunner.lambda$inspect$8(InspectionRunner.java:191)
    at com.intellij.concurrency.JobLauncherImpl$2MyProcessQueueTask.lambda$call$0(JobLauncherImpl.java:494)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$13(CoreProgressManager.java:660)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:735)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:691)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:659)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:79)
    at com.intellij.concurrency.JobLauncherImpl$2MyProcessQueueTask.call(JobLauncherImpl.java:483)
    at com.intellij.concurrency.JobLauncherImpl$2MyProcessQueueTask.call(JobLauncherImpl.java:471)
    at java.base/java.util.concurrent.ForkJoinTask$AdaptedCallable.exec(ForkJoinTask.java:1602)
    ... 5 more
opwvhk commented 4 months ago

This is a bug in the JetBrains SDK: the null argument to the create method is for a parameter marked @NotNull:

package com.jetbrains.jsonSchema.extension;
...
public interface JsonLikePsiWalkerFactory {
  ...
  @NotNull
  JsonLikePsiWalker create(@NotNull JsonSchemaObject schemaObject);
}
opwvhk commented 4 months ago

Duplicate of #127