candiate for 3.1.0-beta6

I was hoping that beta6 would be the last 3.1.0 beta, but due to the
serious Restricted Access bug in beta5, it seems like we should put out
a replacement ASAP and fix the remaining problems in beta7.

Try svn4509:

nomic.net/~uckelman/tmp/vassal/

By my count, we’ve had no fewer than 26 bug fixes in the past 11 days
since 3.1.0-beta5 was released, which I think is an outstanding effort
on our part. Once we finally do release 3.1.0, it should be the most
robust release we’ve had in a long time.

In the meantime, if you’re not already working on a bug, please Adopt a
Bug and find a fix for it.

Please try svn4514 instead. svn4509 was missing the Restricted Access fix
because I hadn’t updated my trunk before building from it.

nomic.net/~uckelman/tmp/vassal/

I’d like to release this on Saturday, if possible, so have a look and let
me know if this seems ok.

Joel,

There is one last thing I would like to squeeze into beta6.

The Drag and Drop bug is driving me absolutely batty. I have 2 theories at the moment:

  1. An intermittent Java bug generating a spurious second DragGesture
  2. A race condition where on a heavily loaded system, then end of a drag is not completely processed before the user tries a new drag.

I’d like to catch the InvalidDnDException and dump a bunch of debug info about the current and previous drags and then rethrow the exception. I’ll try it get it done today.

B.

Thus spake “Brent Easton”:

Alright, I’ll wait for you.


J.


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

Post generated using Mail2Forum (mail2forum.com)

Committed to swampwallaby-work@4523.

Brent.


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

Post generated using Mail2Forum (mail2forum.com)

Also,

Bug [2301594] LoadExtensionException trying to open an Extension

in swampwallaby-work@4509 was never merged.

And what have you decided to do about

Bug [2265820] StackOverflowError in LaunchButton$1.actionPerformed()

?

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 trunk@4524.


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’m worried about the design of the AbstractMetaData class. It seems
like whenever we add a new subclass, we have to make changes to it.
Shouldn’t those things be handled by polymorphism rather than by packing
cast structures into the parent class?

I haven’t had time to think about this one again.


J.


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

Post generated using Mail2Forum (mail2forum.com)

Thus spake Joel Uckelman:

“case”, not “cast”.


J.


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

Post generated using Mail2Forum (mail2forum.com)

The buildMetaData() Factory method can’t really help it, but I’m happy to get rid of the enum (I thought you added that?) and the isXXXXXdata() methods (they are mine).

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 did add the enum, but I didn’t like it even at the time. Maybe we should
break the factory out into its own class?


J.


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

Post generated using Mail2Forum (mail2forum.com)

Hi Joel,

Have a look at swampwallaby-work@4526 ,it breaks out the factory, and removes the ENUM and the isXXXXdata() methods and replaces them with if (xxx instanceof xxxxMetaData). AbstractMetaData should be pure now.

Also, might be time to move all of the metadata classes to their own package?

Cheers,
Brent.


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

Post generated using Mail2Forum (mail2forum.com)

Thus spake “Brent Easton”:

I’ll have a look at this in the morning.

I spent all night trying to figure out why yet more PNGs weren’t loading
properly after my transparency fix. My original fix was to have ImageIO
read the PNG metadata to see if the image was of the offending type, and
then hand it off to Toolkit if so. What I didn’t account for was that the
standard ImageIO reader doesn’t read the ancillary PNG chunks at all, and
if you force it to then PNGs with malformed ancillary chunks won’t load
anymore. As it happens, the PNGs in the Successors III module are screwed
up in this way, and so my previous fix makes many of them fail to load.

So, what I did was write a simple PNG decoder which goes hunting for the
IHDR and tRNS chunks to see if the PNG in question is the type we want
to use Toolkit to load. This way, we don’t force ImageIO to load the PNG
metadata, so it will happily load PNGs with malformed metadata again.

This is in svn4529.

Yes.


J.


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

Post generated using Mail2Forum (mail2forum.com)

