quelea-projection / Quelea

Open source projection software for churches.
https://quelea.org
GNU General Public License v3.0
158 stars 145 forks source link

java.lang.reflect.InaccessibleObjectException: Unable to make field long java.nio.Buffer.address accessible #648

Closed samapraku closed 7 months ago

samapraku commented 7 months ago

I'm trying to run the project on macos but I'm getting the error below. I've already done a lot of googling but no solution seems to work.

I am using the master branch.

JDK correto 21

IntelliJ IDEA 2023.3.1 (Community Edition)
Build #IC-233.11799.300, built on December 12, 2023
Runtime version: 17.0.9+7-b1087.7 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 14.2. GC: G1 Young Generation, G1 Old Generation. Memory: 2048M. Cores: 12
Metal Rendering is ON. Registry: ide.experimental.ui=true Kotlin: 233.11799.300-IJ

Feb 25, 2024 1:41:49 PM org.quelea.services.utils.UpdateChecker checkUpdate INFO: Checked updates, current version is 2024.1 and latest version is 2022.0 Feb 25, 2024 1:41:49 PM org.quelea.windows.main.MainWindow INFO: Creating bible search dialog Feb 25, 2024 1:41:49 PM org.quelea.windows.main.MainWindow INFO: Creating bible browse dialog Feb 25, 2024 1:41:50 PM org.quelea.windows.main.MainPanel INFO: Creating schedule panel Feb 25, 2024 1:41:50 PM org.quelea.windows.main.Main$UncaughtExceptionHandler uncaughtException SEVERE: Uncaught exception on thread: JavaFX Application Thread java.lang.ExceptionInInitializerError at org.quelea.windows.video.VidDisplay.(VidDisplay.java:48) at org.quelea.windows.lyrics.LyricDrawer.(LyricDrawer.java:95) at org.quelea.windows.newsong.ThemePanel.(ThemePanel.java:102) at org.quelea.windows.newsong.ThemePanel.(ThemePanel.java:69) at org.quelea.windows.newsong.ThemePanel.(ThemePanel.java:65) at org.quelea.windows.newsong.EditThemeDialog.(EditThemeDialog.java:91) at org.quelea.windows.main.schedule.ScheduleThemeNode.(ScheduleThemeNode.java:77) at org.quelea.windows.main.schedule.SchedulePanel.(SchedulePanel.java:111) at org.quelea.windows.main.MainPanel.(MainPanel.java:52) at org.quelea.windows.main.MainWindow.(MainWindow.java:98) at org.quelea.windows.main.Main.lambda$start$10(Main.java:241) at javafx.graphics@21/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:456) at java.base/java.security.AccessController.doPrivileged(AccessController.java:400) at javafx.graphics@21/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:455) at javafx.graphics@21/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95) Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make field long java.nio.Buffer.address accessible: module java.base does not "opens java.nio" to unnamed module @50a2dd5f at java.base/java.lang.reflect.AccessibleObject.throwInaccessibleObjectException(AccessibleObject.java:391) at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:367) at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:315) at java.base/java.lang.reflect.Field.checkCanSetAccessible(Field.java:183) at java.base/java.lang.reflect.Field.setAccessible(Field.java:177) at org.quelea.windows.video.FXImageSink.(FXImageSink.java:75) ... 15 more

Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make field long java.nio.Buffer.address accessible: module java.base does not "opens java.nio" to unnamed module @50a2dd5f

Feb 25, 2024 1:41:50 PM org.quelea.windows.main.Main$UncaughtExceptionHandler uncaughtException SEVERE: Uncaught exception on thread: JavaFX Application Thread java.lang.NullPointerException: Cannot invoke "org.quelea.windows.main.MainWindow.getMainPanel()" because "this.mainWindow" is null at org.quelea.windows.main.Main.lambda$start$12(Main.java:250) at javafx.graphics@21/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:456) at java.base/java.security.AccessController.doPrivileged(AccessController.java:400) at javafx.graphics@21/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:455) at javafx.graphics@21/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)

Feb 25, 2024 1:41:50 PM org.quelea.windows.main.Main$UncaughtExceptionHandler uncaughtException SEVERE: Uncaught exception on thread: JavaFX Application Thread java.lang.NullPointerException: Cannot invoke "org.quelea.windows.main.MainPanel.addEventFilter(javafx.event.EventType, javafx.event.EventHandler)" because "mainPanel" is null at org.quelea.services.utils.ShortcutManager.addShortcuts(ShortcutManager.java:51) at org.quelea.windows.main.Main.lambda$start$13(Main.java:269) at javafx.graphics@21/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:456) at java.base/java.security.AccessController.doPrivileged(AccessController.java:400) at javafx.graphics@21/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:455) at javafx.graphics@21/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)

