Negatron not start in Windows 10

Here's the place to discuss anything about Negatron or MAME in English.
Post Reply
xdevel2000
Posts: 2
Joined: Sun Jul 07, 2019 9:28 am

Negatron not start in Windows 10

Post 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
javafx.fxml.LoadException:
file:/D:/GAMES/MAME/FRONTEND/Negatron0.99_4/Negatron.jar!/net/babelsoft/negatron/view/control/fxml/MainView.fxml:117

at javafx.fxml.FXMLLoader.constructLoadException(FXMLLoader.java:2601)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2579)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2441)
at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2409)
at net.babelsoft.negatron.NegatronApp.start(Unknown Source)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$166(LauncherImpl.java:863)
at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$179(PlatformImpl.java:326)
at com.sun.javafx.application.PlatformImpl.lambda$null$177(PlatformImpl.java:295)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$178(PlatformImpl.java:294)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.lambda$null$152(WinApplication.java:177)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.RuntimeException: javafx.fxml.LoadException:
file:/D:/GAMES/MAME/FRONTEND/Negatron0.99_4/Negatron.jar!/net/babelsoft/negatron/view/control/fxml/GlobalConfigurationPane.fxml

at net.babelsoft.negatron.view.control.GlobalConfigurationPane.<init>(Unknown Source)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at java.lang.Class.newInstance(Class.java:442)
at sun.reflect.misc.ReflectUtil.newInstance(ReflectUtil.java:51)
at javafx.fxml.FXMLLoader$InstanceDeclarationElement.constructValue(FXMLLoader.java:1009)
at javafx.fxml.FXMLLoader$ValueElement.processStartElement(FXMLLoader.java:746)
at javafx.fxml.FXMLLoader.processStartElement(FXMLLoader.java:2707)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2527)
... 12 more
Caused by: javafx.fxml.LoadException:
file:/D:/GAMES/MAME/FRONTEND/Negatron0.99_4/Negatron.jar!/net/babelsoft/negatron/view/control/fxml/GlobalConfigurationPane.fxml

at javafx.fxml.FXMLLoader.constructLoadException(FXMLLoader.java:2601)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2579)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2441)
at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2409)
... 23 more
Caused by: java.lang.NumberFormatException: For input string: "0,3"
at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:2043)
at sun.misc.FloatingDecimal.parseDouble(FloatingDecimal.java:110)
at java.lang.Double.parseDouble(Double.java:538)
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(FXMLLoader.java:2548)
... 25 more

Thank you for your support.

P.S.
I have installed all tools you required...
BabelSoft
Site Admin
Posts: 342
Joined: Sat Jun 02, 2012 9:23 pm

Re: Negatron not start in Windows 10

Post 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?
xdevel2000
Posts: 2
Joined: Sun Jul 07, 2019 9:28 am

Re: Negatron not start in Windows 10

Post 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.
Thanks.
notepad++_qqfhHnIURs.png
notepad++_qqfhHnIURs.png (9.8 KiB) Viewed 39287 times
javaw_sFd9DO7TDB.png
javaw_sFd9DO7TDB.png (26.3 KiB) Viewed 39287 times
BabelSoft
Site Admin
Posts: 342
Joined: Sat Jun 02, 2012 9:23 pm

Re: Negatron not start in Windows 10

Post by BabelSoft »

Argh! Thanks for reporting this. I will hardcode the locale in Negatron then. The fix will be shipped with the next release.
Post Reply