Beta 5 bug fixes

Joel,

swampwallaby-work@4410 contains a fix for

Bug [2248313] NoSuchElementException in ColorConfigurer.stringToColor()

We had almost fixed this last time, but where too specific with our Exception checks. Any exception at all when building the ColorConfigurer should generate a Bad Color error report.

Thus spake “Brent Easton”:

Are you sure? There must be some Exception which could come from that try
block which would be a bug, not a data error.


J.


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

Post generated using Mail2Forum (mail2forum.com)

Parsing 3 integers via the StringTokenizer? I doubt it.

You could change it this I guess?

try {
return new Color(Integer.parseInt(st.nextToken()),
Integer.parseInt(st.nextToken()),
Integer.parseInt(st.nextToken()));
}
catch (NumberFormatException e) {
ErrorDialog.dataError(new BadDataReport(“not an integer”, s, e));
}
catch (IllegalArgumentException e) {
ErrorDialog.dataError(new BadDataReport(“bad color”, s, e));
}
catch (NoSuchElementException e) {
ErrorDialog.dataError(new BadDataReport(“bad color”, s, e));
}


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

Post generated using Mail2Forum (mail2forum.com)

Thus spake “Brent Easton”:

In the event that there is some weird exception we weren’t expecting
which gets thrown here, catching Exception is going to make it harder
for us to find out about it, since in that case we won’t receive any
automatic bug reports.

So I’d like to do the more verbose thing and be safe.


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 committed this to trunk@4429.


J.


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

Post generated using Mail2Forum (mail2forum.com)

swampwallaby-work@4456 has a fix for

Bug [2280253] NPE if no Key Command specified

swampwallaby-work@4458 has a fix for

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

This was bug is caused by an ActionButton issuing it’s own hotkey. I’ve added some simple loop detection. To be 100% accurate, we should be keeping a seperate recurse count for each seperate ActionButton, but I don’t think the added complication is really required. If 50 ActionButtons get called without returning, something is wrong. 50 may even be a bit high?

Also, I think it is time to close all of the ModuleError sourceforge bugs.

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@4462.


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 don’t want to close them, because then they’ll be harder to add to Bugzilla
in a few weeks. (I think we should have a category for module bugs there,
and I don’t want these to get lost.)

What I will do is move them out of the Bugs tracker. We have a Support
Requests tracker which isn’t being used at present, so all of these module
bugs can live there for the time being.


J.


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

Post generated using Mail2Forum (mail2forum.com)

Thus spake “Brent Easton”:

Is there a simpler way to do this? E.g., could we just catch
StackOverflowError here and not bother counting?

What I’d really like to do is check for loops when the ActionButton is
built, but I suspect that the combination of triggers and tests we have
is Turing complete and so testing for loops would be equivalent to solving
the Halting Problem.


J.


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

Post generated using Mail2Forum (mail2forum.com)

Hmm, that might work.

My worry was that once the Stack has overflowed and you’ve caught that, wouldn’t calling ErrorDialog cause it to overflow again?

I’m just trying that now and clicking the button a third time, the dialog stops appearing. Trying to debug it and everything just hangs.

I considered that, but essentially yes, you would need to ‘generate’ and follow the chain of Key Commands and see if it leads back to the ActionButton i.e. running it. Capturing it cleanly at run-time is fine.


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

Post generated using Mail2Forum (mail2forum.com)

Joel,

swampwallaby-work@4470 has a partial fix for:

Bug [2294041] Bad Image generates IOException instead of Bad Data report

If a module references an invalid image that is already in the module, it is failing with a Bug Report for an IOException, when I think it should be a Bad Data Report.

This fix of mine is a quick hack to solve this, feel free to refactor.

However, we have the same problem when you try and load an image into the module - it generates an IOException bug report, but still loads the image into the module. In fact, I think it is the reading of the image after the load that is failing, Vassal is happily (and quietly) loading invalid images into the module.

I haven’t looked further because I wasn’t sure if you where working in this area?

B.


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

Post generated using Mail2Forum (mail2forum.com)

swampwallaby-work@4471 has a fix for

Bug [2290225] Cancel when setting a Dynamic/Global Property sets to null

There was some discussion as to whether this was a bug or a feature, but it is definitely a bug. It also happens when selecting from a list of values, Cancel sets the DP to null, which is not a value on the list.

B.


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

Post generated using Mail2Forum (mail2forum.com)

I’m glad it’s not considered a feature :slight_smile:
Thanks

David,

What is the status of

bug [2261405] Unable to move region in irregular grid?

I downloaded the module indicated in the bug report (eastfront.free.fr/VASSAL/EuF2_irr_grid), but it appears to be corrupted, it is not a Vassal module, or even a Zip file.

Thanks,
brent.


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

Post generated using Mail2Forum (mail2forum.com)

Thus spake “Brent Easton”:

Yes, I’ve been working on a fix for this and a few other related thing.

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@4471.


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 committed all of my remaining image-path error handling work to
trunk@4483.

Image loading problems are now all handled by Op.handleException(), and
before getting there are already sorted as to their cause:

  • ImageNotFoundException, when an image file doesn’t exist
  • UnrecognizedImageTypeException, when we don’t recognize an image’s file
    format (possibly because it isn’t an image at all)
  • ImageIOException, when something else goes wrong (e.g., the image is
    corrupt, your drive is dying)

All three of these exceptions can be queried as to the file which caused
them, so we can produce an informative error message from them.

This fixes Bugs 2294041 and 2286157.


J.


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

Post generated using Mail2Forum (mail2forum.com)

swampwallaby-work@4487 has an improved fix for

Bug [2292450] Corrupted Color Preference causing NoSuchElement Exception

Somewhere along the line, ColorConfigurer lost the ability to handle null colors.


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@4489.


J.


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

Post generated using Mail2Forum (mail2forum.com)