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

升级插件版本到8.12之后报错,无法打开 Cannot invoke "com.intellij.ui.content.Content.getComponent()" #719

Closed
xiongzh2000 opened this issue May 17, 2024 · 1 comment

Comments

@xiongzh2000
Copy link

Describe the bug
IDEA 2023.3.6 升级插件版本到8.12之后报错,无法打开插件, 报错

  1. java.lang.NullPointerException: Cannot invoke "com.intellij.ui.content.Content.getComponent()" because the return value of "com.intellij.ui.content.ContentManager.getContent(int)" is null
  2. java.lang.Throwable: Assert: must be called on EDT

Software versions(Help -> About)

  • Product: [e.g IDEA 2023.3.6]

  • VM:[e.g OpenJDK "11.0.11"]

  • OS:[e.g macOS Sonoma]

PositionAction#Update@ContextToolbar (com.shuzijun.leetcode.plugin.actions.editor.PositionAction), actionId=leetcode.positionAction, text='position'

java.lang.NullPointerException: Cannot invoke "com.intellij.ui.content.Content.getComponent()" because the return value of "com.intellij.ui.content.ContentManager.getContent(int)" is null
at com.shuzijun.leetcode.plugin.window.WindowFactory.getDataContext(WindowFactory.java:56)
at com.shuzijun.leetcode.plugin.actions.editor.PositionAction.update(PositionAction.java:28)
at com.intellij.openapi.actionSystem.ex.ActionUtil.lambda$performDumbAwareUpdate$0(ActionUtil.java:164)
at com.intellij.openapi.actionSystem.ex.ActionUtil.performDumbAwareUpdate(ActionUtil.java:187)
at com.intellij.openapi.actionSystem.impl.ActionUpdaterKt.doUpdate(ActionUpdater.kt:696)
at com.intellij.openapi.actionSystem.impl.ActionUpdaterKt.access$doUpdate(ActionUpdater.kt:1)
at com.intellij.openapi.actionSystem.impl.ActionUpdater$updateActionReal$success$1.invoke(ActionUpdater.kt:110)
at com.intellij.openapi.actionSystem.impl.ActionUpdater$updateActionReal$success$1.invoke(ActionUpdater.kt:109)
at com.intellij.openapi.actionSystem.impl.ActionUpdater$callAction$3$adjustedCall$1.invoke(ActionUpdater.kt:157)
at com.intellij.openapi.application.rw.InternalReadAction.insideReadAction(InternalReadAction.kt:108)
at com.intellij.openapi.application.rw.InternalReadAction.access$insideReadAction(InternalReadAction.kt:16)
at com.intellij.openapi.application.rw.InternalReadAction$tryReadCancellable$2.invoke(InternalReadAction.kt:95)
at com.intellij.openapi.application.rw.InternalReadAction$tryReadCancellable$2.invoke(InternalReadAction.kt:94)
at com.intellij.openapi.application.rw.CancellableReadActionKt$cancellableReadActionInternal$1.invoke$lambda$1$lambda$0(cancellableReadAction.kt:38)
at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1075)
at com.intellij.openapi.application.rw.CancellableReadActionKt$cancellableReadActionInternal$1.invoke$lambda$1(cancellableReadAction.kt:36)
at com.intellij.openapi.progress.util.ProgressIndicatorUtilService.runActionAndCancelBeforeWrite(ProgressIndicatorUtilService.java:73)
at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runActionAndCancelBeforeWrite(ProgressIndicatorUtils.java:128)
at com.intellij.openapi.application.rw.CancellableReadActionKt$cancellableReadActionInternal$1.invoke(cancellableReadAction.kt:34)
at com.intellij.openapi.progress.CoroutinesKt.blockingContextInner(coroutines.kt:321)
at com.intellij.openapi.progress.CoroutinesKt.blockingContext(coroutines.kt:310)
at com.intellij.openapi.application.rw.CancellableReadActionKt.cancellableReadActionInternal(cancellableReadAction.kt:31)
at com.intellij.openapi.application.rw.InternalReadAction.tryReadCancellable(InternalReadAction.kt:94)
at com.intellij.openapi.application.rw.InternalReadAction.tryReadAction(InternalReadAction.kt:78)
at com.intellij.openapi.application.rw.InternalReadAction.readLoop(InternalReadAction.kt:65)
at com.intellij.openapi.application.rw.InternalReadAction.access$readLoop(InternalReadAction.kt:16)
at com.intellij.openapi.application.rw.InternalReadAction$runReadAction$3.invokeSuspend(InternalReadAction.kt:36)
at com.intellij.openapi.application.rw.InternalReadAction$runReadAction$3.invoke(InternalReadAction.kt)
at com.intellij.openapi.application.rw.InternalReadAction$runReadAction$3.invoke(InternalReadAction.kt)
at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:78)
at kotlinx.coroutines.CoroutineScopeKt.coroutineScope(CoroutineScope.kt:264)
at com.intellij.openapi.application.rw.InternalReadAction.runReadAction(InternalReadAction.kt:35)
at com.intellij.openapi.application.rw.PlatformReadWriteActionSupport.executeReadAction(PlatformReadWriteActionSupport.kt:38)
at com.intellij.openapi.application.ReadWriteActionSupport.executeReadAction$default(ReadWriteActionSupport.kt:15)
at com.intellij.openapi.application.CoroutinesKt.constrainedReadActionUndispatched(coroutines.kt:82)
at com.intellij.openapi.application.CoroutinesKt.readActionUndispatched(coroutines.kt:69)
at com.intellij.openapi.actionSystem.impl.ActionUpdater.callAction(ActionUpdater.kt:740)
at com.intellij.openapi.actionSystem.impl.ActionUpdater.callAction(ActionUpdater.kt:134)
at com.intellij.openapi.actionSystem.impl.ActionUpdater.updateActionReal(ActionUpdater.kt:109)
at com.intellij.openapi.actionSystem.impl.ActionUpdater.update(ActionUpdater.kt:531)
at com.intellij.openapi.actionSystem.impl.ActionUpdater.expandGroupChild(ActionUpdater.kt:388)
at com.intellij.openapi.actionSystem.impl.ActionUpdater.access$expandGroupChild(ActionUpdater.kt:71)
at com.intellij.openapi.actionSystem.impl.ActionUpdater$doExpandActionGroup$2$result$1$1$1.invokeSuspend(ActionUpdater.kt:342)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:115)
at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:103)
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)




