TheBlob42 / idea-which-key

IdeaVim extension that displays available keybindings in a popup
GNU General Public License v3.0
187 stars 12 forks source link

Plugin crashing #65

Open Quanalogy opened 7 months ago

Quanalogy commented 7 months ago

I've got the follow exception when using this plugin:

Unhandled exception in [StandaloneCoroutine{Cancelling}@3177b6ef, Dispatchers.Default]

java.lang.ArrayIndexOutOfBoundsException: No such child: 3
    at java.desktop/java.awt.Container.getComponent(Container.java:354)
    at java.desktop/javax.swing.JLayeredPane.insertIndexForLayer(JLayeredPane.java:663)
    at java.desktop/javax.swing.JLayeredPane.insertIndexForLayer(JLayeredPane.java:638)
    at java.desktop/javax.swing.JLayeredPane.addImpl(JLayeredPane.java:232)
    at java.desktop/java.awt.Container.add(Container.java:440)
    at com.intellij.ui.BalloonImpl.createComponent(BalloonImpl.java:784)
    at com.intellij.ui.BalloonImpl.show(BalloonImpl.java:574)
    at com.intellij.ui.BalloonImpl.show(BalloonImpl.java:456)
    at com.intellij.ui.BalloonImpl.show(BalloonImpl.java:427)
    at eu.theblob42.idea.whichkey.config.PopupConfig$showPopup$1.invokeSuspend(PopupConfig.kt:155)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
    at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)
    Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelled}@3177b6ef, Dispatchers.Default]

I'm not quite sure what I did but I got the following config:

set number
set relativenumber

"" -- Suggested options --
" Show a few lines of context around the cursor. Note that this makes the
" text scroll if you mouse-click near the start or end of the window.
set scrolloff=5

" Do incremental searching.
set incsearch

" Don't use Ex mode, use Q for formatting.
map Q gq

" --- Enable IdeaVim plugins https://jb.gg/ideavim-plugins

" Highlight copied text
Plug 'machakann/vim-highlightedyank'
" Commentary plugin
Plug 'tpope/vim-commentary'

"" -- Map IDE actions to IdeaVim -- https://jb.gg/abva4t
"" Map \r to the Reformat Code action
map \r <Action>(ReformatCode)

"" Map <leader>d to start debug
map \d <Action>(Debug)

"" Map \b to toggle the breakpoint on the current line
map \b <Action>(ToggleLineBreakpoint)

"" -- Make sourround insertions work
" https://youtrack.jetbrains.com/issue/VIM-452/IdeaVim-breaks-surround-selection-on-typing-quote-or-brace-option
set surround

"" -- Make  + n create a new file
nnoremap <leader>n :action NewFile<CR>

set which-key
set notimeout
TheBlob42 commented 7 months ago

Looks like the same error as reported in #39 :thinking: There I personally could not reproduce it, but maybe we can get enough information this time. Which program are you using (e.g. Intellij, Rider, Android Studio etc.)? Which version? Which plugins do you have installed (all of them) and which versions? Does the error only occur when performing a special action or randomly?

TheBlob42 commented 7 months ago

To add I just quickly tested your .ideavimrc in my setup and could not provoke the error message unfortunately

Quanalogy commented 6 months ago

@TheBlob42 sorry for not answering, managed to read without acting..

This has happened to me a couple of times but I have not recreated it since I posted. I'll do my best to think when this happens 😅

I'm using pycharm professional 2024.1.1 Plugins:

Ansible v0.92 GitLab Duo v2.0.3 Ideavim v2.11.0 Jetbrains Ai assistant 241.15989.156 Kubernetes 241.15989.102 Nginx 2022.1.1 Powershell 2.6.1 Space 241.15989.9 Terraform and hcl 241.15989.49

zaixiabalala commented 3 months ago

Upgrading all your plugins and IDE to the latest version may resolve the issue.