Page 1 of 1

[Bug 1.5.2] - NULL Pointer Exception from image library folder

Posted: Sun Jun 23, 2019 11:22 am
by RevenantBob
One of my players had libraries that worked fine in 1.4.0.5 and with our switch to 1.5.2 to test they got a NULL exception whenever they loaded MapTool. The work around was to remove their libraries so I'm not sure exactly what image file caused this exception but here is the stack trace. I imagine it was just a malformed or invalid image file that happened to fit the accepted naming conventions.

The solution is likely to gracefully handle null image results, but I didn't look at the source code to know exactly what was being accessed as a NULL.

Code: Select all

java.lang.NullPointerException
    at net.rptools.maptool.client.ui.assetpanel.ImageFileImagePanelModel.getImage(ImageFileImagePanelModel.java:166)
    at net.rptools.lib.swing.ImagePanel.paintComponent(ImagePanel.java:196)
    at java.desktop/javax.swing.JComponent.paint(JComponent.java:1074)
    at java.desktop/javax.swing.JComponent.paintToOffscreen(JComponent.java:5255)
    at java.desktop/javax.swing.RepaintManager$PaintManager.paintDoubleBufferedImpl(RepaintManager.java:1633)
    at java.desktop/javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(RepaintManager.java:1608)
    at java.desktop/javax.swing.RepaintManager$PaintManager.paint(RepaintManager.java:1546)
    at java.desktop/javax.swing.RepaintManager.paint(RepaintManager.java:1313)
    at java.desktop/javax.swing.JComponent._paintImmediately(JComponent.java:5203)
    at java.desktop/javax.swing.JComponent.paintImmediately(JComponent.java:5013)
    at java.desktop/javax.swing.RepaintManager$4.run(RepaintManager.java:857)
    at java.desktop/javax.swing.RepaintManager$4.run(RepaintManager.java:840)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
        

Re: [Bug 1.5.2] - NULL Pointer Exception from image library folder

Posted: Sun Jun 23, 2019 12:54 pm
by Phergus
Already fixed for 1.5.3. The issue is caused by an invalid directory.