1.3b91 Java Null Pointer Exception

Thoughts, Help, Feature Requests, Bug Reports, Developing code for...

Moderators: dorpond, trevor, Azhrei

Forum rules
PLEASE don't post images of your entire desktop, attach entire campaign files when only a single file is needed, or generally act in some other anti-social behavior. :)
Post Reply
greivel
Kobold
Posts: 4
Joined: Wed Jan 13, 2010 2:32 am

1.3b91 Java Null Pointer Exception

Post by greivel »

My DM frantically emailed me when he was no longer able to open his campaign file because it kept reporting a Java Null Pointer exception. He uses a Mac, but I had the same problem trying to open his campaign file on my Ubuntu machine. I tracked the problem down to a few DrawnElements in the drawables section of a specific map. Here's one of the bad elements

Code: Select all

            <net.rptools.maptool.model.drawing.DrawnElement>
              <drawable class="net.rptools.maptool.model.drawing.LineSegment">
                <id>
                  <baGUID>AAAAAIRZ36hQBwAAAAAAAA==</baGUID>
                </id>
                <layer>TOKEN</layer>
                <points/>
                <width>3.0</width>
              </drawable>
              <pen>
                <foregroundMode>0</foregroundMode>
                <paint class="net.rptools.maptool.model.drawing.DrawableColorPaint">
                  <color>-16777216</color>
                </paint>
                <backgroundMode>0</backgroundMode>
                <backgroundPaint class="net.rptools.maptool.model.drawing.DrawableColorPaint">
                  <color>-1</color>
                </backgroundPaint>
                <thickness>3.0</thickness>
                <eraser>false</eraser>
                <opacity>1.0</opacity>
                <color>0</color>
                <backgroundColor>0</backgroundColor>
              </pen>
            </net.rptools.maptool.model.drawing.DrawnElement>
I think that the problem is the empty points field. They all had that in common, and once I removed them, everything worked fine. I wish I knew how he got the empty points fields. He did say that while he was updating his maps Maptool was reporting errors, but I have nothing more specific than that.

Should I file a report in the bug report sub-topic?

User avatar
aliasmask
RPTools Team
Posts: 9031
Joined: Tue Nov 10, 2009 6:11 pm
Location: California

Re: 1.3b91 Java Null Pointer Exception

Post by aliasmask »

Good work tracking that down. I don't think any more patches will be coming out for 1.3 and without knowing how to duplicate it's hard to say what can be done. I would imagine a check for null data in the code would be a basic check and would be a simple fix but it doesn't address how it happens. Personally, I'm just going to make a mental note for future complaints and see if it can be resolved the same way you fixed the problem.

Post Reply

Return to “MapTool”