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

java.lang.NullPointerException on startup with Linux #10

Open
NosajDraw opened this issue Mar 28, 2016 · 8 comments
Open

java.lang.NullPointerException on startup with Linux #10

NosajDraw opened this issue Mar 28, 2016 · 8 comments

Comments

@NosajDraw
Copy link

Attempting to run the program results in this:

java.lang.NullPointerException
at com.narrowtux.fmm.Main.start(Main.java:40)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$162(LauncherImpl.java:863)
at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$175(PlatformImpl.java:326)
at com.sun.javafx.application.PlatformImpl.lambda$null$173(PlatformImpl.java:295)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$174(PlatformImpl.java:294)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
at com.sun.glass.ui.gtk.GtkApplication.lambda$null$49(GtkApplication.java:139)
at java.lang.Thread.run(Thread.java:745)

@daugustin
Copy link

I'm seeing the exact same NullPointerException.

oracle-jdk-bin 1.8.0.77 (8u77) from Gentoo.

Use Flags:

 + + alsa         : Add support for media-libs/alsa-lib (Advanced Linux Sound Architecture)
 + + cups         : Add support for CUPS (Common Unix Printing System)
 - - derby        : Install bundled Derby (Java database)
 - - doc          : Add extra documentation (API, Javadoc, etc). It is recommended to enable per package instead of globally
 - - examples     : Install examples, usually source code
 + + fontconfig   : Support for configuring and customizing font access via media-libs/fontconfig
 - - headless-awt : Don't install the X backend for AWT, needed by some GUIs (used to be X flag)
 + + javafx       : Install JavaFX libraries
 - - jce          : Install Java Cryptographic Extension Unlimited Strength Jurisdiction Policy Files
 - - nsplugin     : Build plugin for browsers supporting the Netscape plugin architecture (that is almost any modern browser)
 - - pax_kernel   : Use paxctl to mark the JVM binaries
 - - source       : Install JVM (and optionally JavaFX) sources

What distro and Java are you using @NosajDraw ?

@NosajDraw
Copy link
Author

Ubuntu 14.10 and Oracle Java 8.

However doing some digging, it looks like this bug has been fixed in the source code, just not in the executable version.

But compiling from source is not something I really want to start messing with, so hopefully the maintainer will upload a new compile soon.

@daugustin
Copy link

I tried, a clean build from master worked.

@wjdp
Copy link

wjdp commented May 1, 2016

Same issue on Ubuntu 15.10

Picked up JAVA_TOOL_OPTIONS: -javaagent:/usr/share/java/jayatanaag.jar 
java.lang.NullPointerException
    at com.narrowtux.fmm.Main.start(Main.java:40)
    at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$162(LauncherImpl.java:863)
    at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$175(PlatformImpl.java:326)
    at com.sun.javafx.application.PlatformImpl.lambda$null$173(PlatformImpl.java:295)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sun.javafx.application.PlatformImpl.lambda$runLater$174(PlatformImpl.java:294)
    at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
    at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
    at com.sun.glass.ui.gtk.GtkApplication.lambda$null$49(GtkApplication.java:139)
    at java.lang.Thread.run(Thread.java:745)

@Aureliolo
Copy link

Aureliolo commented Jun 14, 2016

Same issue here with Arch Linux with java-8-openjdk/jre and OpenJFX installed.

$ java -jar FactorioModManager-0.2.1.jar 

(java:28245): Gtk-WARNING **: Unable to locate theme engine in module_path: "adwaita",

(java:28245): Gtk-WARNING **: Unable to locate theme engine in module_path: "adwaita",
java.lang.NullPointerException
        at com.narrowtux.fmm.Main.start(Main.java:40)
        at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$8(LauncherImpl.java:863)
        at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$7(PlatformImpl.java:326)
        at com.sun.javafx.application.PlatformImpl.lambda$null$5(PlatformImpl.java:295)
        at java.security.AccessController.doPrivileged(Native Method)
        at com.sun.javafx.application.PlatformImpl.lambda$runLater$6(PlatformImpl.java:294)
        at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
        at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
        at com.sun.glass.ui.gtk.GtkApplication.lambda$null$5(GtkApplication.java:139)
        at java.lang.Thread.run(Thread.java:745)

@QuicksilverBR
Copy link

QuicksilverBR commented Aug 4, 2020

Assuming the project is complete at this point, but to anyone who stumbled across it while searching for a Linux-capable manager, the issues above still occur both in the release version and building from source. I'm on Fedora but others here show it not working on many of the major distros.

java.lang.NullPointerException at com.narrowtux.fmm.Main.start(Main.java:40) at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$8(LauncherImpl.java:863) at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$7(PlatformImpl.java:326) at com.sun.javafx.application.PlatformImpl.lambda$null$5(PlatformImpl.java:295) at java.security.AccessController.doPrivileged(Native Method) at com.sun.javafx.application.PlatformImpl.lambda$runLater$6(PlatformImpl.java:294) at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95) at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method) at com.sun.glass.ui.gtk.GtkApplication.lambda$null$10(GtkApplication.java:245) at java.lang.Thread.run(Thread.java:748)

A shame really, as it's one of the few promising FMMs that would run on Linux systems. Still searching for other options.

@narrowtux
Copy link
Owner

narrowtux commented Aug 4, 2020

When building from source, this error should not appear at all, since there’s no Main class any more. Is there a different error that is thrown when you build from source?

@QuicksilverBR
Copy link

QuicksilverBR commented Aug 5, 2020

Correction: Compiling from the source code. Using the latest release .zip and following instructions in the readme:

To compile, you need at least JDK 1.8_40 and maven.

After executing
mvn clean package
from the command line, you'll have a .jar file in the target/directory.

Running that .jar results in the previous error. It did lead me to a solution though; found a reddit post explaining how save-mod syncing is done, so for now I have just made saves with the mods loaded to be used for later single/multiplayer games.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants