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

gui: Fix --select-class option (regression) #816

Merged
merged 1 commit into from
Dec 26, 2019
Merged

gui: Fix --select-class option (regression) #816

merged 1 commit into from
Dec 26, 2019

Conversation

S-trace
Copy link
Contributor

@S-trace S-trace commented Dec 25, 2019

❗ Please review the guidelines for contributing
Ok.
"./gradlew clean build dist" check passed.

Description

Commit 9c88f70 broked "--select-class" command-line option for jadx-gui.
jadx-gui fails to open specified class, because file is not loaded yet and decompiler.getClasses() returns null, which causes NPE:
Exception in thread "AWT-EventQueue-1" java.lang.NullPointerException
at jadx.gui.JadxWrapper.searchJavaClassByClassName(JadxWrapper.java:146)
at jadx.gui.ui.MainWindow.processCommandLineArgs(MainWindow.java:204)
at jadx.gui.ui.MainWindow.init(MainWindow.java:195)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
at org.GNOME.Accessibility.AtkWrapper$6.dispatchEvent(AtkWrapper.java:705)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

So, perform selection of specified class when file is loaded, but before starting background jobs.

Fixes #815

Commit 9c88f70 broked "--select-class" command-line option for jadx-gui.
jadx-gui fails to open specified class, because file is not loaded yet and decompiler.getClasses() returns null, which causes NPE:
Exception in thread "AWT-EventQueue-1" java.lang.NullPointerException
at jadx.gui.JadxWrapper.searchJavaClassByClassName(JadxWrapper.java:146)
at jadx.gui.ui.MainWindow.processCommandLineArgs(MainWindow.java:204)
at jadx.gui.ui.MainWindow.init(MainWindow.java:195)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
at org.GNOME.Accessibility.AtkWrapper$6.dispatchEvent(AtkWrapper.java:705)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

So, perform selection of specified class when file is loaded, but before starting background jobs.

Fixes #815
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

Successfully merging this pull request may close these issues.

[gui] "--select-class" jadx-gui option stopped working - regression.
2 participants