Feb 25, 2024 1:41:50 PM org.quelea.windows.main.Main$UncaughtExceptionHandler uncaughtException SEVERE: Uncaught exception on thread: JavaFX Application Thread java.lang.NullPointerException: Cannot invoke "org.quelea.windows.main.MainWindow.getMainPanel()" because "this.mainWindow" is null at org.quelea.windows.main.Main.lambda$start$19(Main.java:300) at javafx.graphics@21/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:456) at java.base/java.security.AccessController.doPrivileged(AccessController.java:400) at javafx.graphics@21/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:455) at javafx.graphics@21/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)

berry120 commented 7 months ago

Hey, firstly did you mean to download and run the source rather than the current stable release (2024.0)?

There's some video experiments ongoing on the main branch currently which is why you're getting this. You may need to add the following as VM options to your run configuration in IntelliJ for it to work:

--add-opens java.base/java.nio=ALL-UNNAMED --add-exports=javafx.graphics/com.sun.javafx.scene.traversal=ALL-UNNAMED --add-exports=javafx.graphics/com.sun.javafx.scene=ALL-UNNAMED --add-exports=javafx.graphics/com.sun.javafx.css=ALL-UNNAMED --add-exports=javafx.base/com.sun.javafx.runtime=ALL-UNNAMED --add-exports=javafx.base/com.sun.javafx.event=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens javafx.controls/javafx.scene.control=ALL-UNNAMED

On Sun, 25 Feb 2024 at 14:51, Samuel Apraku @.***> wrote:

I'm trying to run the project in but I'm getting the error below. I've already done a lot of googling but no solution seems to work.

I am using the master branch.

JDK correto 21

IntelliJ IDEA 2023.3.1 (Community Edition) Build #IC-233.11799.300, built on December 12, 2023 Runtime version: 17.0.9+7-b1087.7 x86_64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. macOS 14.2. GC: G1 Young Generation, G1 Old Generation. Memory: 2048M. Cores: 12 Metal Rendering is ON. Registry: ide.experimental.ui=true Kotlin: 233.11799.300-IJ

Feb 25, 2024 1:41:49 PM org.quelea.services.utils.UpdateChecker checkUpdate INFO: Checked updates, current version is 2024.1 and latest version is 2022.0 Feb 25, 2024 1:41:49 PM org.quelea.windows.main.MainWindow INFO: Creating bible search dialog Feb 25, 2024 1:41:49 PM org.quelea.windows.main.MainWindow INFO: Creating bible browse dialog Feb 25, 2024 1:41:50 PM org.quelea.windows.main.MainPanel INFO: Creating schedule panel Feb 25, 2024 1:41:50 PM org.quelea.windows.main.Main$UncaughtExceptionHandler uncaughtException SEVERE: Uncaught exception on thread: JavaFX Application Thread java.lang.ExceptionInInitializerError at org.quelea.windows.video.VidDisplay.(VidDisplay.java:48) at org.quelea.windows.lyrics.LyricDrawer.(LyricDrawer.java:95) at org.quelea.windows.newsong.ThemePanel.(ThemePanel.java:102) at org.quelea.windows.newsong.ThemePanel.(ThemePanel.java:69) at org.quelea.windows.newsong.ThemePanel.(ThemePanel.java:65) at org.quelea.windows.newsong.EditThemeDialog.(EditThemeDialog.java:91) at org.quelea.windows.main.schedule.ScheduleThemeNode.(ScheduleThemeNode.java:77) at org.quelea.windows.main.schedule.SchedulePanel.(SchedulePanel.java:111) at org.quelea.windows.main.MainPanel.(MainPanel.java:52) at org.quelea.windows.main.MainWindow.(MainWindow.java:98) at org.quelea.windows.main.Main.lambda$start$10(Main.java:241) at @. /com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:456) at java.base/java.security.AccessController.doPrivileged(AccessController.java:400) at @. /com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:455) at @.*** /com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95) Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make field long java.nio.Buffer.address accessible: module java.base does not "opens java.nio" to unnamed module @50a2dd5f at java.base/java.lang.reflect.AccessibleObject.throwInaccessibleObjectException(AccessibleObject.java:391) at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:367) at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:315) at java.base/java.lang.reflect.Field.checkCanSetAccessible(Field.java:183) at java.base/java.lang.reflect.Field.setAccessible(Field.java:177) at org.quelea.windows.video.FXImageSink.(FXImageSink.java:75) ... 15 more

Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make field long java.nio.Buffer.address accessible: module java.base does not "opens java.nio" to unnamed module @50a2dd5f

Feb 25, 2024 1:41:50 PM org.quelea.windows.main.Main$UncaughtExceptionHandler uncaughtException SEVERE: Uncaught exception on thread: JavaFX Application Thread java.lang.NullPointerException: Cannot invoke "org.quelea.windows.main.MainWindow.getMainPanel()" because "this.mainWindow" is null at org.quelea.windows.main.Main.lambda$start$12(Main.java:250) at @. /com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:456) at java.base/java.security.AccessController.doPrivileged(AccessController.java:400) at @. /com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:455) at @.*** /com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)

Feb 25, 2024 1:41:50 PM org.quelea.windows.main.Main$UncaughtExceptionHandler uncaughtException SEVERE: Uncaught exception on thread: JavaFX Application Thread java.lang.NullPointerException: Cannot invoke "org.quelea.windows.main.MainPanel.addEventFilter(javafx.event.EventType, javafx.event.EventHandler)" because "mainPanel" is null at org.quelea.services.utils.ShortcutManager.addShortcuts(ShortcutManager.java:51) at org.quelea.windows.main.Main.lambda$start$13(Main.java:269) at @. /com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:456) at java.base/java.security.AccessController.doPrivileged(AccessController.java:400) at @. /com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:455) at @.*** /com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)

Feb 25, 2024 1:41:50 PM org.quelea.windows.main.Main$UncaughtExceptionHandler uncaughtException SEVERE: Uncaught exception on thread: JavaFX Application Thread java.lang.NullPointerException: Cannot invoke "org.quelea.windows.main.MainWindow.getMainPanel()" because "this.mainWindow" is null at org.quelea.windows.main.Main.lambda$start$19(Main.java:300) at @. /com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:456) at java.base/java.security.AccessController.doPrivileged(AccessController.java:400) at @. /com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:455) at @.*** /com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)

— Reply to this email directly, view it on GitHub https://github.com/quelea-projection/Quelea/issues/648, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABZ6JDOD4FSZJSYMVOZ4CJDYVNFVPAVCNFSM6AAAAABDY5TKUOVHI2DSMVQWIX3LMV43ASLTON2WKOZSGE2TENZZHE3DONQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

-- Thanks,

Michael

samapraku commented 7 months ago

Hello,

yes, I meant downloading and running the source. Unfortunately I still get the error even after adding the vm options. I don't know if I'm not doing something right.

Screenshot 2024-02-25 at 19 02 59

Hey, firstly did you mean to download and run the source rather than the current stable release (2024.0)? There's some video experiments ongoing on the main branch currently which is why you're getting this. You may need to add the following as VM options to your run configuration in IntelliJ for it to work:

--add-opens java.base/java.nio=ALL-UNNAMED --add-exports=javafx.graphics/com.sun.javafx.scene.traversal=ALL-UNNAMED --add-exports=javafx.graphics/com.sun.javafx.scene=ALL-UNNAMED --add-exports=javafx.graphics/com.sun.javafx.css=ALL-UNNAMED --add-exports=javafx.base/com.sun.javafx.runtime=ALL-UNNAMED --add-exports=javafx.base/com.sun.javafx.event=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens javafx.controls/javafx.scene.control=ALL-UNNAMED

berry120 commented 7 months ago

Hey,

Are you sure you get the same error? If so then "--add-opens java.base/java.nio=ALL-UNNAMED" is the option that should fix that one, so it sounds like it's not been added correctly. Where did you add the VM options (just checking they were added as VM options not program arguments?)

Thanks,

Michael

On Sun, 25 Feb 2024 at 18:38, Samuel Apraku @.***> wrote:

Hello,

yes, I meant downloading and running the source. Unfortunately I still get the error even after adding the vm options. I don't know if I'm not doing something right. Screenshot.2024-02-25.at.19.02.59.png (view on web) https://github.com/quelea-projection/Quelea/assets/12513594/0cca78fa-0d5f-4331-9d4f-d0cf3bf54d84

Hey, firstly did you mean to download and run the source rather than the current stable release (2024.0)? There's some video experiments ongoing on the main branch currently which is why you're getting this. You may need to add the following as VM options to your run configuration in IntelliJ for it to work:

--add-opens java.base/java.nio=ALL-UNNAMED --add-exports=javafx.graphics/com.sun.javafx.scene.traversal=ALL-UNNAMED --add-exports=javafx.graphics/com.sun.javafx.scene=ALL-UNNAMED --add-exports=javafx.graphics/com.sun.javafx.css=ALL-UNNAMED --add-exports=javafx.base/com.sun.javafx.runtime=ALL-UNNAMED --add-exports=javafx.base/com.sun.javafx.event=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens javafx.controls/javafx.scene.control=ALL-UNNAMED

— Reply to this email directly, view it on GitHub https://github.com/quelea-projection/Quelea/issues/648#issuecomment-1963024581, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABZ6JDOY3TX6AZTVEU5OPITYVOAMFAVCNFSM6AAAAABDY5TKUOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNRTGAZDINJYGE . You are receiving this because you commented.Message ID: @.***>

-- Thanks,

Michael

samapraku commented 7 months ago

Below is a screenshot of how I'm getting to the VM options. I've also attached the error

Screenshot 2024-02-25 at 20 00 34 Screenshot 2024-02-25 at 20 04 26
berry120 commented 7 months ago

What do you do after you click "Modify run configuration?"

samapraku commented 7 months ago

I enter the options in the VM options field. The second image is the expanded view

Screenshot 2024-02-25 at 21 45 49 Screenshot 2024-02-25 at 21 46 08
samapraku commented 7 months ago

I finally got it to work by passing the options as value to environment variable JDK_JAVA_OPTIONS

Screenshot 2024-02-25 at 23 05 26