sourcegraph / jetbrains

Apache License 2.0
78 stars 24 forks source link

bug: java.lang.NullPointerException #2676

Open prajoth-prasannan opened 4 days ago

prajoth-prasannan commented 4 days ago

IDE Information

IntelliJ IDEA 2024.3 (Ultimate Edition) Build #IU-243.21565.193, built on November 13, 2024 Licensed to Prajoth Prasannan Subscription is active until December 5, 2024. Runtime version: 21.0.5+8-b631.16 amd64 (JCEF 122.1.9) VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. Toolkit: sun.awt.windows.WToolkit Windows 11.0 This IDE is not managed via JetBrains IDE Services because no configuration was specified. GC: G1 Young Generation, G1 Concurrent GC, G1 Old Generation Memory: 2048M Cores: 20 Registry: ide.windowSystem.autoShowProcessPopup=true ide.experimental.ui=true i18n.locale= terminal.new.ui=true Non-Bundled Plugins: lermitage.intellij.extratci (2024.6.2) com.fabio (1.2) bundled-intellij-idea-help (243.21565.211) design.patterns.plugin (1.1.0) com.intellij.ideolog (243.21565.208) org.jetbrains.jumpToLine (0.1.17) GenerateSerialVersionUID (3.0.3) com.github.setial (4.1.3) name.kropp.intellij.makefile (243.21565.122) com.jetbrains.jax.ws (243.21565.129) CMD Support (1.0.5) gherkin (243.21565.122) com.intellij.ml.llm (243.21565.238) com.jetbrains.fast.mouse.scroll (1.6.1) org.jetbrains.plugins.gitlab (243.21565.204) org.jetbrains.plugins.github (243.21565.204-ultimate) org.sonarlint.idea (10.12.0.79769) org.jetbrains.toolbox-enterprise-client (2024.4.1.9053-ij243) com.sourcegraph.jetbrains (7.1.0) zielu.gittoolbox (600.0.7+242) Kotlin: 243.21565.193-IJ

Bug Description

NPE issue when using the Cody SonarGraph plugin

Additional context

Stacktrace:


java.lang.NullPointerException
    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:557)
    at java.base/java.util.concurrent.ForkJoinTask.reportException(ForkJoinTask.java:573)
    at java.base/java.util.concurrent.ForkJoinTask.get(ForkJoinTask.java:1007)
    at com.intellij.util.ConcurrencyUtil.manifestExceptionsIn(ConcurrencyUtil.java:277)
    at com.intellij.codeInsight.daemon.impl.DaemonCodeAnalyzerImpl.lambda$queuePassesCreation$27(DaemonCodeAnalyzerImpl.java:1310)
    at com.intellij.openapi.application.TransactionGuardImpl.runWithWritingAllowed(TransactionGuardImpl.java:236)
    at com.intellij.openapi.application.TransactionGuardImpl.access$100(TransactionGuardImpl.java:25)
    at com.intellij.openapi.application.TransactionGuardImpl$1.run(TransactionGuardImpl.java:198)
    at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runIntendedWriteActionOnCurrentThread$lambda$2(AnyThreadWriteThreadingSupport.kt:217)
    at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runWriteIntentReadAction(AnyThreadWriteThreadingSupport.kt:128)
    at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runIntendedWriteActionOnCurrentThread(AnyThreadWriteThreadingSupport.kt:216)
    at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:842)
    at com.intellij.openapi.application.impl.ApplicationImpl$2.run(ApplicationImpl.java:421)
    at com.intellij.util.concurrency.ChildContext$runInChildContext$1.invoke(propagation.kt:101)
    at com.intellij.util.concurrency.ChildContext$runInChildContext$1.invoke(propagation.kt:101)
    at com.intellij.util.concurrency.ChildContext.runInChildContext(propagation.kt:107)
    at com.intellij.util.concurrency.ChildContext.runInChildContext(propagation.kt:101)
    at com.intellij.util.concurrency.ContextRunnable.run(ContextRunnable.java:27)
    at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:117)
    at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:43)
    at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318)
    at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:781)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:728)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:722)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87)
    at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:750)
    at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.kt:675)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.kt:573)
    at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$18$lambda$17$lambda$16$lambda$15(IdeEventQueue.kt:355)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:857)
    at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$18$lambda$17$lambda$16(IdeEventQueue.kt:354)
    at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$2$lambda$1(IdeEventQueue.kt:1045)
    at com.intellij.openapi.application.WriteIntentReadAction.lambda$run$0(WriteIntentReadAction.java:24)
    at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runWriteIntentReadAction(AnyThreadWriteThreadingSupport.kt:128)
    at com.intellij.openapi.application.impl.ApplicationImpl.runWriteIntentReadAction(ApplicationImpl.java:916)
    at com.intellij.openapi.application.WriteIntentReadAction.compute(WriteIntentReadAction.java:55)
    at com.intellij.openapi.application.WriteIntentReadAction.run(WriteIntentReadAction.java:23)
    at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$2(IdeEventQueue.kt:1045)
    at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$3(IdeEventQueue.kt:1054)
    at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:109)
    at com.intellij.ide.IdeEventQueueKt.performActivity(IdeEventQueue.kt:1054)
    at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$18(IdeEventQueue.kt:349)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.kt:395)
    at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:207)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
    at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:92)
Caused by: java.lang.NullPointerException: Cannot invoke "com.intellij.openapi.vfs.VirtualFile.getFileSystem()" because the return value of "com.intellij.psi.PsiFile.getVirtualFile()" is null
    at com.sourcegraph.cody.inspections.CodyFixHighlightPassFactory.factory$lambda$0(CodyFixHighlightPass.kt:142)
    at com.intellij.codeInsight.daemon.impl.TextEditorHighlightingPassRegistrarImpl.instantiatePasses(TextEditorHighligh...
linear[bot] commented 4 days ago

BUGS-759 bug: java.lang.NullPointerException