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

Support Java 16 #60

Closed
lcarss opened this issue May 17, 2021 · 5 comments
Closed

Support Java 16 #60

lcarss opened this issue May 17, 2021 · 5 comments
Labels
bug Something isn't working windows Windows-specific issues

Comments

@lcarss
Copy link

lcarss commented May 17, 2021

Environment info

  • BlockMap version: 2.2.1
  • Java version: AdoptOpenJDK 16.0.1.9
  • Operating system: Windows 10 20H2

Description

BlockMap crashes just after showing the splashscreen, without further notice.
When running in the command-prompt, it shows "FATAL GuiMain [50] - Cannot start BlockMap", "javafx.fxml.LoadException".

Steps to reproduce

I tried to start the jar-File on Windows with several Java Versions (Oracle: 16, AdoptOpen: 16, 14, 12), also tried to start with admin privileges and everything in BlockMap version 2.2.0.

Actual result

The application always crashes with "FATAL GuiMain [50] - Cannot start BlockMap", "javafx.fxml.LoadException".

Debug log

WARNING: sun.reflect.Reflection.getCallerClass is not supported. This will impact performance.
21-05-17 09:09:16 INFO  RegionFolderCache [73] - Removed 0 worlds from cache
21-05-17 09:09:16 FATAL GuiMain [50] - Cannot start BlockMap
javafx.fxml.LoadException:
file:/C:/Users/Axel%20Geldmeyer/Downloads/BlockMap-gui-2.2.1-windows.jar!/de/piegames/blockmap/gui/standalone/scene.fxml:21

        at javafx.fxml.FXMLLoader.constructLoadException(FXMLLoader.java:2625) ~[BlockMap-gui-2.2.1-windows.jar:?]
        at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2603) ~[BlockMap-gui-2.2.1-windows.jar:?]
        at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2466) ~[BlockMap-gui-2.2.1-windows.jar:?]
        at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2435) ~[BlockMap-gui-2.2.1-windows.jar:?]
        at de.piegames.blockmap.gui.standalone.GuiMain.init(GuiMain.java:46) ~[BlockMap-gui-2.2.1-windows.jar:?]
        at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:824) ~[BlockMap-gui-2.2.1-windows.jar:?]
        at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(LauncherImpl.java:195) ~[BlockMap-gui-2.2.1-windows.jar:?]
        at java.lang.Thread.run(Thread.java:831) [?:?]
Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make field private final java.lang.Object java.util.Optional.value accessible: module java.base does not "opens java.util" to unnamed module @4691fef1
        at java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:357) ~[?:?]
        at java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297) ~[?:?]
        at java.lang.reflect.Field.checkCanSetAccessible(Field.java:177) ~[?:?]
        at java.lang.reflect.Field.setAccessible(Field.java:171) ~[?:?]
        at com.google.gson.internal.reflect.UnsafeReflectionAccessor.makeAccessible(UnsafeReflectionAccessor.java:44) ~[BlockMap-gui-2.2.1-windows.jar:?]
        at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.getBoundFields(ReflectiveTypeAdapterFactory.java:159) ~[BlockMap-gui-2.2.1-windows.jar:?]
        at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.create(ReflectiveTypeAdapterFactory.java:102) ~[BlockMap-gui-2.2.1-windows.jar:?]
        at com.google.gson.Gson.getAdapter(Gson.java:458) ~[BlockMap-gui-2.2.1-windows.jar:?]
        at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.createBoundField(ReflectiveTypeAdapterFactory.java:117) ~[BlockMap-gui-2.2.1-windows.jar:?]
        at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.getBoundFields(ReflectiveTypeAdapterFactory.java:166) ~[BlockMap-gui-2.2.1-windows.jar:?]
        at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.create(ReflectiveTypeAdapterFactory.java:102) ~[BlockMap-gui-2.2.1-windows.jar:?]
        at com.google.gson.Gson.getAdapter(Gson.java:458) ~[BlockMap-gui-2.2.1-windows.jar:?]
        at com.google.gson.internal.bind.CollectionTypeAdapterFactory.create(CollectionTypeAdapterFactory.java:53) ~[BlockMap-gui-2.2.1-windows.jar:?]
        at com.google.gson.Gson.getAdapter(Gson.java:458) ~[BlockMap-gui-2.2.1-windows.jar:?]
        at com.google.gson.Gson.fromJson(Gson.java:931) ~[BlockMap-gui-2.2.1-windows.jar:?]
        at com.google.gson.Gson.fromJson(Gson.java:897) ~[BlockMap-gui-2.2.1-windows.jar:?]
        at de.piegames.blockmap.gui.standalone.HistoryManager.<init>(HistoryManager.java:60) ~[BlockMap-gui-2.2.1-windows.jar:?]
        at de.piegames.blockmap.gui.standalone.GuiController.<init>(GuiController.java:121) ~[BlockMap-gui-2.2.1-windows.jar:?]
        at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?]
        at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:78) ~[?:?]
        at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:?]
        at java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499) ~[?:?]
        at java.lang.reflect.ReflectAccess.newInstance(ReflectAccess.java:128) ~[?:?]
        at jdk.internal.reflect.ReflectionFactory.newInstance(ReflectionFactory.java:350) ~[?:?]
        at java.lang.Class.newInstance(Class.java:642) ~[?:?]
        at javafx.fxml.FXMLLoader$ValueElement.processAttribute(FXMLLoader.java:936) ~[BlockMap-gui-2.2.1-windows.jar:?]
        at javafx.fxml.FXMLLoader$InstanceDeclarationElement.processAttribute(FXMLLoader.java:980) ~[BlockMap-gui-2.2.1-windows.jar:?]
        at javafx.fxml.FXMLLoader$Element.processStartElement(FXMLLoader.java:227) ~[BlockMap-gui-2.2.1-windows.jar:?]
        at javafx.fxml.FXMLLoader$ValueElement.processStartElement(FXMLLoader.java:752) ~[BlockMap-gui-2.2.1-windows.jar:?]
        at javafx.fxml.FXMLLoader.processStartElement(FXMLLoader.java:2722) ~[BlockMap-gui-2.2.1-windows.jar:?]
        at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2552) ~[BlockMap-gui-2.2.1-windows.jar:?]
        ... 6 more
