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

LoaderClient throws NPE when user presses cancel on file selection #91

Closed
balazsracz opened this issue Apr 25, 2017 · 1 comment
Closed
Assignees

Comments

@balazsracz
Copy link
Collaborator

Steps to repro:

  • open firmware uploader from JMRI
  • hit select file
  • press cancel on the dialog

expected result: nothing happens
actual result: NPE gets printed to the console.

This is what it looks like:
2017-04-25 16:04:49,340 ptionhandler.UncaughtExceptionHandler ERROR - Uncaught Exception caught by jmri.util.exceptionhandler.UncaughtExceptionHandler [AWT-EventQueue-0]
java.lang.NullPointerException
at jmri.jmrix.openlcb.swing.downloader.LoaderPane.doRead(LoaderPane.java:95)
at jmri.jmrix.AbstractLoaderPane.lambda$0(AbstractLoaderPane.java:111)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
at java.awt.Component.processMouseEvent(Component.java:6533)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
at java.awt.Component.processEvent(Component.java:6298)
at java.awt.Container.processEvent(Container.java:2236)
at java.awt.Component.dispatchEventImpl(Component.java:4889)
at java.awt.Container.dispatchEventImpl(Container.java:2294)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
at java.awt.Container.dispatchEventImpl(Container.java:2280)

It seems we don't check for the return status when getting back control from the file select dialog.

@bobjacobsen
Copy link
Contributor

This was fixed in JMRI 5.3.4 by JMRI/JMRI/#111811, please close.

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