Mantis Bug Tracker

View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000766OLVGeneral Featurespublic2012-11-29 16:142012-11-29 21:22
ReporterFred 
Assigned ToFred 
PriorityurgentSeveritycrashReproducibilityrandom
StatusclosedResolutionfixed 
PlatformAllOSAllOS VersionAll
Product Version0.0.3-SNAPSHOT 
Target Version0.0.3Fixed in Version0.0.3 
Summary0000766: NPE in GraphPositionPanel.java:97
Descriptionfrom GraphPositionPanel.java:79
Additional Informationfred@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)
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
User avatar (0002445)
BenFenner (developer)
2012-11-29 16:26

Can this be changed from a Firmware "issue" to an OLV "issue"?
User avatar (0002446)
BenFenner (developer)
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.
User avatar (0002447)
Fred (administrator)
2012-11-29 16:32

Yes, quite likely. I fixed another one of those recentlyish too.
User avatar (0002450)
Fred (administrator)
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.
User avatar (0002451)
Fred (administrator)
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)
User avatar (0002452)
Fred (administrator)
2012-11-29 20:06

Closing and stripping of versions as this code was never released publicly.
User avatar (0002456)
Fred (administrator)
2012-11-29 21:21

Was actually public, so adding version info back in. Fixed in 23ebdbdffb4ee5e3a3e656ca60f8f7887c52163e


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker