FreeEMS Issues - OLV
View Issue Details
0000766OLVGeneral Featurespublic2012-11-29 16:142012-11-29 21:22
Fred 
Fred 
urgentcrashrandom
closedfixed 
AllAllAll
0.0.3-SNAPSHOT 
0.0.30.0.3 
0000766: NPE in GraphPositionPanel.java:97
from GraphPositionPanel.java:79
fred@cheetah:~/userlogs/hentai$ olv 2012.11.24-16.34.05.bin
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
    at org.diyefi.openlogviewer.graphing.GraphPositionPanel.paintPositionBar(GraphPositionPanel.java:97)
    at org.diyefi.openlogviewer.graphing.GraphPositionPanel.paintComponent(GraphPositionPanel.java:79)
    at javax.swing.JComponent.paint(JComponent.java:1030)
    at javax.swing.JComponent.paintChildren(JComponent.java:867)
    at javax.swing.JComponent.paint(JComponent.java:1039)
    at javax.swing.JComponent.paintToOffscreen(JComponent.java:5139)
No tags attached.

Notes
(0002445)
BenFenner   
2012-11-29 16:26   
Can this be changed from a Firmware "issue" to an OLV "issue"?
(0002446)
BenFenner   
2012-11-29 16:32   
Seems like it might be a threading issue, or similar. It is possible the GraphPositionPanel is trying to paint before the EntireGraphingPanel is initialized. Or maybe before OpenLogViewer the app itself is initialized.
(0002447)
Fred   
2012-11-29 16:32   
Yes, quite likely. I fixed another one of those recentlyish too.
(0002450)
Fred   
2012-11-29 20:05   
This was a regression from public code that I was yet to publish. I'll revert it before it's shared, thus I'll close it now.

The application must be launched from EventQueue.invokeLater() or EventQueue.invokeAndWait() and I had removed that. It ran for 2 months without troubles in this broken state, too.

For reference, these flaws can be checked for by using substance LAF:

UIManager.setLookAndFeel(new SubstanceGraphiteLookAndFeel());

Which requires either this:

<dependency>
    <groupId>org.java.net.substance</groupId>
    <artifactId>substance</artifactId>
    <version>6.0</version>
</dependency>

Or this:

<dependency>
    <groupId>com.github.insubstantial</groupId>
    <artifactId>substance-swingx</artifactId>
    <version>7.2.1</version>
</dependency>

However at the moment that just fails with another issue due to the way it's packaged, so it can't be used to debug the rest of the app, only launch time at the moment.
(0002451)
Fred   
2012-11-29 20:05   
Which gives this result when broken, btw:

Exception in thread "main" java.lang.IllegalStateException: This method must be called on the Event Dispatch Thread
    at org.pushingpixels.substance.api.SubstanceLookAndFeel.setSkin(SubstanceLookAndFeel.java:1916)
    at org.pushingpixels.substance.api.SubstanceLookAndFeel.initialize(SubstanceLookAndFeel.java:1578)
    at javax.swing.UIManager.setLookAndFeel(UIManager.java:513)
    at org.diyefi.openlogviewer.OpenLogViewer.main(OpenLogViewer.java:308)
(0002452)
Fred   
2012-11-29 20:06   
Closing and stripping of versions as this code was never released publicly.
(0002456)
Fred   
2012-11-29 21:21   
Was actually public, so adding version info back in. Fixed in 23ebdbdffb4ee5e3a3e656ca60f8f7887c52163e