Create account / Log in

Text labels bug?

Issues with the Vassal engine.

Moderators: uckelman, Tim M

Text labels bug?

Postby barbanera » January 27th, 2012, 5:28 pm

Hello, I have an empty (no image) basic piece called DUMMY which just writes $TEXT$ at offset 0,0 with default aligning options. In particular: horizontal alignment = center. TEXT is a global property, default "" (empty).

Then I have a bunch of cards with a right-click command CTRL-A which sets TEXT=$BasicName$.

CTRL-A on the first card results in the string "Julia Roberts", correctly displayed at the center of the location where the DUMMY piece was positioned.

CTRL-A on the second card writes out "Hale Berry" in place of "Julia Roberts". However, it's no longer horizontally centered. It's left aligned on the starting pixel of the "J" in "Julia Roberts" written out before.

It's like persistent memory of where to start writing the content of TEXT is stored somewhere in memory after first call.

Is this a bug?
barbanera
 
Posts: 395
Joined: January 12th, 2012, 2:27 pm

Re: Text labels bug?

Postby Tim M » January 27th, 2012, 6:20 pm

are you stacking your cards maybe...
Tim,
Vassal Uber Geek/Guru

Problems? post your OS, Physical Mem, version of Vassal and Java plus the Module in question.
No developer can help with out that info, thx!
User avatar
Tim M
 
Posts: 1816
Joined: December 8th, 2007, 12:22 pm
Location: Earth

Re: Text labels bug?

Postby irishwulf » January 27th, 2012, 6:50 pm

I have seen this too on a single piece in a score window with no stacked pieces. After changing the DP with which the label is associated, the center alignment is not updated. I don't know if it is updated if you change the label directly (and not through a DP).

-Seth
irishwulf
 
Posts: 243
Joined: December 17th, 2011, 4:29 am

Re: Text labels bug?

Postby barbanera » January 27th, 2012, 10:19 pm

Tim M wrote:are you stacking your cards maybe...


Yes the cards are stacked. The TEXT is printed somewhere else in the same map. TEXT is a global property in that same map, which is update by a set global property trait (CTRL-A) defined on the cards.
barbanera
 
Posts: 395
Joined: January 12th, 2012, 2:27 pm

Re: Text labels bug?

Postby barbanera » January 29th, 2012, 3:45 pm

I have tried Vassal 3.2.0 build 8015 and I can confirm that the centering "bug" is still there.

However, text labels are now making use (probably in the right way, didn't do a through test) of the offset definitions.

For example, an empty (invisible image) piece with several text labels trait, all at default offsets (0,0) would show:

1) in Vassal 3.1.18 as one line above the other (first text label trait being bottom line and at offset 0,0, apparently),
but I think there is also some unpredictable behaviour when a line is set/reset to blank; moreover, defining different offsets for the various text labels seems completely buggy (-20,0 showing way high over -10,0 whereas 0,0 is right under -10,0 etc).

2) in Vassal 3.2.0 build 8015 as all garbled in the same line, which makes sense if offset is 0,0 for all, I guess.

Bottom line: build 8015 seems to really care about the offsets, whereas 3.1.18 was messying up.
However, the centering bug (?) is still there.
barbanera
 
Posts: 395
Joined: January 12th, 2012, 2:27 pm

Re: Text labels bug?

Postby Brent Easton » July 27th, 2012, 11:52 am

The fix for 4302 was only for 3.2.
User avatar
Brent Easton
 
Posts: 3176
Joined: December 21st, 2007, 3:06 am
Location: Berry, NSW, Australia

Re: Text labels bug?

Postby barbanera » July 27th, 2012, 11:57 am

The fix for 4302 was only for 3.2.


Wrong thread?
barbanera
 
Posts: 395
Joined: January 12th, 2012, 2:27 pm

Re: Text labels bug?

Postby Brent Easton » July 27th, 2012, 12:12 pm

Oops, yes, that was for the other problem.

This particular issue was caused unintentionally by the change over to NamedKeyStrokes. Fixed committed to Brent-3.2@8227
User avatar
Brent Easton
 
Posts: 3176
Joined: December 21st, 2007, 3:06 am
Location: Berry, NSW, Australia

Re: Text labels bug?

Postby barbanera » July 27th, 2012, 12:14 pm

Do you mean the centering issue or the offset one?
barbanera
 
Posts: 395
Joined: January 12th, 2012, 2:27 pm

Re: Text labels bug?

Postby Brent Easton » July 27th, 2012, 9:05 pm

On 27/07/2012 10:14 PM, barbanera wrote:
> Do you mean the centering issue or the offset one?
>
Offset

--
____________________________________________________________
Brent Easton
Analyst/Programmer
University of Western Sydney
Email: b.easton@exemail.com.au
User avatar
Brent Easton
 
Posts: 3176
Joined: December 21st, 2007, 3:06 am
Location: Berry, NSW, Australia

Re: Text labels bug?

Postby uckelman » July 27th, 2012, 9:28 pm

Thus spake Brent Easton:
> Oops, yes, that was for the other problem.
>
> This particular issue was caused unintentionally by the change over to
> NamedKeyStrokes. Fixed committed to Brent-3.2@8227
>

Merged to trunk@8228, uploaded 3.2.0-svn8228.

--
J.
User avatar
uckelman
Site Admin
 
Posts: 8849
Joined: December 10th, 2007, 9:48 am
Location: Durham, England

Re: Text labels bug?

Postby barbanera » July 27th, 2012, 11:39 pm

Ok, just to make it more clear to anybody reading this thread in the future: this fix (starting with 3.2.0 build 8228) DOES NOT address the text centering bug mentioned here. However, it DOES solve another issue with text labels which arised with 3.2.0 beta 1 and discussed in this other thread: http://www.vassalengine.org/forum/viewtopic.php?f=5&t=5405

Thanks Brent!
barbanera
 
Posts: 395
Joined: January 12th, 2012, 2:27 pm

Re: Text labels bug?

Postby chrono280 » August 7th, 2012, 12:43 am

This is following up on Barbanera's suggestion of moving the bug discussion from (viewtopic.php?f=5&t=5405) to here.

From what barbanera said in that post:
I created a test module to demonstrate it (includes hot women pics!):

text_label_centering_bug.vmod
(66.46 KiB) Downloaded 2 times


(instructions in the module when you run it).

While I was at it I added the demonstration of some lurking issue with the "line feed" bug/thing (to which this thread was originally dedicated): having a text label only printing something like $FOO$ gives a new line with the content of $FOO$ - even when empty - but only if not followed in the trait order by another text label with some actual static text. Otherwise, it will overlap the following text label in the trait order (which is actually printed first). Is this as expected..? Note that if the following text label does not have static text, but rather just something like $BAR$, both $FOO$ and $BAR$ will appear on their own lines (no overlap).


I think I am seeing a similar thing in what I described. The first line of text in my module is aligned properly. The second is misaligned. Both lines contain a $FOO$ type reference, referencing a property on a property sheet.

This bug did NOT happen in 3.2.0 svn 8221 but is happening in svn8258. I have not been able to test in in the versions in between.

I want to attach my module but it is for a game that is currently being printed and I don't want an unfinished copy of the vassal module floating around the internet before the game is printed. I'm pretty sure that actually violates something I signed with GMT Games heh. I did PM it to Uckelman but I'm not sure if he got it / has the time. Brent, if you know what is up with this bug, I'll PM the module to you.

Image
chrono280
 
Posts: 62
Joined: September 9th, 2011, 12:45 am

Re: Text labels bug?

Postby Brent Easton » August 7th, 2012, 1:32 pm

Hmm.

The fix that went in to the Labeler was to return the behaviour of multiple labels that have no Key Commands to be the same as it was under 3.1, to ensure existing modules keep working.

Unfortunately, it looks like you have inadvertently taken advantage of the bug and now that the bug is fixed, your module appears broken, you will need to change the parameters you have used to align the Def Tech label.

I set up a similiar thing in a test module. Try a Horizontal Position of Left with an Offset of the width of the counter. And a Horizontal text justification of Left.
User avatar
Brent Easton
 
Posts: 3176
Joined: December 21st, 2007, 3:06 am
Location: Berry, NSW, Australia

Re: Text labels bug?

Postby chrono280 » August 8th, 2012, 1:29 am

Done and fixed, great job Brent you were 100% correct. I was taking advantage of a bug! Hope that never happens again. All seems to be working now. Thanks again.
chrono280
 
Posts: 62
Joined: September 9th, 2011, 12:45 am

Next

Return to Technical Support & Bugs

Who is online

Users browsing this forum: DasherM and 2 guests