sourcegraph / jetbrains

Apache License 2.0
71 stars 23 forks source link

bug: java.lang.StringIndexOutOfBoundsException: begin 0, end 9, length 8 #1392

Closed ceearrashee closed 6 months ago

ceearrashee commented 6 months ago

Cody Version

5.5.5

IDE Information

GoLand 2024.1 Build #GO-241.14494.238, built on March 28, 2024 Licensed to Yevhen Androsov Subscription is active until May 4, 2024. Runtime version: 17.0.10+8-b1207.12 amd64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. Windows 11.0 GC: G1 Young Generation, G1 Old Generation Memory: 2048M Cores: 20 Registry: debugger.watches.in.variables=false debugger.new.tool.window.layout=true ide.completion.variant.limit=500 suggest.all.run.configurations.from.context=TRUE ide.experimental.ui=true ide.images.show.chessboard=true terminal.new.ui=true Non-Bundled Plugins: com.jetbrains.plugins.ini4idea (241.14494.240) com.intellij.datagen (241.14494.150) dev.turingcomplete.intellijdevelopertoolsplugins (4.2.0) MultiHighlight (3.1.0) com.jetbrains.space (241.14494.150) Rider UI Theme Pack (0.14.11) org.intellij.plugins.postcss (241.14494.155) org.turbanov.run.configuration.as.action (3.0) org.OverEngineer.InlineProblems (0.5.2) org.jetbrains.plugins.sass (241.14494.155) com.intellij.properties (241.14494.150) String Manipulation (9.12.0) com.github.nikolaikopernik.codecomplexity (1.5.0) com.intellij.plugins.github.colorscheme (241.14494.150) hunspell (241.14494.288) xyz.danizz.commit-message-wrapper-fixer (1.2) com.github.camork.fileExpander (2.5) com.wakatime.intellij.plugin (14.3.13) XPathView (241.14494.140) com.intellij.tasks (241.14494.150) com.intellij.tasks.timeTracking (241.14494.150) com.intellij.plugin.adernov.powershell (2.6.1) com.intellij.aqua (241.14494.288) com.intellij.mermaid (0.0.21+IJ.232) com.intellij.kubernetes (241.14494.150) com.intellij.laf.macos (241.14494.150) com.intellij.grazie.pro (0.3.300) com.intellij.ml.llm (241.14494.320) Dart (241.15845) com.github.copilot (1.5.2.5392-nightly) io.wisetime.plugins.window.branch (2.0.0) com.intellij.queryComplexity (241.14494.150) app.codepreview.plugin (1.2.1) NodeJS (241.14494.155) com.dmarcotte.handlebars (241.14494.150) me.mbolotov.cypress (1.6.2) tslint (241.14494.155) com.intellij.tide (241.14494.288) intellij.prettierJS (241.14494.155) Karma (241.14494.155) com.sourcegraph.jetbrains (5.5.5) com.intellij.jira (4.8.0) mobi.hsz.idea.gitignore (4.5.3) com.github.linwancen.drawgraph (1.13.2024.03.24_09.36) codiumai.codiumai (0.7.33) org.jetbrains.plugins.tinygo (0.5.13) com.github.dinbtechit.vscodetheme (1.10.10) com.ypwang.plugin.go-linter (1.6.6) cn.yiiguxing.plugin.translate (3.5.8) AngularJS (241.14494.155) dev.nx.console (1.21.0)

Describe the bug

Regular work

Expected behavior

Regular work

Additional context

Stacktrace:

java.lang.StringIndexOutOfBoundsException: begin 0, end 9, length 8
 at java.base/java.lang.String.checkBoundsBeginEnd(String.java:4606)
 at java.base/java.lang.String.substring(String.java:2709)
 at com.sourcegraph.cody.autocomplete.CodyAutocompleteManager.displayAgentAutocomplete(CodyAutocompleteManager.kt:376)
 at com.sourcegraph.cody.autocomplete.CodyAutocompleteManager.processAutocompleteResult$lambda$15$lambda$14(CodyAutocompleteManager.kt:320)
 at com.intellij.openapi.command.WriteCommandAction.lambda$runWriteCommandAction$4(WriteCommandAction.java:338)
 at com.intellij.openapi.command.WriteCommandAction$BuilderImpl.lambda$doRunWriteCommandAction$1(WriteCommandAction.java:144)
 at com.intellij.openapi.application.impl.RwLockHolder.runWriteAction(RwLockHolder.kt:344)
 at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:883)
 at com.intellij.openapi.command.WriteCommandAction$BuilderImpl.lambda$doRunWriteCommandAction$2(WriteCommandAction.java:142)
 at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:225)
 at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:187)
 at com.intellij.openapi.command.WriteCommandAction$BuilderImpl.doRunWriteCommandAction(WriteCommandAction.java:151)
 at com.intellij.openapi.command.WriteCommandAction$BuilderImpl.run(WriteCommandAction.java:118)
 at com.intellij.openapi.command.WriteCommandAction.runWriteCommandAction(WriteCommandAction.java:338)
 at com.intellij.openapi.command.WriteCommandAction.runWriteCommandAction(WriteCommandAction.java:326)
 at com.sourcegraph.cody.autocomplete.CodyAutocompleteManager.processAutocompleteResult$lambda$15(CodyAutocompleteManager.kt:319)
 at com.intellij.openapi.application.TransactionGuardImpl.runWithWritingAllowed(TransactionGuardImpl.java:209)
 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.RwLockHolder.runIntendedWriteActionOnCurrentThread(RwLockHolder.kt:204)
 at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:830)
 at com.intellij.openapi.application.impl.ApplicationImpl$2.run(ApplicationImpl.java:419)
 at com.intellij.openapi.application.impl.RwLockHolder.runWithEnabledImplicitRead(RwLockHolder.kt:138)
 at com.intellij.openapi.application.impl.RwLockHolder.runWithImplicitRead(RwLockHolder.kt:129)
 at com.intellij.openapi.application.impl.ApplicationImpl.runWithImplicitRead(ApplicationImpl.java:1152)
 at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:81)
 at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:123)
 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:792)
 at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:739)
 at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:733)
 at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
 at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
 at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:761)
 at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.kt:698)
 at com.intellij.ide.IdeEventQueue._dispatchEvent$lambda$12(IdeEventQueue.kt:593)
 at com.intellij.openapi.application.impl.RwLockHolder.runWithoutImplicitRead(RwLockHolder.kt:105)
 at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.kt:593)
 at com.intellij.ide.IdeEventQueue.access$_dispatchEvent(IdeEventQueue.kt:77)
 at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:362)
 at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:361)
 at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:843)
 at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:361)
 at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:356)
 at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$1(IdeEventQueue.kt:1021)
 at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:106)
 at com.intellij.ide.IdeEventQueueKt.performActivity(IdeEventQueue.kt:1021)
 at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$7(IdeEventQueue.kt:356)
 at com.intellij.openapi.application.impl.RwLockHolder.runIntendedWriteActionOnCurrentThread(RwLockHolder.kt:209)
 at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:830)
 at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.kt:398)
 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)
taylorsperry commented 6 months ago

closing in favor of https://github.com/sourcegraph/jetbrains/issues/1406