Bug Fixes

swampwallaby-3.1@5875:
Bug [2827225] NPE in NodeClient.doInvite()

swampwallaby-3.1@5876: Bug [2826715] NPE in GlobalProperty.encode()


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

swampwallaby-3.1@5877 Fixes

Bug [2735630] IllegalArgumentException caused by Unicode ZipEntry names

also recent duplicates 2816969 and 2818174. The Fix is actually replacing the Bug report with an appropriately detailed error message.

B.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

Thus spake “Brent Easton”:

I don’t understand your fix for this one. The new code:

if (room instanceof NodeRoom) {
final NodeRoom nr = (NodeRoom) room;
if (nr != null && nr.getOwner().equals(playerId)) {

}
}

The old code:

if (room instanceof NodeRoom &&
((NodeRoom) room).getOwner().equals(playerId)) {

}

These are equivalent. Because null isn’t an instance of any class,

room instanceof NodeRoom

is always false when room == null, so there’s no point in testing
whether nr != null—it has to be nonnull or that block of code would
never run.

If the NPE was coming from that line, it had to be because getOwner()
was returning null, not because room was null, right?


J.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

Yes indeed, I had a brain fart as I was typing it.

It is possible for a rooms owner to be null, the correct code is:

if (room instanceof NodeRoom) {
final String owner = ((NodeRoom) room).getOwner();
if (owner != null && owner.equals(playerId)) {

}
}

B.

*********** REPLY SEPARATOR ***********

On 30/07/2009 at 10:50 PM Joel Uckelman wrote:


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

Thus spake “Brent Easton”:

That looks better. Thanks. I’ve committed that as 3.1@5880, trunk@5881.


J.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

Thus spake “Brent Easton”:

Merged to 3.1@5878, trunk@5879.


J.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

swampwallaby-3.1@5890 has a fix for

Bug [2827113] ArrayIndexOutOfBoundsException in Embellishment

B.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

Thus spake “Brent Easton”:

Merged to 3.1@5892, trunk@5893.


J.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

swampwallaby-3.1@5903 has fixes for

Bug [2832472] Inventory: Pieces appear multiple times
Bug [2832471] Inventory: Label for folders cannot contain properties
Bug [2825175] Game Piece Inventory: “Draw Piece Images?” option is broken

B.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

Thus spake “Brent Easton”:

Merged to 3.1@5904, trunk@5905.

I’ve also uploaded a current build from the 3.1 branch. I was thinking we
might release 3.1.10 after the Mac problem I’m working on is solved.


J.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

swampwallaby-3.1@5907 has fix for

Bug [2756330] StackOverflowError in BasicPiece.mySetType()

This one was being caused by a Protoype directly or indirectly referencing itself. Fixed by adding a RecursionLimiter to the prototype expansion to catch the loop and report the name of the prototype causing the problem.

B.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

Thus spake “Brent Easton”:

Merged to 3.1@5912, trunk@5914.


J.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

Thus spake “Brent Easton”:

I’ve been poking around and think we might be able to read these ZIP files
instead of just showing an error message. I have a few things I’d like to
try; I’m going to hold off on merging this one for a few days.


J.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

Thus spake “Brent Easton”:

I spent some time investigating exactly what the problem is here, and
have reluctantly come to the same conclusion you did—all we can do for
now is display a warning message.

I think your description of the problem is wrong on one point, though,
namely that it’s non-Unicode characters which are the problem. The Java
ZIP classes expect zip entries to contain UTF-8 encoded strings. Some
ZIP archivers use UTF-8 (7-Zip, does, I think), while others use whatever
the system’s default encoding is. On some systems (e.g., most current
Linux ones), the default encoding is UTF-8, so there’s no problem. Many
other systems have a default encoding which is not UTF-8, but happens to
coincide with UTF-8 over the characters that people are using. (This is
the case for English-speakers using Windows.) The problem arises when
you have Windows users who want to put Heizölrückstoßabdämpfung.png into
their modules, since the filename uses some characters which are not
encoded the same way in UTF-8 as in the default Windows character
encoding.

There are some solutions on the horizon:

  1. Java 7 will have constructors for the ZIP classes which will permit us
    to specify what encoding to use. This way, we could catch the encoding
    exception and try the user’s default encoding instead, as that’s likely
    to be the right one if UTF-8 fails.

  2. Apache has some ZIP classes which handle other encodings properly.

  3. TrueZip handles other encodings properly.

It might be worth considering using the Apache ZIP classes or TrueZip
instead.


J.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

Finally nailed

Bug [2817148] NPE in BasicLogger.write() - Trying to log to closed logfile

in swampwallaby-3.1@6243

B.

Thus spake “Brent Easton”:

Merged to 3.1@6253, trunk@6254.

So the problem was that endLogAction.setEnabled(false) wasn’t being called
for empty log output? Good catch.


J.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

swampwallaby-3.1@6258 has fixes for:

Bug [2888918] IndexOutOfBoundsException in SpecialDie.getImageName()
Bug [2816987] IndexOutOfBoundsException in SpecialDie.getTextValue()

2888918 is caused by trying to use a Symbolic Die with no faces defined.
2816987 is caused by an opponent using a different version of the module where a Symbolic Die has been redefined to have more faces than the version we are using.

B.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

swampwallaby-3.1@6259 has fix for:

Bug [2899561] Module is marked ‘dirty’ as soon as it is opened.

This one was caused by issues with the way the special suboptions of the GlobalOptions component where being lazily initialized and stored locally.

B.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

swampwallaby-3.1@6260 contains a further fix for this problem. The lastSavedConfiguration string was being set before the build was finalised.

B.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)