Page 1 of 1

Negatron not start in Windows 10

Posted: Sun Jul 07, 2019 9:36 am
by xdevel2000
Hello, first thanks for the program.
However I have a big problem: after installing it the main GUI is not shown.
If I run the .exe it shows the loading windows and after that nothing is shown anymore.
So if I run the following command (I'm also a Java programmer) I have the following error:

java -jar Negatron.jar

Jul 07, 2019 11:27:06 AM net.babelsoft.negatron.NegatronApp start
SEVERE: Couldn't start Negatron

at javafx.fxml.FXMLLoader.constructLoadException(
at javafx.fxml.FXMLLoader.loadImpl(
at javafx.fxml.FXMLLoader.loadImpl(
at javafx.fxml.FXMLLoader.load(
at net.babelsoft.negatron.NegatronApp.start(Unknown Source)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$166(
at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$179(
at com.sun.javafx.application.PlatformImpl.lambda$null$177(
at Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$178(
at Method)
Caused by: java.lang.RuntimeException: javafx.fxml.LoadException:

at net.babelsoft.negatron.view.control.GlobalConfigurationPane.<init>(Unknown Source)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(
at java.lang.reflect.Constructor.newInstance(
at java.lang.Class.newInstance(
at sun.reflect.misc.ReflectUtil.newInstance(
at javafx.fxml.FXMLLoader$InstanceDeclarationElement.constructValue(
at javafx.fxml.FXMLLoader$ValueElement.processStartElement(
at javafx.fxml.FXMLLoader.processStartElement(
at javafx.fxml.FXMLLoader.loadImpl(
... 12 more
Caused by: javafx.fxml.LoadException:

at javafx.fxml.FXMLLoader.constructLoadException(
at javafx.fxml.FXMLLoader.loadImpl(
at javafx.fxml.FXMLLoader.loadImpl(
at javafx.fxml.FXMLLoader.load(
... 23 more
Caused by: java.lang.NumberFormatException: For input string: "0,3"
at sun.misc.FloatingDecimal.readJavaFormatString(
at sun.misc.FloatingDecimal.parseDouble(
at java.lang.Double.parseDouble(
at net.babelsoft.negatron.view.control.form.FloatingNumberField.<init>(Unknown Source)
at net.babelsoft.negatron.controller.GlobalConfigurationPaneController.initialize(Unknown Source)
at javafx.fxml.FXMLLoader.loadImpl(
... 25 more

Thank you for your support.

I have installed all tools you required...

Re: Negatron not start in Windows 10

Posted: Mon Jul 08, 2019 10:06 am
by BabelSoft
Firs of all, you should add those command line options "-Xms512m -Xmx2g". By default, the JVM doesn't allow enough memory to applications and Negatron can thus suffer expansive slowdowns when loading the MAME database into memory the first time you launch it, hence the 2 GB switch. Besides this initial phase, Negatron's memory occupation usually varies between 500 and 800 MB, hence the 512 MB switch.

For your specific issue, I can see this:
> Caused by: java.lang.NumberFormatException: For input string: "0,3"

This exception is raised while Negatron is reading MAME's ini file. Floating numbers should be hardcoded to be render as "0.3" in MAME's ini file but it seems like one line did get saved as "0,3" (notice the comma instead of the dot to separate the integral part from the decimal part). Are you running a special fork of MAME? Can you send me your MAME's ini file?

Re: Negatron not start in Windows 10

Posted: Wed Jul 10, 2019 6:01 pm
by xdevel2000
Hello. I found the problem. I used Negamame and its mame.ini.
The first time I started Negatron it has worked.
After that I changed in Inputs > Joystick Specific Options > Dead Zone to 0.3 but this data has been saved into mame.ini as 0,3.
Maybe is there some problems with locale? My locale is not en-GB or similar.
notepad++_qqfhHnIURs.png (9.8 KiB) Viewed 30950 times
javaw_sFd9DO7TDB.png (26.3 KiB) Viewed 30950 times

Re: Negatron not start in Windows 10

Posted: Sat Jul 13, 2019 9:45 am
by BabelSoft
Argh! Thanks for reporting this. I will hardcode the locale in Negatron then. The fix will be shipped with the next release.