Skip to content

NullPointerException in FileChooser when using "Decompile & Save All" #581

Description

@KMors0

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

  1. Open a file/project in Bytecode Viewer.
  2. Click on "Decompile & Save All".
  3. 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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions