1.16.1-1.4.x on Linux
kreezxil opened this issue · 9 comments
I think it's crashing my client, it keeps saying that it can't create the mod instance because of a headless environment which isn't true.
[14Jul2020 15:16:30.467] [modloading-worker-1/ERROR] [net.minecraftforge.fml.javafmlmod.FMLModContainer/LOADING]: Failed to create mod instance. ModID: fancymenu, class de.keksuccino.fancymenu.FancyMenu
java.lang.ExceptionInInitializerError: null
at java.lang.Class.forName0(Native Method) ~[?:1.8.0_242]
at java.lang.Class.forName(Class.java:264) ~[?:1.8.0_242]
at java.awt.Toolkit$2.run(Toolkit.java:860) ~[?:1.8.0_242]
at java.awt.Toolkit$2.run(Toolkit.java:855) ~[?:1.8.0_242]
at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_242]
at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:854) ~[?:1.8.0_242]
at de.keksuccino.fancymenu.FancyMenu.escapeHeadless(FancyMenu.java:137) ~[?:1.0]
at de.keksuccino.fancymenu.FancyMenu.<init>(FancyMenu.java:82) ~[?:1.0]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_242]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:1.8.0_242]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.8.0_242]
at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[?:1.8.0_242]
at java.lang.Class.newInstance(Class.java:442) ~[?:1.8.0_242]
at net.minecraftforge.fml.javafmlmod.FMLModContainer.constructMod(FMLModContainer.java:131) ~[?:32.0]
at java.util.function.Consumer.lambda$andThen$0(Consumer.java:65) ~[?:1.8.0_242]
at java.util.function.Consumer.lambda$andThen$0(Consumer.java:65) ~[?:1.8.0_242]
at net.minecraftforge.fml.ModContainer.transitionState(ModContainer.java:112) ~[?:?]
at net.minecraftforge.fml.ModList.lambda$null$10(ModList.java:135) ~[?:?]
at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183) ~[?:1.8.0_242]
at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382) ~[?:1.8.0_242]
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482) ~[?:1.8.0_242]
at java.util.stream.ForEachOps$ForEachTask.compute(ForEachOps.java:290) ~[?:1.8.0_242]
at java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:731) ~[?:1.8.0_242]
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289) ~[?:1.8.0_242]
at java.util.concurrent.ForkJoinPool$WorkQueue.pollAndExecCC(ForkJoinPool.java:1190) ~[?:1.8.0_242]
at java.util.concurrent.ForkJoinPool.helpComplete(ForkJoinPool.java:1879) ~[?:1.8.0_242]
at java.util.concurrent.ForkJoinPool.awaitJoin(ForkJoinPool.java:2045) ~[?:1.8.0_242]
at java.util.concurrent.ForkJoinTask.doInvoke(ForkJoinTask.java:404) ~[?:1.8.0_242]
at java.util.concurrent.ForkJoinTask.invoke(ForkJoinTask.java:734) ~[?:1.8.0_242]
at java.util.stream.ForEachOps$ForEachOp.evaluateParallel(ForEachOps.java:159) ~[?:1.8.0_242]
at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateParallel(ForEachOps.java:173) ~[?:1.8.0_242]
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:233) ~[?:1.8.0_242]
at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:485) ~[?:1.8.0_242]
at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:650) ~[?:1.8.0_242]
at net.minecraftforge.fml.ModList.lambda$dispatchParallelEvent$11(ModList.java:135) ~[?:?]
at java.util.concurrent.ForkJoinTask$AdaptedRunnableAction.exec(ForkJoinTask.java:1386) [?:1.8.0_242]
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289) [?:1.8.0_242]
at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056) [?:1.8.0_242]
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692) [?:1.8.0_242]
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157) [?:1.8.0_242]
Caused by: java.lang.ClassCastException: sun.java2d.HeadlessGraphicsEnvironment cannot be cast to sun.awt.X11GraphicsEnvironment
at sun.awt.X11.XToolkit.<clinit>(XToolkit.java:132) ~[?:1.8.0_242]
... 40 more
That's why the "safemode" option in the config exists. Try to enable this and it should work.
I am working on something to remove this shitty file chooser which is the core of this problem, but that still needs some time.
And yes, this is a linux problem and no, I have no time to add support for every distro out there ^^ It works just fine on the distros I tested it, but linux has just too much versions to test them all and honestly, I don’t want to do that, even if I had the time to do so. That’s why I rework the file chooser implementation to finally eliminate this issue.
I think i know why it's crashing actually. I've been copying around a fancymenu config to minimize the amount of work I do setting up for packs. Bear in mind i have 80+ packs. And about once a week when possible I bring one forward to whereever your mod sits if it can be done, i copy the base structure over and change the basics. This time however, your structure and the configs changed a whole lot.
that theory didn't work but the safemode option is, idk you can leave this open if you want up to you. techinically you got it covered with safe mode.