堆栈2

java.lang.Throwable: Assert: must be called on EDT
at com.intellij.openapi.diagnostic.Logger.error(Logger.java:376)
at com.intellij.util.ui.EDT.assertIsEdt(EDT.java:68)
at com.intellij.openapi.wm.impl.FocusManagerImpl.assertDispatchThread(FocusManagerImpl.java:341)
at com.intellij.openapi.wm.impl.FocusManagerImpl.getFocusOwner(FocusManagerImpl.java:183)
at com.intellij.ui.tabs.impl.JBTabsImpl.executeSelectionChange(JBTabsImpl.kt:1286)
at com.intellij.ui.tabs.impl.JBTabsImpl.doSetSelected(JBTabsImpl.kt:1276)
at com.intellij.ui.tabs.impl.JBTabsImpl.select(JBTabsImpl.kt:1258)
at com.shuzijun.leetcode.plugin.window.NavigatorTabsPanel.(NavigatorTabsPanel.java:93)
at com.shuzijun.leetcode.plugin.window.WindowFactory.createToolWindowContent(WindowFactory.java:34)
at com.intellij.openapi.wm.impl.ToolWindowImpl.createContentIfNeeded(ToolWindowImpl.kt:594)
at com.intellij.openapi.wm.impl.ToolWindowImpl.getContentManager(ToolWindowImpl.kt:460)
at com.shuzijun.leetcode.plugin.window.WindowFactory.getDataContext(WindowFactory.java:56)
at com.shuzijun.leetcode.plugin.actions.editor.PositionAction.update(PositionAction.java:28)
at com.intellij.openapi.actionSystem.ex.ActionUtil.lambda$performDumbAwareUpdate$0(ActionUtil.java:164)
at com.intellij.openapi.actionSystem.ex.ActionUtil.performDumbAwareUpdate(ActionUtil.java:187)
at com.intellij.openapi.actionSystem.impl.ActionUpdaterKt.doUpdate(ActionUpdater.kt:696)
at com.intellij.openapi.actionSystem.impl.ActionUpdaterKt.access$doUpdate(ActionUpdater.kt:1)
at com.intellij.openapi.actionSystem.impl.ActionUpdater$updateActionReal$success$1.invoke(ActionUpdater.kt:110)
at com.intellij.openapi.actionSystem.impl.ActionUpdater$updateActionReal$success$1.invoke(ActionUpdater.kt:109)
at com.intellij.openapi.actionSystem.impl.ActionUpdater$callAction$3$adjustedCall$1.invoke(ActionUpdater.kt:157)
at com.intellij.openapi.application.rw.InternalReadAction.insideReadAction(InternalReadAction.kt:108)
at com.intellij.openapi.application.rw.InternalReadAction.access$insideReadAction(InternalReadAction.kt:16)
at com.intellij.openapi.application.rw.InternalReadAction$tryReadCancellable$2.invoke(InternalReadAction.kt:95)
at com.intellij.openapi.application.rw.InternalReadAction$tryReadCancellable$2.invoke(InternalReadAction.kt:94)
at com.intellij.openapi.application.rw.CancellableReadActionKt$cancellableReadActionInternal$1.invoke$lambda$1$lambda$0(cancellableReadAction.kt:38)
at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1075)
at com.intellij.openapi.application.rw.CancellableReadActionKt$cancellableReadActionInternal$1.invoke$lambda$1(cancellableReadAction.kt:36)
at com.intellij.openapi.progress.util.ProgressIndicatorUtilService.runActionAndCancelBeforeWrite(ProgressIndicatorUtilService.java:73)
at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runActionAndCancelBeforeWrite(ProgressIndicatorUtils.java:128)
at com.intellij.openapi.application.rw.CancellableReadActionKt$cancellableReadActionInternal$1.invoke(cancellableReadAction.kt:34)
at com.intellij.openapi.progress.CoroutinesKt.blockingContextInner(coroutines.kt:321)
at com.intellij.openapi.progress.CoroutinesKt.blockingContext(coroutines.kt:310)
at com.intellij.openapi.application.rw.CancellableReadActionKt.cancellableReadActionInternal(cancellableReadAction.kt:31)
at com.intellij.openapi.application.rw.InternalReadAction.tryReadCancellable(InternalReadAction.kt:94)
at com.intellij.openapi.application.rw.InternalReadAction.tryReadAction(InternalReadAction.kt:78)
at com.intellij.openapi.application.rw.InternalReadAction.readLoop(InternalReadAction.kt:65)
at com.intellij.openapi.application.rw.InternalReadAction.access$readLoop(InternalReadAction.kt:16)
at com.intellij.openapi.application.rw.InternalReadAction$runReadAction$3.invokeSuspend(InternalReadAction.kt:36)
at com.intellij.openapi.application.rw.InternalReadAction$runReadAction$3.invoke(InternalReadAction.kt)
at com.intellij.openapi.application.rw.InternalReadAction$runReadAction$3.invoke(InternalReadAction.kt)
at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:78)
at kotlinx.coroutines.CoroutineScopeKt.coroutineScope(CoroutineScope.kt:264)
at com.intellij.openapi.application.rw.InternalReadAction.runReadAction(InternalReadAction.kt:35)
at com.intellij.openapi.application.rw.PlatformReadWriteActionSupport.executeReadAction(PlatformReadWriteActionSupport.kt:38)
at com.intellij.openapi.application.ReadWriteActionSupport.executeReadAction$default(ReadWriteActionSupport.kt:15)
at com.intellij.openapi.application.CoroutinesKt.constrainedReadActionUndispatched(coroutines.kt:82)
at com.intellij.openapi.application.CoroutinesKt.readActionUndispatched(coroutines.kt:69)
at com.intellij.openapi.actionSystem.impl.ActionUpdater.callAction(ActionUpdater.kt:740)
at com.intellij.openapi.actionSystem.impl.ActionUpdater.callAction(ActionUpdater.kt:134)
at com.intellij.openapi.actionSystem.impl.ActionUpdater.updateActionReal(ActionUpdater.kt:109)
at com.intellij.openapi.actionSystem.impl.ActionUpdater.update(ActionUpdater.kt:531)
at com.intellij.openapi.actionSystem.impl.ActionUpdater.expandGroupChild(ActionUpdater.kt:388)
at com.intellij.openapi.actionSystem.impl.ActionUpdater.access$expandGroupChild(ActionUpdater.kt:71)
at com.intellij.openapi.actionSystem.impl.ActionUpdater$doExpandActionGroup$2$result$1$1$1.invokeSuspend(ActionUpdater.kt:342)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:115)
at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:103)
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)

@qqkstar
Copy link

qqkstar commented May 19, 2024

I wasn't able to log in after upgrading to 8.12 due to the issue above.
For a quick fix, I had to revert the version to 8.11: https://plugins.jetbrains.com/plugin/12132-leetcode-editor/versions/stable/502114

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants