Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JetBrains: Crash occurred while deleting suggestion generated by autocomplete #1988

Closed
jay-fibi opened this issue Aug 6, 2024 · 1 comment
Assignees
Labels

Comments

@jay-fibi
Copy link
Collaborator

jay-fibi commented Aug 6, 2024

IDE Information

IntelliJ IDEA 2023.3.3 (Community Edition)
Build #IC-233.14015.106, built on January 25, 2024
Runtime version: 17.0.9+7-b1087.11 aarch64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 14.3
GC: G1 Young Generation, G1 Old Generation
Memory: 2048M
Cores: 8
Metal Rendering is ON
Registry:
ide.experimental.ui=true
Non-Bundled Plugins:
idea.plugin.protoeditor (233.13135.65)
DevKit (233.14015.152)
gherkin (233.11799.165)
cucumber-java (233.11799.196)
PythonCore (233.14015.106)
com.sourcegraph.jetbrains (6.0.22-nightly)
Kotlin: 233.14015.106-IJ

Bug Description

Platform: macOS

Steps to reproduce:

  1. Have Cody plugin installed in your JB IntelliJ editor
  2. Login to Cody with Free/Pro user
  3. Type something in a source code file and trigger Autocompletion
  4. Clear the auto completed code

Expected behavior:

Crash should not occur.

Observed behavior:

Crash occurred with following stacktrace.

Stacktrace:

java.lang.IndexOutOfBoundsException: Wrong offset: 194. Should be in range: [0, 189]
	at com.intellij.openapi.editor.impl.LineSet.findLineIndex(LineSet.java:164)
	at com.intellij.openapi.editor.impl.DocumentImpl.getLineNumber(DocumentImpl.java:1001)
	at com.sourcegraph.cody.agent.intellij_extensions.DocumentKt.codyRange(Document.kt:16)
	at com.sourcegraph.cody.inspections.CodyFixHighlightPass.doCollectInformation(CodyFixHighlightPass.kt:53)
	at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:55)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$1(PassExecutorService.java:406)
	at com.intellij.platform.diagnostic.telemetry.helpers.TraceKt.runWithSpanIgnoreThrows(trace.kt:76)
	at com.intellij.platform.diagnostic.telemetry.helpers.TraceUtil.runWithSpanThrows(TraceUtil.java:34)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$2(PassExecutorService.java:401)
	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1075)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$3(PassExecutorService.java:392)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$12(CoreProgressManager.java:610)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:685)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:641)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:609)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:78)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.doRun(PassExecutorService.java:391)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$run$0(PassExecutorService.java:367)
	at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:200)
	at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:184)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:365)
	at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:187)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182)
	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165)

Additional context

Video link:

https://drive.google.com/file/d/1ftGcKAaJy-3HtnxFiEcISlDpI8KHruDj/view?usp=drive_link

@jay-fibi jay-fibi added bug Something isn't working fibilabs-qa fibilabs-qa-p0 labels Aug 6, 2024
@steveyegge steveyegge self-assigned this Aug 6, 2024
@mkondratek mkondratek assigned mkondratek and unassigned steveyegge Sep 9, 2024
@mkondratek
Copy link
Contributor

mkondratek commented Sep 9, 2024

mkondratek added a commit that referenced this issue Sep 9, 2024
mkondratek added a commit that referenced this issue Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants