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

CodeWhispererUserModificationTracker throws IndexOutOfBoundsException #5187

Open
aviplot opened this issue Dec 11, 2024 · 0 comments
Open

CodeWhispererUserModificationTracker throws IndexOutOfBoundsException #5187

aviplot opened this issue Dec 11, 2024 · 0 comments
Labels
amazon-q bug We can reproduce the issue and confirmed it is a bug. codewhisperer

Comments

@aviplot
Copy link

aviplot commented Dec 11, 2024

java.lang.IndexOutOfBoundsException: chars sequence.length:1826, start:1921, end:1932
at com.intellij.util.text.CharSequenceSubSequence.(CharSequenceSubSequence.java:33)
at com.intellij.util.text.ImmutableText.subSequence(ImmutableText.java:199)
at com.intellij.openapi.editor.impl.DocumentImpl.lambda$getText$2(DocumentImpl.java:954)
at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runReadAction(AnyThreadWriteThreadingSupport.kt:264)
at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runReadAction(AnyThreadWriteThreadingSupport.kt:221)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:857)
at com.intellij.openapi.application.ReadAction.compute(ReadAction.java:66)
at com.intellij.openapi.editor.impl.DocumentImpl.getText(DocumentImpl.java:954)
at software.aws.toolkits.jetbrains.services.codewhisperer.telemetry.CodeWhispererUserModificationTracker.emitTelemetryOnSuggestion(CodeWhispererUserModificationTracker.kt:165)
at software.aws.toolkits.jetbrains.services.codewhisperer.telemetry.CodeWhispererUserModificationTracker.flush(CodeWhispererUserModificationTracker.kt:120)
at software.aws.toolkits.jetbrains.services.codewhisperer.telemetry.CodeWhispererUserModificationTracker.scheduleCodeWhispererTracker$lambda$0(CodeWhispererUserModificationTracker.kt:91)
at com.intellij.util.Alarm$Request.lambda$runSafely$0(Alarm.java:371)
at com.intellij.util.concurrency.ChildContext$runAsCoroutine$1.invoke(propagation.kt:92)
at com.intellij.util.concurrency.ChildContext$runAsCoroutine$1.invoke(propagation.kt:92)
at com.intellij.util.concurrency.ChildContext.runAsCoroutine(propagation.kt:97)
at com.intellij.util.concurrency.ChildContext.runAsCoroutine(propagation.kt:92)
at com.intellij.util.Alarm$Request.lambda$runSafely$1(Alarm.java:369)
at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:255)
at com.intellij.util.Alarm$Request.runSafely(Alarm.java:368)
at com.intellij.util.Alarm$Request.run(Alarm.java:356)
at com.intellij.util.concurrency.Propagation.contextAwareCallable$lambda$2(propagation.kt:383)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
at com.intellij.util.concurrency.SchedulingWrapper$MyScheduledFutureTask.run(SchedulingWrapper.java:272)
at com.intellij.util.concurrency.BoundedTaskExecutor.doRun(BoundedTaskExecutor.java:249)
at com.intellij.util.concurrency.BoundedTaskExecutor.access$200(BoundedTaskExecutor.java:30)
at com.intellij.util.concurrency.BoundedTaskExecutor$1.executeFirstTaskAndHelpQueue(BoundedTaskExecutor.java:227)
at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:218)
at com.intellij.util.concurrency.BoundedTaskExecutor$1.run(BoundedTaskExecutor.java:212)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:735)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:732)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:732)
at java.base/java.lang.Thread.run(Thread.java:1583)

@aviplot aviplot added the bug We can reproduce the issue and confirmed it is a bug. label Dec 11, 2024
@rli rli changed the title IntelliJ plugin issue CodeWhispererUserModificationTracker throws IndexOutOfBoundsException Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
amazon-q bug We can reproduce the issue and confirmed it is a bug. codewhisperer
Projects
None yet
Development

No branches or pull requests

2 participants