ezst036 / EasySeats-releases

EasySeats multiseat GUI configuration tool executables
https://easy-seats.weebly.com/
14 stars 1 forks source link

NumberFormatException when trying to get system devices #2

Closed flintstryker closed 4 years ago

flintstryker commented 4 years ago

In both version 0.8 and 0.7 (I have not tried earlier versions), when I click the button to load system devices, I get this error:

Screenshot from 2020-08-14 18-46-04 systemd 245 (245.4-4ubuntu3.2) +PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD +IDN2 -IDN +PCRE2 default-hierarchy=hybrid Exception in thread "AWT-EventQueue-0" java.lang.NumberFormatException: For input string: "2452454432" at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) at java.base/java.lang.Integer.parseInt(Integer.java:652) at java.base/java.lang.Integer.parseInt(Integer.java:770) at EasySeats.sdAccess.getsystemdVer(sdAccess.java:157) at EasySeats.EasySeats.parssystemdVer(EasySeats.java:922) at EasySeats.EasySeats.getDevices(EasySeats.java:349) at EasySeats.EasySeats.getDevicesButtonActionPerformed(EasySeats.java:333) at EasySeats.EasySeats.access$000(EasySeats.java:22) at EasySeats.EasySeats$2.actionPerformed(EasySeats.java:126) at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1967) at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2308) at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:405) at java.desktop/javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:262) at java.desktop/javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:279) at java.desktop/java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:297) at java.desktop/java.awt.Component.processMouseEvent(Component.java:6635) at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3342) at java.desktop/java.awt.Component.processEvent(Component.java:6400) at java.desktop/java.awt.Container.processEvent(Container.java:2263) at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5011) at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321) at java.desktop/java.awt.Component.dispatchEvent(Component.java:4843) at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4918) at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4547) at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4488) at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2307) at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2772) at java.desktop/java.awt.Component.dispatchEvent(Component.java:4843) at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:772) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715) at java.base/java.security.AccessController.doPrivileged(Native Method) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95) at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:745) at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:743) at java.base/java.security.AccessController.doPrivileged(Native Method) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85) at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742) at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203) at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124) at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

ezst036 commented 4 years ago

Hello,

This was being caused by the validation for systemd version. On Ubuntu Focal Fossa (in your screenshot you can see it) the version of systemd is reported as systemd 245 (245.4-4ubuntu3.2). This was being cleaned out with a regex as having a version of 2452454432, which actually should have still worked. But nonetheless. In the latest commit of the EasySeats-Java repository I removed all checks for the systemd version, to keep the code more simple without the need of hack solutions.

It's been roughly 2 years since version 236 came out, which is the required minimum version for EasySeats to function. I would have needed to remove the version check at some time anyways so why not now.

A new jar file was created, 0.8.1, please give it a try. If there is some other issue, let me know. Thank you for reporting your issue, I look forward to knowing if this has been resolved.

Screenshot

flintstryker commented 4 years ago

You solved it! Thank you sir. All devices load as expected now.