If the turnout table Mode set up for two sensors and one has not been entered, If the preferences are set to open that panel on startup JMRI hangs
This is the session log to the point where it hangs, PP start screen never opens.
04 util.Log4JUtil INFO - ** JMRI log * [main]
2015-12-27 14:47:58,637 util.Log4JUtil INFO - This log is appended to file: C:\Users\walt\JMRI\log\messages.log [main]
2015-12-27 14:47:58,638 util.Log4JUtil INFO - This log is stored in file: C:\Users\walt\JMRI\log\session.log [main]
2015-12-27 14:47:58,649 apps.Apps INFO - PanelPro version 4.2-R6f3c1be starts under Java 1.8.0_66 at Sun Dec 27 14:47:58 CST 2015 [main]
2015-12-27 14:48:02,366 apps.Apps INFO - Starting with profile Testing.3f0fa613 [main]
2015-12-27 14:48:02,853 node.NodeIdentity INFO - Using jmri-08002700F072-3f0fa613 as the JMRI Node identity [main]
2015-12-27 14:48:03,560 locobuffer.LocoBufferAdapter INFO - COM4 port opened at 57600 baud with DTR: true RTS: true DSR: false CTS: true CD: false [main]
2015-12-27 14:48:03,767 configurexml.PerformFileModelXml INFO - Load file C:\Users\walt\Dropbox\jmri\Walts Narrow GaugetORTUStEST.xml [main]
2015-12-27 14:48:03,903 implementation.AbstractTurnout WARN - expected Sensor 1 not defined - LT3 [main]
2015-12-27 14:48:09,134 util.FileUtilSupport INFO - File path program: is C:\Program Files\JMRI\ [main]
2015-12-27 14:48:09,135 util.FileUtilSupport INFO - File path preference: is C:\Users\walt\Dropbox\jmri\ [main]
2015-12-27 14:48:09,136 util.FileUtilSupport INFO - File path profile: is C:\Users\walt\JMRI\Testing\ [main]
2015-12-27 14:48:09,136 util.FileUtilSupport INFO - File path settings: is C:\Users\walt\JMRI\ [main]
2015-12-27 14:48:09,138 util.FileUtilSupport INFO - File path home: is C:\Users\walt\ [main]
2015-12-27 14:48:09,138 util.FileUtilSupport INFO - File path scripts: is C:\Users\walt\Dropbox\jmri\py scripts\ [main]
2015-12-27 14:48:09,217 ptionhandler.UncaughtExceptionHandler ERROR - Unhandled Exception: java.lang.NullPointerException [main]
java.lang.NullPointerException
at jmri.implementation.AbstractTurnout.sensorPropertyChange(AbstractTurnout.java:717)
at jmri.implementation.AbstractTurnout.propertyChange(AbstractTurnout.java:679)
at java.beans.PropertyChangeSupport.fire(Unknown Source)
at java.beans.PropertyChangeSupport.firePropertyChange(Unknown Source)
at java.beans.PropertyChangeSupport.firePropertyChange(Unknown Source)
at jmri.implementation.AbstractNamedBean.firePropertyChange(AbstractNamedBean.java:185)
at jmri.implementation.AbstractSensor.setKnownState(AbstractSensor.java:164)
at jmri.implementation.DefaultConditional.takeActionIfNeeded(DefaultConditional.java:783)
at jmri.implementation.DefaultConditional.calculate(DefaultConditional.java:311)
at jmri.implementation.DefaultLogix.calculateConditionals(DefaultLogix.java:221)
at jmri.implementation.DefaultLogix.activateLogix(DefaultLogix.java:250)
at jmri.managers.DefaultLogixManager.activateAllLogixs(DefaultLogixManager.java:167)
at apps.Apps.<init>(Apps.java:465)
at apps.PanelPro.PanelPro.<init>(PanelPro.java:48)
at apps.PanelPro.PanelPro.main(PanelPro.java:110)
2015-12-27 14:48:10,481 util.prefs WARN - Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5. [initialize preferences]</init></init>
Two things come up here:
Should this ever be able to happen?? Until you enter the two
sensors, you don't really have a 'two sensor' turnout. Should it even be
able to save XML like this??
If you are trying to load a panel file and find something like this,
should it:
a. Convert to whatever sort of turnout fits the data provided?? This
sounds the least impactful.
b. Skip creating this turnout, but that would lose any related data
(like one of the sensors)?? And later parts of the panel would likely
generate more errors due to the turnout not existing.
c. Stop and wait for the user to enter a sensor?? Kind of like what
happens when an icon file is mentioned but doesn't exist.
d. Abort loading the panel file. But then how does the user fix the
problem is the data isn't loaded??
e. Create the turnout best it can but somehow not get stuck. This I'm
guessing is similar to what happens between the time you change the turnout
type and when you have entered the sensors.
Depending on what people think of some of this should guide which type of
fix should be made. Anyway at all, hanging is not what should be happening.
-Ken Cameron, Member JMRI Dev Team
www.jmri.org
www.fingerlakeslivesteamers.org
www.cnymod.com
www.syracusemodelrr.org
How about having the number of sensor entered define mode. If one sensors it is a single senor mode, two sensors its two sensor mode. no sensors allow the other feedback modes.
Just a late noght thought.
Walt