At Start Stack Error with Grids and Location Format name

Again using 3.1.17 a different issue causes an interesting error. Start a new module

In main map:
Create a Zone (named “Zone”) with a rectangular grid (w/ numeric rows & columns). In the grid numbering dialog define the Location format as $column$ from the selection menu.
Now in the Zone dialog specify the Location Format as $gridLocation$ SnameS from the selection menu.

Add an At start stack called “piece” to the map and snap it to any of the locations in the zones grid - the x and y values in the At Start Stack dialog will read some numeric values as appropriate. Check the “Use Grid Location” box on - the x and y boxes disappear and should be replaced with a Location box that read “# (the column number) Zone” - looks good. Now save the module…uhoh! :smiley:

A problem was found in this module.
Bad location name 2 Zone in piece.

Nothing in error log however

Thus spake Tim M:

Again using 3.1.17 a different issue causes an interesting error. Start
a new module

In main map:
Create a Zone (named “Zone”) with a rectangular grid (w/ numeric rows &
columns). In the grid numbering dialog define the Location format as
$column$ from the selection menu.
Now in the Zone dialog specify the Location Format as $gridLocation$
SnameS from the selection menu.

Add an At start stack called “piece” to the map and snap it to any of
the locations in the zones grid - the x and y values in the At Start
Stack dialog will read some numeric values as appropriate. Check the
“Use Grid Location” box on - the x and y boxes disappear and should be
replaced with a Location box that read “# (the column number) Zone” -
looks good. Now save the module…uhoh! :smiley:

A problem was found in this module.
Bad location name 2 Zone in piece.

Nothing in error log however

I was trying to reproduce this bug in 3.1.19, but I can’t quite follow
what you’re saying to do.

I don’t get the “# (the column number) Zone” in the Location box you
mention, but maybe I’ve made a mistake prior to that point.


J.

Thus spake Joel Uckelman:

Thus spake Tim M:

Again using 3.1.17 a different issue causes an interesting error. Start
a new module

In main map:
Create a Zone (named “Zone”) with a rectangular grid (w/ numeric rows &
columns). In the grid numbering dialog define the Location format as
$column$ from the selection menu.
Now in the Zone dialog specify the Location Format as $gridLocation$
SnameS from the selection menu.

Add an At start stack called “piece” to the map and snap it to any of
the locations in the zones grid - the x and y values in the At Start
Stack dialog will read some numeric values as appropriate. Check the
“Use Grid Location” box on - the x and y boxes disappear and should be
replaced with a Location box that read “# (the column number) Zone” -
looks good. Now save the module…uhoh! :smiley:

A problem was found in this module.
Bad location name 2 Zone in piece.

Nothing in error log however

I was trying to reproduce this bug in 3.1.19, but I can’t quite follow
what you’re saying to do.

I don’t get the “# (the column number) Zone” in the Location box you
mention, but maybe I’ve made a mistake prior to that point.

Tim? Does this still happen for you with 3.1.19?


J.

Yes, this is still occuring

-----Original Message-----
From: messages-bounces@vassalengine.org
[mailto:messages-bounces@vassalengine.org] On Behalf Of Joel Uckelman
Sent: Monday, July 30, 2012 5:05 PM
To: The mailing list for VASSAL
Subject: Re: [messages] [Technical Support & Bugs] At Start Stack Error with
Grids and Location Format name

Thus spake Joel Uckelman:

Thus spake Tim M:

Again using 3.1.17 a different issue causes an interesting error.
Start a new module

In main map:
Create a Zone (named “Zone”) with a rectangular grid (w/ numeric
rows & columns). In the grid numbering dialog define the Location
format as $column$ from the selection menu.
Now in the Zone dialog specify the Location Format as $gridLocation$
SnameS from the selection menu.

Add an At start stack called “piece” to the map and snap it to any
of the locations in the zones grid - the x and y values in the At
Start Stack dialog will read some numeric values as appropriate.
Check the “Use Grid Location” box on - the x and y boxes disappear
and should be replaced with a Location box that read “# (the column
number) Zone” - looks good. Now save the module…uhoh! :smiley:

A problem was found in this module.
Bad location name 2 Zone in piece.

Nothing in error log however

I was trying to reproduce this bug in 3.1.19, but I can’t quite follow
what you’re saying to do.

I don’t get the “# (the column number) Zone” in the Location box you
mention, but maybe I’ve made a mistake prior to that point.

Tim? Does this still happen for you with 3.1.19?


J.

Thus spake “Tim McCarron”:

Yes, this is still occuring

What about with 3.2.2?


J.

Yes still with 3.2.3

Because it can only be seen by actually building it in a module here is a picture demonstrating the creation of the bug

[attachment=0]Location error.jpg[/attachment]

Thus spake Tim M:

Because it can only be seen by actually building it in a module here is
a picture demonstrating the creation of the bug

I can replicate this with the trunk, but I have no idea what to do about
it. Is the problem just that you get the warning, or does this also not
work?


J.

The problem is the warning - I don’t think there shouldn’t be one because this works fine in play mode (reporting the location how it was setup as expected). As such a designer would be led to believe they are doing something wrong when they are not when they get this warning

The problem is in Zone.getLocation(), but I don’t know what to do about it. The regex is “(.*)\Q \E\Q\E”, which obviously can’t match “04 Zone”.

I’ve attached a test module (following Tim’s instructions) which makes it easy to reproduce the problem. Just load the module in the editor and try to save it.