Additional contextjava.lang.IndexOutOfBoundsException: chars sequence.length:0, start:31, end:60 at com.intellij.util.text.CharSequenceSubSequence.<init>(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)
I have exactly the same problem, with exactly the same versions of the plugin and other factors (but Windows 10). Also, Amazon Q does not work at all (chat), although CodeWhisperer continues to work.
Describe the bug The plugin throws exception from time to time. The behavior started with version 3.34-242
To reproduce There are no steps to reproduce. It happens randomly, irrespective of interaction with the plugin
Expected behavior
Screenshots
Your Environment
Additional context
java.lang.IndexOutOfBoundsException: chars sequence.length:0, start:31, end:60 at com.intellij.util.text.CharSequenceSubSequence.<init>(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)