beansoft / iscratch-support

Supports for the Notes IDEA plugin
Other
6 stars 0 forks source link

The plugin throws an exception and stops working on IDE launch #33

Closed ygrigoriev closed 1 year ago

ygrigoriev commented 1 year ago

What happened

On IDE launch this exception is thrown and the plugin doesn't work: on the main window shows "Nothing to show" sign.

Version information

PhpStorm 2022.3.2 • Notes plugin com.github.beansoft.iscratch 2023.1.0 EAP

Exception

null

com.intellij.diagnostic.PluginException: Cannot init toolwindow com.github.beansoft.iscratch.ui.CodePaneToolWindowFactory@31f2e04a [Plugin: com.github.beansoft.iscratch]
    at com.intellij.toolWindow.ToolWindowSetInitializer.createAndLayoutToolWindows$registerToolWindows(ToolWindowSetInitializer.kt:141)
    at com.intellij.toolWindow.ToolWindowSetInitializer.createAndLayoutToolWindows(ToolWindowSetInitializer.kt:160)
    at com.intellij.toolWindow.ToolWindowSetInitializer.access$createAndLayoutToolWindows(ToolWindowSetInitializer.kt:46)
    at com.intellij.toolWindow.ToolWindowSetInitializer$initUi$3.invokeSuspend(ToolWindowSetInitializer.kt:106)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
    at com.intellij.openapi.application.TransactionGuardImpl$1.run(TransactionGuardImpl.java:194)
    at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:838)
    at com.intellij.openapi.application.impl.ApplicationImpl$3.run(ApplicationImpl.java:454)
    at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:74)
    at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:114)
    at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:36)
    at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318)
    at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:779)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:730)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:724)
    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:749)
    at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:909)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:756)
    at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$5(IdeEventQueue.java:437)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:787)
    at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$6(IdeEventQueue.java:436)
    at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:105)
    at com.intellij.ide.IdeEventQueue.performActivity(IdeEventQueue.java:615)
    at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$7(IdeEventQueue.java:434)
    at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:838)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:480)
    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)
Caused by: java.lang.IllegalArgumentException: Argument for @NotNull parameter 'file' of beansoft/intellij/images/editor/impl/ImageEditorImpl.<init> must not be null
    at beansoft.intellij.images.editor.impl.ImageEditorImpl.$$$reportNull$$$0(ImageEditorImpl.java)
    at beansoft.intellij.images.editor.impl.ImageEditorImpl.<init>(ImageEditorImpl.java)
    at com.github.beansoft.iscratch.ui.CodeViewComponent.<init>(CodeViewComponent.java:265)
    at com.github.beansoft.iscratch.ui.ScratchCodePane.createBottom(ScratchCodePane.java:1315)
    at com.github.beansoft.iscratch.ui.ScratchCodePane.<init>(ScratchCodePane.java:207)
    at com.github.beansoft.iscratch.ui.CodePaneToolWindowFactory.createToolWindowContent(CodePaneToolWindowFactory.kt:73)
    at com.intellij.openapi.wm.impl.ToolWindowImpl.createContentIfNeeded$intellij_platform_ide_impl(ToolWindowImpl.kt:543)
    at com.intellij.openapi.wm.impl.ToolWindowImpl.scheduleContentInitializationIfNeeded$intellij_platform_ide_impl(ToolWindowImpl.kt:522)
    at com.intellij.openapi.wm.impl.ToolWindowManagerImpl.doShowWindow(ToolWindowManagerImpl.kt:1009)
    at com.intellij.openapi.wm.impl.ToolWindowManagerImpl.showToolWindowImpl(ToolWindowManagerImpl.kt:946)
    at com.intellij.openapi.wm.impl.ToolWindowManagerImpl.showToolWindowImpl$default(ToolWindowManagerImpl.kt:932)
    at com.intellij.openapi.wm.impl.ToolWindowManagerImpl.registerToolWindow$intellij_platform_ide_impl(ToolWindowManagerImpl.kt:1116)
    at com.intellij.toolWindow.ToolWindowSetInitializer.createAndLayoutToolWindows$registerToolWindows(ToolWindowSetInitializer.kt:134)
    ... 34 more
beansoft commented 1 year ago

My bad, the new version is waiting for JetBrains' approval, this time I've tested under clean installation of Win, Mac, and Linux. Please try before it's published:

https://plugins.jetbrains.com/files/17501/295707/Notes.zip

If you are not familiar with installing from disk, please see the document: https://beansoft.github.io/notes-docs/install.html?keymap=secondary_macos#download-and-install-plugin-from-disk

ygrigoriev commented 1 year ago

This is a duplicate of https://github.com/beansoft/iscratch-support/issues/31; the fix in https://github.com/beansoft/iscratch-support/issues/31#issuecomment-1437800895 solves the problem.