sourcegraph / jetbrains

Apache License 2.0
71 stars 23 forks source link

bug: java.lang.IllegalArgumentException: Invalid range specified: (11, 0); #2572

Open Nopik opened 2 days ago

Nopik commented 2 days ago

IDE Information

IntelliJ IDEA 2024.2.4 (Ultimate Edition) Build #IU-242.23726.103, built on October 23, 2024 Licensed to Kamil Burzynski You have a perpetual fallback license for this version. Subscription is active until October 6, 2025. Runtime version: 21.0.4+13-b509.26 aarch64 (JCEF 122.1.9) VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. Toolkit: sun.lwawt.macosx.LWCToolkit macOS 14.6.1 GC: G1 Young Generation, G1 Concurrent GC, G1 Old Generation Memory: 16384M Cores: 10 Metal Rendering is ON Registry: actionSystem.playback.typecommand.delay=50 debugger.new.tool.window.layout=true vcs.log.index.enable=true ide.experimental.ui=true i18n.locale= editor.minimap.enabled=true terminal.new.ui=true typescript.service.node.arguments=--max-old-space-size=8192 Non-Bundled Plugins: com.mroche.JsonHelper (1.3.2) String Manipulation (9.14.1) com.wakatime.intellij.plugin (15.0.3) ru.adelf.idea.dotenv (2024.2.1) PlantUML integration (7.11.2-IJ2023.2) com.sourcegraph.jetbrains (7.0.19-nightly) Dart (242.22855.32) commit-prefix-plugin (1.4.1) com.nekofar.milad.intellij.remix (1.2.0) com.cral.JSONKeyFinder (2.0.8) com.eny.i18n (2.6.2) Kotlin: 242.23726.103-IJ

Bug Description

crash

Additional context

Stacktrace:


java.lang.IllegalArgumentException: Invalid range specified: (11, 0); 
    at com.intellij.openapi.util.TextRange.assertProperRange(TextRange.java:288)
    at com.intellij.openapi.util.TextRange.assertProperRange(TextRange.java:283)
    at com.intellij.openapi.util.TextRange.assertProperRange(TextRange.java:279)
    at com.intellij.openapi.util.TextRange.<init>(TextRange.java:42)
    at com.intellij.openapi.util.TextRange.<init>(TextRange.java:31)
    at com.intellij.openapi.util.TextRange.create(TextRange.java:199)
    at com.sourcegraph.utils.CodyEditorUtil.getTextRange(CodyEditorUtil.kt:65)
    at com.sourcegraph.cody.autocomplete.CodyAutocompleteManager.displayAgentAutocomplete(CodyAutocompleteManager.kt:240)
    at com.sourcegraph.cody.autocomplete.CodyAutocompleteManager.processAutocompleteResult$lambda$10$lambda$9(CodyAutocompleteManager.kt:216)
    at com.intellij.openapi.command.WriteCommandAction.lambda$runWriteCommandAction$4(WriteCommandAction.java:341)
    at com.intellij.openapi.command.WriteCommandAction$BuilderImpl.lambda$doRunWriteCommandAction$1(WriteCommandAction.java:147)
    at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runWriteAction$lambda$4(AnyThreadWriteThreadingSupport.kt:318)
    at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runWriteAction(AnyThreadWriteThreadingSupport.kt:328)
    at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runWriteAction(AnyThreadWriteThreadingSupport.kt:318)
    at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:890)
    at com.intellij.openapi.command.WriteCommandAction$BuilderImpl.lambda$doRunWriteCommandAction$2(WriteCommandAction.java:145)
    at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:226)
    at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:188)
    at com.intellij.openapi.command.WriteCommandAction$BuilderImpl.doRunWriteCommandAction(WriteCommandAction.java:154)
    at com.intellij.openapi.command.WriteCommandAction$BuilderImpl.run(WriteCommandAction.java:121)
    at com.intellij.openapi.command.WriteCommandAction.runWriteCommandAction(WriteCommandAction.java:341)
    at com.intellij.openapi.command.WriteCommandAction.runWriteCommandAction(WriteCommandAction.java:329)
    at com.sourcegraph.cody.autocomplete.CodyAutocompleteManager.processAutocompleteResult$lambda$10(CodyAutocompleteManager.kt:215)
    at com.intellij.util.concurrency.ContextRunnable.run(ContextRunnable.java:27)
    at com.intellij.openapi.application.TransactionGuardImpl.runWithWritingAllowed(TransactionGuardImpl.java:229)
    at com.intellij.openapi.application.TransactionGuardImpl.access$100(TransactionGuardImpl.java:22)
    at com.intellij.openapi.application.TransactionGuardImpl$1.run(TransactionGuardImpl.java:191)
    at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runIntendedWriteActionOnCurrentThread$lambda$1(AnyThreadWriteThreadingSupport.kt:184)
    at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runWriteIntentReadAction(AnyThreadWriteThreadingSupport.kt:84)
    at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runIntendedWriteActionOnCurrentThread(AnyThreadWriteThreadingSupport.kt:183)
    at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:836)
    at com.intellij.openapi.application.impl.ApplicationImpl$2.run(ApplicationImpl.java:424)
    at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runWithImplicitRead(AnyThreadWriteThreadingSupport.kt:122)
    at com.intellij.openapi.application.impl.ApplicationImpl.runWithImplicitRead(ApplicationImpl.java:1162)
    at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:78)
    at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:119)
    at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:41)
    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:696)
    at com.intellij.ide.IdeEventQueue._dispatchEvent$lambda$16(IdeEventQueue.kt:590)
    at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runWithoutImplicitRead(AnyThreadWriteThreadingSupport.kt:117)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.kt:590)
    at com.intellij.ide.IdeEventQueue.access$_dispatchEvent(IdeEventQueue.kt:73)
    at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1$1.compute(IdeEventQueue.kt:357)
    at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1$1.compute(IdeEventQueue.kt:356)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:843)
    at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.invoke(IdeEventQueue.kt:356)
    at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.invoke(IdeEventQueue.kt:351)
    at com.intellij.ide.IdeEventQueueKt$performActivity$runnableWithWIL$1.invoke$lambda$0(IdeEventQueue.kt:1035)
    at com.intellij.openapi.application.WriteIntentReadAction.lambda$run$0(WriteIntentReadAction.java:24)
    at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runWriteIntentReadAction(AnyThreadWriteTh...
linear[bot] commented 2 days ago

BUGS-665 bug: java.lang.IllegalArgumentException: Invalid range specified: (11, 0);