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

Preferences of JADX-GUI Not Working #1331

Closed
Nord-1 opened this issue Jan 12, 2022 · 7 comments
Closed

Preferences of JADX-GUI Not Working #1331

Nord-1 opened this issue Jan 12, 2022 · 7 comments

Comments

@Nord-1
Copy link

Nord-1 commented Jan 12, 2022

On Linux, I cannot open the preferences window on versions 1.2.0 - 1.3.1. I got the following errors:

Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: (minimum <= value <= maximum) is false
	at java.desktop/javax.swing.SpinnerNumberModel.<init>(SpinnerNumberModel.java:139)
	at java.desktop/javax.swing.SpinnerNumberModel.<init>(SpinnerNumberModel.java:161)
	at jadx.gui.settings.JadxSettingsWindow.makeDecompilationGroup(JadxSettingsWindow.java:437)
	at jadx.gui.settings.JadxSettingsWindow.initUI(JadxSettingsWindow.java:119)
	at jadx.gui.settings.JadxSettingsWindow.<init>(JadxSettingsWindow.java:89)
	at jadx.gui.ui.MainWindow$12.actionPerformed(MainWindow.java:827)
	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:298)
	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)
@jpstotz
Copy link
Collaborator

jpstotz commented Jan 12, 2022

That error message only makes sense if Java is unable to determine how many CPU cores your system has so that Runtime.getRuntime().availableProcessors()` returns 0. Jadx then tries to create a spinner UI element with minimum 1 and maximum 0.

What system, CPU and Java runtime (version and vendor) do you use?

jpstotz added a commit to jpstotz/jadx that referenced this issue Jan 12, 2022
@skylot
Copy link
Owner

skylot commented Jan 12, 2022

That error message only makes sense if Java is unable to determine how many CPU cores your system has so that Runtime.getRuntime().availableProcessors()` returns 0

(minimum <= value <= maximum) is false

@jpstotz I think it is also possible that a value (ie settings.getThreadsCount()) was set to an incorrect value.
So it will be nice also check threads count property in setter and in getter (in case it is already corrupted in saved settings).

jpstotz added a commit to jpstotz/jadx that referenced this issue Jan 12, 2022
@jpstotz
Copy link
Collaborator

jpstotz commented Jan 12, 2022

@jpstotz I think it is also possible that a value (ie settings.getThreadsCount()) was set to an incorrect value. So it will be nice also check threads count property in setter and in getter (in case it is already corrupted in saved settings).

@skylot Correct that would be another possibility. If the thread count is higher than 2*coreCount I now extend the spinner so that the correct threads value can be shown.

skylot pushed a commit that referenced this issue Jan 12, 2022
* fix: processing threads spinner initialization (#1331)
* fix: processing threads spinner initialization (#1331)
@skylot
Copy link
Owner

skylot commented Jan 12, 2022

@jpstotz thanks! I merged your PR 👍

@Nord-1 please check latest unstable build

@Nord-1
Copy link
Author

Nord-1 commented Jan 12, 2022

Thanks all for your quick replies.

To clarify I am using Kali Linux in VMware. This error was only triggered when I updated Kali, yet I could not determine the cause. I will check the latest build and give feedback.

@Nord-1
Copy link
Author

Nord-1 commented Jan 12, 2022

It's working again! Thanks for the quick fixes!

@skylot
Copy link
Owner

skylot commented Jan 12, 2022

Great! 🎉

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

3 participants