bugs in latest patched version

Notes on testing the latest builds of MapTool

Moderators: dorpond, trevor, Azhrei

User avatar
RPTroll
TheBard
Posts: 3159
Joined: Tue Mar 21, 2006 7:26 pm
Location: Austin, Tx
Contact:

Re: bugs in latest patched version

Post by RPTroll »

Awesome work guys. Thanks.
ImageImage ImageImageImageImage
Support RPTools by shopping
Image
Image

User avatar
aliasmask
RPTools Team
Posts: 9024
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: bugs in latest patched version

Post by aliasmask »

Found a new bug with Wiki: json.sort().

json.sort no longer sorts an array of objects.

Code: Select all

[H: a = json.set("{}","name","A","value",1)]
[H: b = json.set("{}","name","B","value",2)]
[H: c = json.append("",a,b)]
[R: json.sort(c,"a","value")]
You'll see that the above code works fine in b89 but errors in b90-beta.

I use this fairly often in my own code, but discovered this helping someone track a bug in Lindsay's framework using the Inventory macro. I first thought it was not sorting because my test only had one item in array, but it seems to be worse than that.

User avatar
wolph42
Winter Wolph
Posts: 9999
Joined: Fri Mar 20, 2009 5:40 am
Location: Netherlands
Contact:

Re: bugs in latest patched version

Post by wolph42 »

OP updated with bug report

this is actually the first real bug that can potentially act as a real deal breaker for more advanced frameworks. funny that nothing of mine is broken, apparently I don't use this functionality.

Lee
Dragon
Posts: 958
Joined: Wed Oct 19, 2011 2:07 am

Re: bugs in latest patched version

Post by Lee »

aliasmask wrote:json.sort no longer sorts an array of objects.
Patch submitted.

BTW, wolph, there's also a patch for item #5. The link to it is on the error thread itself.


Lee
Dragon
Posts: 958
Joined: Wed Oct 19, 2011 2:07 am

Re: bugs in latest patched version

Post by Lee »

I've looked into #10. Is this happening in b89- as well? I don't have code older than b90 checked out, but the issue is caused because these macro buttons technically do not "exist" since they haven't been drawn yet on the token panels (Impersonated, Selected). I'm not sure what was and when this was changed, if there was any. I didn't pursue it any further as this issue doesn't occur in Mote (due to a difference in code), and there are quite a few classes that need to be changed in MapTool in order to match my work on Mote.

As for #11, I'm not sure about these wolph. These aren't actually doing json.unique. Actually these 3 functions accomplish things differently, and through the correct means prescribed for set theory in Java: json.difference = removeAll, json.intersection = retainAll, and json.unique just puts everything in a hash set, which basically prevents duplicates

An explanation for sets in Java is found here, note the first line explains why you won't receive any output with duplicates.



Lee
Dragon
Posts: 958
Joined: Wed Oct 19, 2011 2:07 am

Re: bugs in latest patched version

Post by Lee »

wolph42 wrote: Question:

Did you prevent OCL from running at all or does it now only run for the owner and not for the rest ?
Prevented from running at all, wolph. I wrote it as you described it.

User avatar
wolph42
Winter Wolph
Posts: 9999
Joined: Fri Mar 20, 2009 5:40 am
Location: Netherlands
Contact:

Re: bugs in latest patched version

Post by wolph42 »

Lee wrote:
wolph42 wrote: Question:

Did you prevent OCL from running at all or does it now only run for the owner and not for the rest ?
Prevented from running at all, wolph. I wrote it as you described it.
its probly for the best, although i'm wondering whether it should not run for the owner only (if the right conditions are met, like visibility).

Lee
Dragon
Posts: 958
Joined: Wed Oct 19, 2011 2:07 am

Re: bugs in latest patched version

Post by Lee »

wolph42 wrote: its probly for the best, although i'm wondering whether it should not run for the owner only (if the right conditions are met, like visibility).
I'm not sure, though I would think it hinges on what kind of macro(s) are being run, and if the writer will be aware of the selectivity. Things might go awry if he/she puts a macro meant for all on a selective library token, and I imagine it'd be hard to debug alone.

User avatar
wolph42
Winter Wolph
Posts: 9999
Joined: Fri Mar 20, 2009 5:40 am
Location: Netherlands
Contact:

Re: bugs in latest patched version

Post by wolph42 »

Lee wrote:
wolph42 wrote: its probly for the best, although i'm wondering whether it should not run for the owner only (if the right conditions are met, like visibility).
I'm not sure, though I would think it hinges on what kind of macro(s) are being run, and if the writer will be aware of the selectivity. Things might go awry if he/she puts a macro meant for all on a selective library token, and I imagine it'd be hard to debug alone.
That Can be explained two was, the local lib. could interfere or dependencies won't work. But as it's an OCL I'm inclined to let it work IF it abides the rest of the rules, so visible and on the token layer.


User avatar
CoveredInFish
Demigod
Posts: 3104
Joined: Mon Jun 29, 2009 10:37 am
Location: Germany
Contact:

Re: bugs in latest patched version

Post by CoveredInFish »

Just a quick note: you used (16) twice (fixed json bug and light cone)


Post Reply

Return to “Testing”