@lcarss lcarss changed the title mine Crash on startup FATAL GuiMain [50] - Cannot start BlockMap - javafx.fxml.LoadException May 17, 2021
@saibotk saibotk added the bug Something isn't working label May 17, 2021
@piegamesde
Copy link
Owner

I sadly can only try it with OpenJDK 15 right now, and cannot reproduce your issue. I fear that this will have to wait until AdoptOpenJDK is packaged in the relevant versions in some major Linux distributions.

I kind of lost track of the Java ecosystem, but it seems that there is a growing gap between OpenJDK and AdoptOpenJDK? Could you please try installing your Java from https://jdk.java.net/16/ ?

@uncovery
Copy link
Contributor

I have also an issue now with the same version in openJDK:

java -version
openjdk version "16.0.1" 2021-04-20
OpenJDK Runtime Environment 21.3 (build 16.0.1+9)
OpenJDK 64-Bit Server VM 21.3 (build 16.0.1+9, mixed mode, sharing)
ava.lang.NullPointerException: Cannot read field "pins" because "helper" is null
	at de.piegames.blockmap.world.RegionFolder$SavedRegionFolder.<init>(RegionFolder.java:293)
	at de.piegames.blockmap.world.RegionFolder$LocalRegionFolder.<init>(RegionFolder.java:355)
	at de.piegames.blockmap.world.RegionFolder$CachedRegionFolder.<init>(RegionFolder.java:442)
	at de.piegames.blockmap.world.RegionFolder$CachedRegionFolder.create(RegionFolder.java:551)
	at de.piegames.blockmap.standalone.CommandLineMain$CommandRender.call(CommandLineMain.java:236)
	at de.piegames.blockmap.standalone.CommandLineMain$CommandRender.call(CommandLineMain.java:113)
	at picocli.CommandLine.executeUserObject(CommandLine.java:1933)
	at picocli.CommandLine.access$1100(CommandLine.java:145)
	at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2332)
	at picocli.CommandLine$RunLast.handle(CommandLine.java:2326)
	at picocli.CommandLine$RunLast.handle(CommandLine.java:2291)
	at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2159)
	at picocli.CommandLine.execute(CommandLine.java:2058)
	at de.piegames.blockmap.standalone.CommandLineMain.mainWithoutQuit(CommandLineMain.java:399)
	at de.piegames.blockmap.standalone.CommandLineMain.main(CommandLineMain.java:403)

@piegamesde
Copy link
Owner

@uncovery I gave it a shot. The stack trace does not look like it's the same issue. Also further information for proper reproduction are needed. Please open a new issue for this.

@piegamesde piegamesde added the windows Windows-specific issues label May 24, 2021
@baraclese
Copy link

I receive the same error as the first post did on linux with openjdk-16.

@piegamesde
Copy link
Owner

I finally managed to get a working Java 16 setup and I can reproduce. This means as a workaround that using an older Java version should work around the issue.

@piegamesde piegamesde changed the title Crash on startup FATAL GuiMain [50] - Cannot start BlockMap - javafx.fxml.LoadException Support Java 16 Jul 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working windows Windows-specific issues
Projects
None yet
Development

No branches or pull requests

5 participants