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

Confirmed bugs should get a single post here. Check the READ ME FIRST sticky thread for the format.

Moderators: dorpond, trevor, Azhrei, giliath, jay, Mr.Ice, MapTool BugReport Manager

Forum rules
Posts that do not conform to the READ ME FIRST sticky thread are subject to deletion.
Post Reply
RevenantBob
Cave Troll
Posts: 36
Joined: Sat May 19, 2012 3:41 pm

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

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

Phergus
Deity
Posts: 7132
Joined: Fri May 12, 2006 8:56 pm
Location: Middle of Nowhere, NM
Contact:

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

Post by Phergus »

Already fixed for 1.5.3. The issue is caused by an invalid directory.

Post Reply

Return to “Bug Reports”