n34t0/compose-code-editor

Cant run example

Opened this issue · 1 comments

Linux: Arch
Branch: Master

(master)> ./gradlew run

> Task :run
Exception in thread "main" java.lang.ExceptionInInitializerError
        at com.intellij.ide.IpwEventQueue.<clinit>(IpwEventQueue.java:62)
        at io.github.n34t0.platform.impl.edt.EdtAdapter.isEventDispatchThread(EdtAdapter.java:13)
        at io.github.n34t0.platform.impl.edt.EdtUtil.runInEdtAndWait(EdtUtil.java:15)
        at io.github.n34t0.platform.impl.services.impl.ApplicationServiceImpl.doInit(ApplicationServiceImpl.java:79)
        at io.github.n34t0.platform.impl.services.impl.IpwService.init(IpwService.java:18)
        at io.github.n34t0.platform.impl.IntellijPlatformWrapper.init(IntellijPlatformWrapper.java:35)
        at io.github.n34t0.compose.codeEditor.demo.PlatformState.init(main.kt:61)
        at io.github.n34t0.compose.codeEditor.demo.MainKt$main$1$1.invokeSuspend(main.kt:79)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
        at kotlinx.coroutines.DispatchedTaskKt.resume(DispatchedTask.kt:234)
        at kotlinx.coroutines.DispatchedTaskKt.dispatch(DispatchedTask.kt:166)
        at kotlinx.coroutines.CancellableContinuationImpl.dispatchResume(CancellableContinuationImpl.kt:398)
        at kotlinx.coroutines.CancellableContinuationImpl.resumeImpl(CancellableContinuationImpl.kt:432)
        at kotlinx.coroutines.CancellableContinuationImpl.resumeImpl$default(CancellableContinuationImpl.kt:421)
        at kotlinx.coroutines.CancellableContinuationImpl.resumeUndispatched(CancellableContinuationImpl.kt:519)
        at kotlinx.coroutines.swing.SwingDispatcher.scheduleResumeAfterDelay$lambda-1(SwingDispatcher.kt:33)
        at java.desktop/javax.swing.Timer.fireActionPerformed(Timer.java:311)
        at java.desktop/javax.swing.Timer$DoPostEvent.run(Timer.java:243)
        at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318)
        at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:771)
        at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:722)
        at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:716)
        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:741)
        at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
        at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
        at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
        at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
        at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
        at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make field protected java.lang.Runnable java.awt.event.InvocationEvent.runnable accessible: module java.desktop does not "opens java.awt.event" to unnamed module @5706d6e2
        at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354)
        at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
        at java.base/java.lang.reflect.Field.checkCanSetAccessible(Field.java:178)
        at java.base/java.lang.reflect.Field.setAccessible(Field.java:172)
        at com.intellij.openapi.application.impl.InvocationUtil.findRunnableField(InvocationUtil.java:49)
        at com.intellij.openapi.application.impl.InvocationUtil.<clinit>(InvocationUtil.java:17)
        ... 31 more

> Task :run FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':run'.
> Process 'command '/usr/lib/jvm/java-17-jdk/bin/java'' finished with non-zero exit value 1

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 3s
4 actionable tasks: 1 executed, 3 up-to-date

uncommenting

// jvmArgs("-Xmx2048m", "-Dplatform.stub=true")

and commenting the line above works to run the demo