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

RuntimeException in IntentionsProjectPlugin #944

Open
arimer opened this issue Sep 12, 2024 · 3 comments
Open

RuntimeException in IntentionsProjectPlugin #944

arimer opened this issue Sep 12, 2024 · 3 comments
Labels

Comments

@arimer
Copy link
Collaborator

arimer commented Sep 12, 2024

When using platform in Version com.mbeddr:platform:2022.3.24843.4b3a10a from stubs, this exception is popping up on startup.

Everytime I try to open a root node this exception is thrown, prohibiting the root node to be loaded in the editor.

Stack Traces
Failed to initialize part class com.mbeddr.mpsutil.intentions.runtime.plugin.IntentionsProjectPlugin_ProjectPluginPart of project plugin class com.mbeddr.mpsutil.intentions.runtime.plugin.Runtime_ProjectPlugin

java.lang.RuntimeException: Cannot write field 'myLightBulb' in class 'class jetbrains.mps.nodeEditor.IntentionsSupport' of object: jetbrains.mps.nodeEditor.IntentionsSupport@64af30df
	at de.slisson.mps.reflection.runtime.ReflectionUtil.writeField(ReflectionUtil.java:31)
	at com.mbeddr.mpsutil.intentions.runtime.OriginalIntentionMenu.<init>(OriginalIntentionMenu.java:78)
	at com.mbeddr.mpsutil.intentions.runtime.IntentionsMenuWithGroups.<init>(IntentionsMenuWithGroups.java:33)
	at com.mbeddr.mpsutil.intentions.runtime.plugin.IntentionsProjectPlugin_ProjectPluginPart$1.editorComponentCreate(IntentionsProjectPlugin_ProjectPluginPart.java:19)
	at de.slisson.mps.hacks.editor.EditorComponentCreationListener.install(EditorComponentCreationListener.java:33)
	at jetbrains.mps.ide.editor.EditorExtensionRegistryImpl.registerExtension(EditorExtensionRegistryImpl.java:79)
	at de.slisson.mps.hacks.editor.EditorComponentCreationListener.start(EditorComponentCreationListener.java:47)
	at com.mbeddr.mpsutil.intentions.runtime.plugin.IntentionsProjectPlugin_ProjectPluginPart.init(IntentionsProjectPlugin_ProjectPluginPart.java:24)
	at jetbrains.mps.plugins.projectplugins.BaseProjectPlugin.initCustomParts(BaseProjectPlugin.java:74)
	at jetbrains.mps.plugins.projectplugins.BaseProjectPlugin.init(BaseProjectPlugin.java:94)
	at jetbrains.mps.plugins.projectplugins.ProjectPluginManager.createPlugin(ProjectPluginManager.java:159)
	at jetbrains.mps.plugins.projectplugins.ProjectPluginManager.createPlugin(ProjectPluginManager.java:54)
	at jetbrains.mps.plugins.BasePluginManager.createPluginChecked(BasePluginManager.java:156)
	at jetbrains.mps.plugins.BasePluginManager.createPlugins(BasePluginManager.java:143)
	at jetbrains.mps.plugins.BasePluginManager.loadPlugins(BasePluginManager.java:73)
	at jetbrains.mps.plugins.PluginLoaderRegistry.loadContributors(PluginLoaderRegistry.java:206)
	at jetbrains.mps.plugins.PluginLoaderRegistry$UpdatingTask.addContributors(PluginLoaderRegistry.java:564)
	at jetbrains.mps.plugins.PluginLoaderRegistry$UpdatingTask.update(PluginLoaderRegistry.java:542)
	at jetbrains.mps.plugins.PluginLoaderRegistry$UpdatingTask.lambda$run$1(PluginLoaderRegistry.java:452)
	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.LaterInvocator$1.run(LaterInvocator.java:97)
	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.NoSuchFieldException: modifiers
	at java.base/java.lang.Class.getDeclaredField(Class.java:2610)
	at de.slisson.mps.reflection.runtime.ReflectionUtil.writeField(ReflectionUtil.java:24)
	... 48 more
Action dispatch failed. Thread AWT-EventQueue-0, state ACTIVE, 1 active clients.