Hmm,

I did all the png’s in Successor III mod using Fireworks in the Adobe CS3
suite - maybe it is something Adobe does with their png files. Are you
saying that Adobe, one of the industry standard bearers for graphic programs
are taking a page from microshaft (ala the w3c trick) in not conforming to
standards where it comes to their graphic file formats? :slight_smile:

Post generated using Mail2Forum (mail2forum.com)

The one on this page

gmtgames.com/t-GMTVASSAL.aspx

The mod on the Successors page here:
gmtgames.com/p-117-successors.aspx

is out of date - they a bit slow at getting all their links correct

Post generated using Mail2Forum (mail2forum.com)

You will need to merge 4509 first to make sense of 4526.

Also, swampwallaby-work@4529 has a fix for

Bug [2340311] Edit All pieces, no change, should not update pieces

and also fixes missing Cancel button and Close Window handling in components using ConfigurerWindow (Edit all contained, Dice Buttons, Random Text button).


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

Post generated using Mail2Forum (mail2forum.com)

Thus spake Jeffrey Brent McBeth:

ImageIO’s decoder is throwing an IIOException while reading a tEXt chunk,
yes. It might be an ImageIO bug. If it is, I’d like to know so that I can
file another ImageIO bug report.


J.


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

Post generated using Mail2Forum (mail2forum.com)

Thus spake “Tim McCaron”:

Here’s a test program, so you can see what I’m seeing:

import java.io.;
import javax.imageio.
;
import javax.imageio.stream.;
import javax.imageio.metadata.
;

public class Test {
public static void main(String[] args) throws Exception {
final FileImageInputStream in = new FileImageInputStream(new File(args[0]));

final ImageReader reader = ImageIO.getImageReaders(in).next();
reader.setInput(in);

final IIOMetadata md = reader.getImageMetadata(0);
}
}

If you run this on any of the City images, e.g., City-Miletus.png, you’ll
get an exception from PNGImageReader.parse_iTXt_chunk():

Exception in thread “main” javax.imageio.IIOException: Error reading PNG metadata
at com.sun.imageio.plugins.png.PNGImageReader.readMetadata(PNGImageReader.java:761)
at com.sun.imageio.plugins.png.PNGImageReader.getImageMetadata(PNGImageReader.java:1542)
at Test.main(Test.java:17)
Caused by: java.io.UTFDataFormatException: malformed input around byte 12737
at java.io.DataInputStream.readUTF(DataInputStream.java:634)
at javax.imageio.stream.ImageInputStreamImpl.readUTF(ImageInputStreamImpl.java:332)
at com.sun.imageio.plugins.png.PNGImageReader.parse_iTXt_chunk(PNGImageReader.java:469)
at com.sun.imageio.plugins.png.PNGImageReader.readMetadata(PNGImageReader.java:709)
… 2 more

The problem is that ImageInputStreamImpl is using DataInputStream.readUTF(),
which expects there to be two bytes at the head of the input stream
indicating the length of the UTF to decode. However, according to the PNG
standard, the UTF-8 text block in the iTXt chunk just starts without any
length information. Therefore, ImageIO will never correctly read an iTXt
chunk.

This tells me that this code was NEVER tested by anyone at Sun, because
it cannot possibly work correctly. GRRRRR!!! ARGH!!!

See the related bug:

bugs.sun.com/bugdatabase/view_bu … id=6541476

Fortunately, there’s been a patch submitted to OpenJDK already:

mail-archive.com/2d-dev@open … 00514.html

However, because of the way that JREs are released for MacOS, we’ll be
waiting for this bug to be fixed there pretty much forever, which means
that we’re stuck with the workaround code indefinitely.

I hate Java. I wish we were doing this in C++.


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 trunk@4531.


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 picked this and Michael’s last ADC2 change up in trunk@4549, though it
was rather a rough merge so you and Michael should check that everything is
ok.

Please do.


J.


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

Post generated using Mail2Forum (mail2forum.com)