software-challenge / backend

Server, Client und Spiel-Plugins der Software-Challenge Germany
https://www.software-challenge.de
11 stars 10 forks source link

refactor(plugin): remove backing lateinit field from Color's next #284

Closed anarchuser closed 3 years ago

anarchuser commented 4 years ago

This reverts commit 025e31aa590a2994fdde02ba8f8f463e6a3fe22c.

anarchuser commented 4 years ago

After applying this commit and building first this, then the GUI, the following error occurs (in the GUI):

Exception in Application constructor
Exception in thread "main" java.lang.RuntimeException: Unable to construct Application instance: class sc.gui.GuiApp
    at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:890)
    at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(LauncherImpl.java:195)
    at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.reflect.InvocationTargetException
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
    at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$8(LauncherImpl.java:802)
    at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runAndWait$12(PlatformImpl.java:455)
    at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:428)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:427)
    at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
    at javafx.graphics/com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
    at javafx.graphics/com.sun.glass.ui.gtk.GtkApplication.lambda$runLoop$11(GtkApplication.java:277)
    ... 1 more
Caused by: java.lang.VerifyError: Cannot inherit from final class
    at java.base/java.lang.ClassLoader.defineClass1(Native Method)
    at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1017)
    at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
    at java.base/java.net.URLClassLoader.defineClass(URLClassLoader.java:550)
    at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:458)
    at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:452)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:451)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:589)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
    at sc.server.plugins.PluginManager.findEntryPointsInJar(PluginManager.java:114)
    at sc.server.plugins.PluginManager.reload(PluginManager.java:42)
    at sc.server.gaming.GameRoomManager.<init>(GameRoomManager.java:41)
    at sc.server.Lobby.<init>(Lobby.kt:28)
    at sc.gui.controller.ServerController.<init>(ServerController.kt:13)
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
Caused by: java.lang.reflect.InvocationTargetException

    at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
    at java.base/java.lang.Class.newInstance(Class.java:584)
    at tornadofx.FXKt.find(FX.kt:437)
    at sc.gui.GuiApp$$special$$inlined$inject$1.getValue(App.kt:274)
    at sc.gui.GuiApp$$special$$inlined$inject$1.getValue(App.kt:171)
    at sc.gui.GuiApp.getServer(GuiApp.kt)
    at sc.gui.GuiApp.<init>(GuiApp.kt:21)
    ... 13 more
Caused by: java.lang.VerifyError: Cannot inherit from final class
anarchuser commented 4 years ago

Replacing the getter with a function doesn't change the error

xeruf commented 4 years ago

Thanks for keeping this up, I'll look into it once the more urgent tasks are fixed.

anarchuser commented 3 years ago

This seems to be working now

xeruf commented 3 years ago

Why though?

anarchuser commented 3 years ago

The question is rather why it didn't work before

xeruf commented 3 years ago

@anarchuser you made an error while rebasing and deleted some documentation ^^

anarchuser commented 3 years ago

@anarchuser you made an error while rebasing and deleted some documentation ^^

Fixed ^^