java.lang.RuntimeException: Cannot write field 'myLightBulb' in class 'class jetbrains.mps.nodeEditor.IntentionsSupport' of object: jetbrains.mps.nodeEditor.IntentionsSupport@68f26865
	at de.slisson.mps.reflection.runtime.ReflectionUtil.writeField(ReflectionUtil.java:31)
	at com.mbeddr.mpsutil.intentions.runtime.OriginalIntentionMenu.<init>(OriginalIntentionMenu.java:78)
	at com.mbeddr.mpsutil.intentions.runtime.IntentionsMenuWithGroups.<init>(IntentionsMenuWithGroups.java:33)
	at com.mbeddr.mpsutil.intentions.runtime.plugin.IntentionsProjectPlugin_ProjectPluginPart$1.editorComponentCreate(IntentionsProjectPlugin_ProjectPluginPart.java:19)
	at de.slisson.mps.hacks.editor.EditorComponentCreationListener.install(EditorComponentCreationListener.java:33)
	at jetbrains.mps.ide.editor.EditorExtensionRegistryImpl.installExtensions(EditorExtensionRegistryImpl.java:123)
	at jetbrains.mps.ide.editor.EditorExtensionRegistryImpl.extend(EditorExtensionRegistryImpl.java:107)
	at jetbrains.mps.openapi.editor.extensions.EditorExtensionUtil.extendUsingProject(EditorExtensionUtil.java:32)
	at jetbrains.mps.console.tool.BaseConsoleTab.createEditor(BaseConsoleTab.java:185)
	at jetbrains.mps.console.tool.BaseConsoleTab.lambda$initConsoleTab$0(BaseConsoleTab.java:209)
	at jetbrains.mps.smodel.ActionDispatcher.dispatch(ActionDispatcher.java:99)
	at jetbrains.mps.smodel.ActionDispatcher.lambda$wrap$0(ActionDispatcher.java:136)
	at jetbrains.mps.smodel.LockRunnable.run(LockRunnable.java:60)
	at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:980)
	at jetbrains.mps.smodel.TryRunPlatformWriteHelper.runWrite(TryRunPlatformWriteHelper.java:103)
	at jetbrains.mps.smodel.WorkbenchModelAccess.runWriteAction(WorkbenchModelAccess.java:98)
	at jetbrains.mps.smodel.ModelAccessBase.runWriteAction(ModelAccessBase.java:66)
	at jetbrains.mps.console.tool.BaseConsoleTab.initConsoleTab(BaseConsoleTab.java:205)
	at jetbrains.mps.console.tool.BaseConsoleTab.<init>(BaseConsoleTab.java:107)
	at jetbrains.mps.console.tool.DialogConsoleTab.<init>(DialogConsoleTab.java:58)
	at jetbrains.mps.console.tool.ConsoleTool.addConsoleTab(ConsoleTool.java:95)
	at jetbrains.mps.console.tool.ConsoleTool.initTabs(ConsoleTool.java:116)
	at jetbrains.mps.console.tool.ConsoleTool.doRegister(ConsoleTool.java:105)
	at jetbrains.mps.ide.tools.BaseTool.register(BaseTool.java:279)
	at com.intellij.openapi.project.DumbServiceImpl.doRun(DumbServiceImpl.java:388)
	at com.intellij.openapi.project.DumbServiceImpl.updateFinished(DumbServiceImpl.java:380)
	at com.intellij.openapi.project.TrackedEdtActivityService$TrackedEdtActivity.run(TrackedEdtActivityService.java:66)
	at com.intellij.openapi.application.TransactionGuardImpl.runWithWritingAllowed(TransactionGuardImpl.java:209)
	at com.intellij.openapi.application.TransactionGuardImpl.access$100(TransactionGuardImpl.java:21)
	at com.intellij.openapi.application.TransactionGuardImpl$1.run(TransactionGuardImpl.java:191)
	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.NoSuchFieldException: modifiers
	at java.base/java.lang.Class.getDeclaredField(Class.java:2610)
	at de.slisson.mps.reflection.runtime.ReflectionUtil.writeField(ReflectionUtil.java:24)
	... 57 more
@arimer arimer added the bug label Sep 12, 2024
@alexanderpann
Copy link
Collaborator

We had this issue multiple times before and this should be fixed a long time ago. Please check that you're using the correct JBR version and don't have any old dependencies in the cache.

@arimer
Copy link
Collaborator Author

arimer commented Sep 12, 2024

Will do, thx for the hint 👍🏼

@arimer
Copy link
Collaborator Author

arimer commented Sep 16, 2024

Just updated the platform version to com.mbeddr:platform:2022.3.24863.5956199 and the problem is still there.
The JBR version I am using is the one packaged with the latest MPS 2022.3.2

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

No branches or pull requests

2 participants