sourcegraph / jetbrains

Apache License 2.0
78 stars 24 forks source link

bug: java.lang.IllegalArgumentException: Invalid range specified: (1695, 1592); #2559

Closed cbgrasshopper closed 2 weeks ago

cbgrasshopper commented 3 weeks ago

IDE Information

JetBrains Rider 2024.2.7 Build #RD-242.23726.100, built on October 22, 2024 Licensed to Christopher Bradford You have a perpetual fallback license for this version. Subscription is active until October 17, 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 15.1 .NET Core v8.0.4 ARM64 (Server GC) GC: G1 Young Generation, G1 Concurrent GC, G1 Old Generation Memory: 4096M Cores: 12 Metal Rendering is ON Registry: ide.balloon.shadow.size=0 ide.intellij.laf.enable.animation=true ide.experimental.ui=true i18n.locale= terminal.new.ui=true Non-Bundled Plugins: com.intellij.datagen (242.20224.159) uk.co.hadoopathome.intellij.avro.intellijavroviewer (3.1.0) com.github.leomillon.uuidgenerator (4.5.1) fluentvalidation-rider (2024.2.0) lermitage.intellij.extratci (2024.5.4) com.intellij.resharper.HeapAllocationsViewer (2024.2.0) com.berzanmikaili.intellij.monokai_pro (2.0.2c) fluentassertions-rider (2024.2.0) org.intellij.plugins.hcl (242.23339.11) com.thvardhan.gradianto (5.5) PythonCore (242.23726.103) org.toml.lang (242.20224.155) com.vecheslav.darculaSolidTheme (1.0.3) com.elliotwaite.godot_theme (1.1.0) com.mallowigi.idea (23.0.0) aws.toolkit.core (3.36-242) wallaby.js (1.0.309) com.jetbrains.space (242.23726.16) com.hiberbee.intellij.hiberbee-theme (2024.2.28.2100) color.scheme.Monokai Materialized (1.1) monokai-pro (1.10) quokka.js (1.0.456) com.jetbrains.rider.android (242.23726.100) org.jetbrains.plugins.go-template (242.20224.155) one.util.ideaplugin.screenshoter (1.8.1) nsubstitutecomplete-rider (2024.2.0) com.vecheslav.darculaDarkerTheme (1.2.0) com.intellij.ideolog (242.23726.110) com.markskelton.one-dark-theme (5.12.0) cognitivecomplexity-rider (2024.2.0) fr.socolin.application-insights-debug-log-viewer (2024.2.0) String Manipulation (9.14.1) com.github.ushiosan23.darktheme (1.0.2) Key Promoter X (2024.2.0) com.yemreak.DarkCode-Theme (1.1) pl.tigersoft.intellij.faker (1.3.0) net.seesharpsoft.intellij.plugins.file-preview (1.6.4) Abc.MoqComplete.Rider (2024.1.1.1) AceJump (3.8.20) indent-rainbow.indent-rainbow (2.2.0) com.intellij.resharper.StructuredLogging (2024.2.0.339) com.samdark.intellij-visual-studio-code-dark-plus (2.9.0) net.reqnroll (2024.2.2) com.intellij.aqua (242.23726.125) gherkin (242.20224.159) com.intellij.ml.llm (242.23726.20) net.seesharpsoft.intellij.plugins.csv (4.0.0) com.intellij.bigdatatools.core (242.23726.103) com.intellij.bigdatatools.binary.files (242.20224.159) com.intellij.bigdatatools.rfs (242.23726.103) com.github.ArtsiomCh.NestedBracketsColorer (0.7.2) com.intellij.tide (242.23726.125) com.github.dinbtechit.vscodetheme (1.10.12) com.github.copilot (1.5.28.7313) org.sonarlint.idea (10.11.1.79663) codiumai.codiumai (0.11.5) com.sourcegraph.jetbrains (7.0.18) com.microsoft.vso.idea (1.162.2) com.mallowigi (97.0.0) mobi.hsz.idea.gitignore (4.5.4) color.scheme.GapStyle (4.1) com.intellij.resharper.azure (4.2.4) aws.toolkit (3.36-242) izhangzhihao.rainbow.brackets.lite (1.2.0)

Bug Description

IDE reported an error

Additional context

Stacktrace:


java.lang.IllegalArgumentException: Invalid range specified: (1695, 1592); 
    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.concurrency.client.ClientIdPropagation.captureClientIdInRunnable$lambda$3(ClientIdPropagation.kt:43)
    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(A...
linear[bot] commented 3 weeks ago

BUGS-647 bug: java.lang.IllegalArgumentException: Invalid range specified: (1695, 1592);

mkondratek commented 2 weeks ago

hello 👋 thank you for the report. we are sorry about the inconvenience 🙇

I will look into it and try to fix it.

Also, this issue has been reported already. Closing as a duplicate of https://github.com/sourcegraph/jetbrains/issues/2547.

Please track the progress there and keep the plugin updated 🙏