openlcb / OpenLCB_Java

A git-managed copy of the SVN-based Java prototype implementation of OpenLCB. This implementation operates inside JMRI.
6 stars 9 forks source link

LoaderClient throws NPE when a different computer is loading stuff #71

Open balazsracz opened 7 years ago

balazsracz commented 7 years ago

when there are multiple computers on a network, it is possible to have JMRI running and a firmware update be happening over the network from another computer.

I am getting NPE in the JMRI console when I'm doing this:

2017-01-14 13:19:47,559 jmrix.AbstractMRTrafficController WARN - notify: During reply dispatch to jmri.jmrix.openlcb.OlcbConfigurationManager$2@6fe0860f [AWT-EventQueue-0] java.lang.NullPointerException at org.openlcb.LoaderClient.sendStreamNext(LoaderClient.java:255) at org.openlcb.LoaderClient.handleStreamDataProceed(LoaderClient.java:278) at org.openlcb.StreamDataProceedMessage.applyTo(StreamDataProceedMessage.java:39) at org.openlcb.MessageDecoder.put(MessageDecoder.java:34) at org.openlcb.OlcbInterface$MessageDispatcher.put(OlcbInterface.java:189) at org.openlcb.can.CanInterface$FrameParser.send(CanInterface.java:124) at jmri.jmrix.openlcb.OlcbConfigurationManager$2.reply(OlcbConfigurationManager.java:385) at jmri.jmrix.can.adapters.gridconnect.GcTrafficController.forwardReply(GcTrafficController.java:42) at jmri.jmrix.AbstractMRTrafficController.notifyReply(AbstractMRTrafficController.java:191) at jmri.jmrix.AbstractMRTrafficController$RcvNotifier.run(AbstractMRTrafficController.java:1040) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:301)

pabender commented 7 years ago

Sent from my iPhone

On Jan 14, 2017, at 7:30 AM, Balazs Racz notifications@github.com wrote:

when there are multiple computers on a network, it is possible to have JMRI running and a firmware update be happening over the network from another computer.

I am getting NPE in the JMRI console when I'm doing this:

Which computer is generating the NPE?

What is happening on the computer that is not going the firmware update?

Paul

balazsracz commented 7 years ago

The download is performed by a non-JMRI computer. The NPE is thrown by a JMRI on the same bus.

-- Sent from my mobile device

dpharris commented 1 year ago

Is this still an active issue?

bobjacobsen commented 1 year ago

I haven't been able to recreate it with two JMRI instances.

But reading the traceback, it looks like the Other Computer was doing stream-based I/O. I might not have been recreating it correctly because JMRI uses datagrams to do firmware download.