smallcloudai / refact-intellij

Refact AI: Open-source AI Code assistant with autocompletion, chat, refactoring and more for IntelliJ JetBrains IDEs
https://refact.ai
BSD 3-Clause "New" or "Revised" License
38 stars 13 forks source link

[JB plugin] Internal error: ArrayIndexOutOfBoundsException #110

Open hazratisulton opened 9 months ago

hazratisulton commented 9 months ago

An internal error happened in the IDE plugin.

Message: (no message)

Stack trace

java.lang.ArrayIndexOutOfBoundsException: Index -1 out of bounds for length 6
    at java.base/java.util.Arrays$ArrayList.get(Arrays.java:4165)
    at com.smallcloud.refactai.aitoolbox.table.LongthinkTableModel.elementAt(LongthinkTableModel.kt:54)
    at com.smallcloud.refactai.aitoolbox.table.LongthinkTable.getComponentPopupMenu(LongthinkTable.kt:30)
    at com.intellij.util.ui.UIUtil.lambda$static$7(UIUtil.java:2180)
    at com.intellij.util.containers.FilteredTraverserBase$Meta.childrenImpl(FilteredTraverserBase.java:388)
    at com.intellij.util.containers.FilteredTraverserBase$Meta.children(FilteredTraverserBase.java:374)
    at com.intellij.util.containers.FilteredTraverserBase.children(FilteredTraverserBase.java:258)
    at com.intellij.util.containers.TreeTraversal$P.iterable(TreeTraversal.java:761)
    at com.intellij.util.containers.TreeTraversal$P.iterator(TreeTraversal.java:755)
    at com.intellij.util.containers.TreeTraversal$BiOrderIt.nextImpl(TreeTraversal.java:497)
    at com.intellij.util.containers.JBIterator.peekNext(JBIterator.java:132)
    at com.intellij.util.containers.JBIterator.hasNext(JBIterator.java:92)
    at com.intellij.openapi.MnemonicHelper$MnemonicFixer.addTo(MnemonicHelper.java:176)
    at com.intellij.openapi.MnemonicHelper$MnemonicFixer.componentAdded(MnemonicHelper.java:196)
    at java.desktop/java.awt.AWTEventMulticaster.componentAdded(AWTEventMulticaster.java:208)
    at java.desktop/java.awt.AWTEventMulticaster.componentAdded(AWTEventMulticaster.java:207)
    at java.desktop/java.awt.Container.processContainerEvent(Container.java:2292)
    at java.desktop/java.awt.Container.processEvent(Container.java:2263)
    at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5027)
    at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2324)
    at java.desktop/java.awt.Component.dispatchEvent(Component.java:4855)
    at java.desktop/java.awt.Container.lambda$addImpl$0(Container.java:1167)
    at java.desktop/sun.awt.SunToolkit.lambda$performWithTreeLock$1(SunToolkit.java:2139)
    at java.desktop/sun.awt.SunToolkit.performOnMainThreadIfNeeded(SunToolkit.java:2164)
    at java.desktop/sun.awt.SunToolkit.performWithTreeLock(SunToolkit.java:2137)
    at java.desktop/java.awt.Container.addImpl(Container.java:1104)
    at java.desktop/java.awt.Container.add(Container.java:440)
    at com.smallcloud.refactai.aitoolbox.ToolboxPane$setupPanes$$inlined$invokeLater$default$1.run(actions.kt:64)
    at com.intellij.openapi.application.TransactionGuardImpl.runWithWritingAllowed(TransactionGuardImpl.java:208)
    at com.intellij.openapi.application.TransactionGuardImpl.access$100(TransactionGuardImpl.java:21)
    at com.intellij.openapi.application.TransactionGuardImpl$1.run(TransactionGuardImpl.java:190)
    at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:861)
    at com.intellij.openapi.application.impl.ApplicationImpl$4.run(ApplicationImpl.java:478)
    at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:79)
    at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:121)
    at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:41)
    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:690)
    at com.intellij.ide.IdeEventQueue._dispatchEvent$lambda$10(IdeEventQueue.kt:593)
    at com.intellij.openapi.application.impl.ApplicationImpl.runWithoutImplicitRead(ApplicationImpl.java:1485)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.kt:593)
    at com.intellij.ide.IdeEventQueue.access$_dispatchEvent(IdeEventQueue.kt:67)
    at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:369)
    at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:368)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:787)
    at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:368)
    at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:363)
    at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$1(IdeEventQueue.kt:997)
    at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:105)
    at com.intellij.ide.IdeEventQueueKt.performActivity(IdeEventQueue.kt:997)
    at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$7(IdeEventQueue.kt:363)
    at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:861)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.kt:405)
    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)

Environment

Additional information

The problem occurred once after updating the plugin