Konloch / Konloch/bytecode-viewer
NullPointerException in FileChooser when using "Decompile & Save All"
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 15.6k
- Forks
- 1.3k
- PR merge metrics
- No merged PRs in 30d
Description
Describe the bug
When attempting to use the "Decompile & Save All" feature, the application throws a NullPointerException and fails to open the file save dialog.
To Reproduce
- Open a file/project in Bytecode Viewer.
- Click on "Decompile & Save All".
- The error occurs immediately.
Expected behavior
The file chooser dialog should open to allow selecting a destination folder.
Environment
- Bytecode Viewer Version: 2.13.2 [Fat Jar]
- OS: Linux Mint 22.3 Zena XCFE Edition
- Java: 17.0.19
Error Log
Please send this error log to https://github.com/Konloch/bytecode-viewer/issues or Konloch at https://the.bytecode.club or konloch@gmail.com
If you hold appropriate legal rights to the relevant class/jar/apk file please include that as well.
Bytecode Viewer Version: 2.13.2 [Fat Jar], OS: Linux, Java: 17.0.19
java.util.concurrent.ExecutionException: java.lang.NullPointerException: Cannot invoke "javax.swing.AbstractButton.getText()" because "this.delegate" is null
at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191)
at the.bytecode.club.bytecodeviewer.gui.components.FileChooser.create(FileChooser.java:48)
at the.bytecode.club.bytecodeviewer.gui.components.FileChooser.create(FileChooser.java:43)
at the.bytecode.club.bytecodeviewer.resources.ResourceDecompiling.lambda$decompileSaveAll$0(ResourceDecompiling.java:76)
at java.base/java.lang.Thread.run(Thread.java:840)
Caused by: java.lang.NullPointerException: Cannot invoke "javax.swing.AbstractButton.getText()" because "this.delegate" is null
at com.github.weisj.darklaf.delegate.AbstractButtonLayoutDelegate.getText(AbstractButtonLayoutDelegate.java:67)
at com.github.weisj.darklaf.ui.button.DarkButtonUI$DarkButtonLayout.layout(DarkButtonUI.java:568)
at com.github.weisj.darklaf.ui.button.DarkButtonUI$DarkButtonLayout.layoutContainer(DarkButtonUI.java:556)
at java.desktop/java.awt.Container.layout(Container.java:1541)
at java.desktop/java.awt.Container.doLayout(Container.java:1530)
at com.github.weisj.darklaf.ui.button.DarkButtonListener.propertyChange(DarkButtonListener.java:88)
at com.github.weisj.darklaf.ui.togglebutton.DarkToggleButtonListener.propertyChange(DarkToggleButtonListener.java:59)
at java.desktop/java.beans.PropertyChangeSupport.fire(PropertyChangeSupport.java:343)
at java.desktop/java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:335)
at java.desktop/java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:268)
at java.desktop/java.awt.Component.firePropertyChange(Component.java:8722)
at java.desktop/javax.swing.JComponent.putClientProperty(JComponent.java:4173)
at com.github.weisj.darklaf.ui.filechooser.DarkFileChooserUI.adjustComponents(DarkFileChooserUI.java:132)
at com.github.weisj.darklaf.ui.filechooser.DarkFileChooserUI.installComponents(DarkFileChooserUI.java:115)
at java.desktop/javax.swing.plaf.basic.BasicFileChooserUI.installUI(BasicFileChooserUI.java:209)
at java.desktop/javax.swing.plaf.metal.MetalFileChooserUI.installUI(MetalFileChooserUI.java:159)
at java.desktop/javax.swing.JComponent.setUI(JComponent.java:730)
at java.desktop/javax.swing.JFileChooser.updateUI(JFileChooser.java:1840)
at java.desktop/javax.swing.JFileChooser.setup(JFileChooser.java:396)
at java.desktop/javax.swing.JFileChooser.(JFileChooser.java:362)
at java.desktop/javax.swing.JFileChooser.(JFileChooser.java:309)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
... 1 more
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the FileChooser.create methods in FileChooser.java and the decompileSaveAll call in ResourceDecompiling.java. Reproduce "Decompile & Save All" and inspect the file chooser initialization alongside the reported DarkLaf stack trace. Done means the destination-folder dialog opens without the NullPointerException.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 65/100