sourcegraph / jetbrains

Apache License 2.0
72 stars 23 forks source link

bug: java.lang.IllegalArgumentException: Invalid range specified: (8534, 8533); #1733

Open developer6it opened 5 months ago

developer6it commented 5 months ago

Cody Version

ultimate version

IDE Information

android studio

Describe the bug

not response

Expected behavior

response

Additional context

Stacktrace:

java.lang.IllegalArgumentException: Invalid range specified: (8534, 8533);
 at com.intellij.openapi.util.TextRange.assertProperRange(TextRange.java:235)
 at com.intellij.openapi.util.TextRange.assertProperRange(TextRange.java:230)
 at com.intellij.openapi.util.TextRange.assertProperRange(TextRange.java:226)
 at com.intellij.openapi.util.TextRange.(TextRange.java:43)
 at com.intellij.openapi.util.TextRange.(TextRange.java:32)
 at com.intellij.openapi.util.TextRange.create(TextRange.java:155)
 at com.sourcegraph.utils.CodyEditorUtil.getTextRange(CodyEditorUtil.kt:102)
 at com.sourcegraph.cody.autocomplete.CodyAutocompleteManager.displayAgentAutocomplete(CodyAutocompleteManager.kt:357)
 at com.sourcegraph.cody.autocomplete.CodyAutocompleteManager.processAutocompleteResult$lambda$16$lambda$15(CodyAutocompleteManager.kt:336)
 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.ApplicationImpl.runWriteAction(ApplicationImpl.java:975)
 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$16(CodyAutocompleteManager.kt:335)
 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.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:843)
 at com.intellij.openapi.application.impl.ApplicationImpl$4.run(ApplicationImpl.java:463)
 at com.intellij.openapi.application.impl.RwLockHolder.runWithEnabledImplicitRead(RwLockHolder.kt:75)
 at com.intellij.openapi.application.impl.RwLockHolder.runWithImplicitRead(RwLockHolder.kt:67)
 at com.intellij.openapi.application.impl.ApplicationImpl.runWithImplicitRead(ApplicationImpl.java:1436)
 at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:82)
 at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:124)
 at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:44)
 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:695)
 at com.intellij.ide.IdeEventQueue._dispatchEvent$lambda$12(IdeEventQueue.kt:589)
 at com.intellij.openapi.application.impl.RwLockHolder.runWithoutImplicitRead(RwLockHolder.kt:44)
 at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.kt:589)
 at com.intellij.ide.IdeEventQueue.access$_dispatchEvent(IdeEventQueue.kt:72)
 at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:355)
 at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:354)
 at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:793)
 at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:354)
 at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:349)
 at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$1(IdeEventQueue.kt:1014)
 at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:106)
 at com.intellij.ide.IdeEventQueueKt.performActivity(IdeEventQueue.kt:1014)
 at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$7(IdeEventQueue.kt:349)
 at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:848)
 at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.kt:391)
 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)
odisseus commented 5 months ago

Can you give us more information about your environment? Please follow these instructions (Mac OS, other OS) and copy the information from the About dialog.