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 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

    at net.rptools.maptool.client.ui.assetpanel.ImageFileImagePanelModel.getImage(
    at net.rptools.lib.swing.ImagePanel.paintComponent(
    at java.desktop/javax.swing.JComponent.paint(
    at java.desktop/javax.swing.JComponent.paintToOffscreen(
    at java.desktop/javax.swing.RepaintManager$PaintManager.paintDoubleBufferedImpl(
    at java.desktop/javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(
    at java.desktop/javax.swing.RepaintManager$PaintManager.paint(
    at java.desktop/javax.swing.RepaintManager.paint(
    at java.desktop/javax.swing.JComponent._paintImmediately(
    at java.desktop/javax.swing.JComponent.paintImmediately(
    at java.desktop/javax.swing.RepaintManager$
    at java.desktop/javax.swing.RepaintManager$
    at java.base/ 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.