bugs in latest patched version

Notes on testing the latest builds of MapTool

Moderators: dorpond, trevor, Azhrei

User avatar
JamzTheMan
Great Wyrm
Posts: 1872
Joined: Mon May 10, 2010 12:59 pm
Location: Chicagoland
Contact:

Re: bugs in latest patched version

Post by JamzTheMan »

Azhrei wrote:Jamz, please take a look at rev 5958, in particular the VBL_Functions.java at line 628 and see if the new code for getJSONdouble() fixes the problem. Thanks.
Az, doesn't look like it worked. Any other ideas?

Wolf, is this the only function that breaks on that pc? Have you tried other functions that take/return decimals?
-Jamz
____________________
Custom MapTool 1.4.x.x Fork: maptool.nerps.net
Custom TokenTool 2.0 Fork: tokentool.nerps.net
More information here: MapTool Nerps! Fork

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 »

JamzTheMan wrote:Wolf, is this the only function that breaks on that pc? Have you tried other functions that take/return decimals?
any suggestions...? not sure which do that. (e.g. I didn't know that getVBL returned floating points)

edit:
[ln(5)] works. But it return a '.' notation to the chat! not a ',' as with the getVBL

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 »

and some bad news. This line:

Code: Select all

[jsonOrder		= json.sort('[{"id":"A","order":1},{"id":"B","order":5},{"id":"C","order":2}]',"a","order")]
works in B89 and does NOT work in pre-B90.

you can simply copy paste it in the chat for testing.

error:
net.rptools.parser.ParserException: Unknown JSON type "order" in function "json.sort"
Note that for simplicity I've given a one line with 'json as string' but in the code it the array is build the 'correct' way, resulting in the same error.

edIt: and there's more:
- sliding double doors move in another (diagonal) direction all of a sudden in the BoT. (move correctly in b89)

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 »

ok found the sliding doors issue (took an age...) in b90

given:
large token
x = 650
snapped or unsnapped

getTokenX(1): returns: 651 !!! in b90

(and 650 in b89)

same issue with getTokenY(1)

edit: completed a thorough test using the BoT, and did not find anything else.

btw: I keep updating the OP so there is an overview.

User avatar
JamzTheMan
Great Wyrm
Posts: 1872
Joined: Mon May 10, 2010 12:59 pm
Location: Chicagoland
Contact:

Re: bugs in latest patched version

Post by JamzTheMan »

I can confirm and duplicate jsonSort is currently broken. There was a change between revision 5942->5945, looks like Az did some cleanup. I'll let him take a look and revert/fix as needed.

For getTokenX/Y, I can't duplicate. It returns correct pixel & cell locations for me regardless of size or grid snap. Does getTokenX(0) return the correct cell? Post a sample campaign in case there's something I'm missing and I'll check.
-Jamz
____________________
Custom MapTool 1.4.x.x Fork: maptool.nerps.net
Custom TokenTool 2.0 Fork: tokentool.nerps.net
More information here: MapTool Nerps! Fork

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 »

JamzTheMan wrote:I can confirm and duplicate jsonSort is currently broken. There was a change between revision 5942->5945, looks like Az did some cleanup. I'll let him take a look and revert/fix as needed.

For getTokenX/Y, I can't duplicate. It returns correct pixel & cell locations for me regardless of size or grid snap. Does getTokenX(0) return the correct cell? Post a sample campaign in case there's something I'm missing and I'll check.
found the issue!!

not sure what to make of it though...
double click on the token-->config tab-->layout-->move the image to one of the corners and try again: different coords...

This is the difference between b89 and b90. In 89 it shows its 'original coords' in b90 it shows the 'adjusted coords'. In my bot I have some sliding doors that I 'adjusted' somewhat which was why this occurred.

What is strange is that if you do moveToken(getTokenX(), getTokenY()) it should not move, but it does. So one way or the other its a bug.

Code: Select all

[moveToken(getTokenX(),getTokenY())] 
edit: I *think* that the b90 version is more correct, but I should check to make certain. This however means that moveToken() is bugged as its incompatible with getTokenX/Y()
edit2: it appears that everything is off with that, e.g. apply vbl to token places the vbl somewhere else entirely. However after having a better look getTokenX/Y *do* give the 'correct' coordinates of where the token actually is. I think this is the point where I realise why we needed a getTokenX(2) when we fixed that and couldn't find a reason for it... this is it, any other function cannot work with the returned coordinates...
edit3: tried 'apply vbl' again and this time it *did* work correctly... I'm lost.
Well, I guess then that moveToken() needs to be fixed.

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 »

just hover over the tokens and check the quick sheet. notice that the x/y coords of the door are incorrect and of the tile are correct.

moveToken is broken for both. macro is in the campaign panel
Attachments
test gettokenxy.cmpgn
(468.74 KiB) Downloaded 93 times

User avatar
JamzTheMan
Great Wyrm
Posts: 1872
Joined: Mon May 10, 2010 12:59 pm
Location: Chicagoland
Contact:

Re: bugs in latest patched version

Post by JamzTheMan »

wolph42 wrote:just hover over the tokens and check the quick sheet. notice that the x/y coords of the door are incorrect and of the tile are correct.

moveToken is broken for both. macro is in the campaign panel

OK, I see what you're getting at now. I'm going to move this to the related patch thread. We need to discuss how we want this to work.

http://forums.rptools.net/viewtopic.php?f=60&t=23545
-Jamz
____________________
Custom MapTool 1.4.x.x Fork: maptool.nerps.net
Custom TokenTool 2.0 Fork: tokentool.nerps.net
More information here: MapTool Nerps! Fork

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 »

tested json.order issue: FIXED. Will do the string/integer issue tomorrow.

edit:
by the way: I tested the upnp issue and it failed: the usual "no upnp devices found", while trying to start a server. Now I know this is fixed as I tested that fix myself. So apparently that fix is NOT applied in this pre-b90. Is that correct ??

User avatar
JamzTheMan
Great Wyrm
Posts: 1872
Joined: Mon May 10, 2010 12:59 pm
Location: Chicagoland
Contact:

Re: bugs in latest patched version

Post by JamzTheMan »

wolph42 wrote:tested json.order issue: FIXED. Will do the string/integer issue tomorrow.

edit:
by the way: I tested the upnp issue and it failed: the usual "no upnp devices found", while trying to start a server. Now I know this is fixed as I tested that fix myself. So apparently that fix is NOT applied in this pre-b90. Is that correct ??
Ya, json.order "works", as I restored my version back to b89. Just clarification so Az knows to still fix it in SVN.

For upnp, umm, ya, I need to get the new dependent JAR's. I only rebuilt the class files. Next build.
-Jamz
____________________
Custom MapTool 1.4.x.x Fork: maptool.nerps.net
Custom TokenTool 2.0 Fork: tokentool.nerps.net
More information here: MapTool Nerps! Fork

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 »

just test the getVBL() (version 'm'): still no go.

log result, last few lines.
Spoiler
2013-06-14 13:35:53,053 [client.MapToolLineParser:1302] DEBUG - '<!-- ----------------------------------------- saveTileVBL ------------------------------------------------- -->'
2013-06-14 13:35:53,053 [client.MapToolLineParser:1302] DEBUG - debug = 0
2013-06-14 13:35:53,053 [client.MapToolLineParser:1302] DEBUG - toks = getSelectedNames()
2013-06-14 13:35:53,053 [client.MapToolLineParser:1302] DEBUG - assert(listCount(toks), "Select one or more tokens first...", 0)
2013-06-14 13:35:53,053 [client.MapToolLineParser:1302] DEBUG - broadcast("<br><br><b>Starting saveTileVBL with debug = " + debug + "</b>")
2013-06-14 13:35:53,053 [client.MapToolLineParser:1302] DEBUG - prefixList = getMatchingLibProperties("nerps.tile.vbl.set.prefix.*", "Lib:VBL_DungeonTiles")
2013-06-14 13:35:53,053 [client.MapToolLineParser:1302] DEBUG - vblTypeList = "[]"
2013-06-14 13:35:53,053 [client.MapToolLineParser:1302] DEBUG - prefixList
2013-06-14 13:35:53,068 [client.MapToolLineParser:1302] DEBUG - vblTypeList = json.append(vblTypeList, getLibProperty(prefix, "Lib:VBL_DungeonTiles"))
2013-06-14 13:35:53,068 [client.MapToolLineParser:1302] DEBUG - vblTypeList = json.append(vblTypeList, getLibProperty(prefix, "Lib:VBL_DungeonTiles"))
2013-06-14 13:35:53,068 [client.MapToolLineParser:1302] DEBUG - vblTypeList = json.append(vblTypeList, getLibProperty(prefix, "Lib:VBL_DungeonTiles"))
2013-06-14 13:35:53,068 [client.MapToolLineParser:1302] DEBUG - vblTypeList = json.append(vblTypeList, getLibProperty(prefix, "Lib:VBL_DungeonTiles"))
2013-06-14 13:35:53,068 [client.MapToolLineParser:1302] DEBUG - vblTypeList = json.toList(json.unique(vblTypeList))
2013-06-14 13:35:53,068 [client.MapToolLineParser:1302] DEBUG - currentVBL = getLibProperty("nerps.tile.vbl.set.prefix.current", "Lib:VBL_DungeonTiles")
2013-06-14 13:35:53,068 [client.MapToolLineParser:1302] DEBUG - abort(input(
"vblType|"+vblTypeList+"|Choose VBL type|RADIO|VALUE=STRING SELECT="+listFind(vblTypeList,currentVBL)
))
2013-06-14 13:35:55,886 [client.MapToolLineParser:1302] DEBUG - setLibProperty("Nerps.Tile.VBL.Set.Prefix.Current", vblType, "Lib:VBL_DungeonTiles")
2013-06-14 13:35:55,995 [client.MapToolLineParser:1302] DEBUG - vblType = getLibProperty("Nerps.Tile.VBL.Set.Prefix.Current", "Lib:VBL_DungeonTiles")
2013-06-14 13:35:55,995 [client.MapToolLineParser:1302] DEBUG - libProp1 = "Nerps.DB.VBL."+vblType+".Data.Short"
2013-06-14 13:35:55,995 [client.MapToolLineParser:1302] DEBUG - libProp2 = "Nerps.DB.VBL."+vblType+".Data.Long"
2013-06-14 13:35:55,995 [client.MapToolLineParser:1302] DEBUG - bot_startTime()
2013-06-14 13:35:55,995 [client.MapToolLineParser:1302] DEBUG - '<!-- ----------------------- bot_startTime ---------------------------------- -->'
2013-06-14 13:35:55,995 [client.MapToolLineParser:1302] DEBUG - time = json.get(getInfo("client"), "timeInMs")
2013-06-14 13:35:55,995 [client.MapToolLineParser:1302] DEBUG - setLibProperty("w42.bot.startTime", time, "Lib:VBL_DungeonTiles")
2013-06-14 13:35:56,087 [client.MapToolLineParser:1302] DEBUG - setLibProperty("w42.bot.subTime", time, "Lib:VBL_DungeonTiles")
2013-06-14 13:35:56,180 [client.MapToolLineParser:1302] DEBUG - Nerps_DB_VBL_Data_Short = getLibProperty(libProp1, "Lib:VBL_DungeonTiles")
2013-06-14 13:35:56,180 [client.MapToolLineParser:1302] DEBUG - if(json.type(Nerps_DB_VBL_Data_Short)!="OBJECT", 1, 0)
2013-06-14 13:35:56,258 [client.MapToolLineParser:1302] DEBUG - ''
2013-06-14 13:35:56,258 [client.MapToolLineParser:1302] DEBUG - Nerps_DB_VBL_Data_Long = getLibProperty(libProp2, "Lib:VBL_DungeonTiles")
2013-06-14 13:35:56,273 [client.MapToolLineParser:1302] DEBUG - if(json.type(Nerps_DB_VBL_Data_Long)!="OBJECT", 1, 0)
2013-06-14 13:35:57,744 [client.MapToolLineParser:1302] DEBUG - ''
2013-06-14 13:35:57,744 [client.MapToolLineParser:1302] DEBUG - toks
2013-06-14 13:35:57,760 [client.MapToolLineParser:1302] DEBUG - switchToken(tok)
2013-06-14 13:35:57,760 [client.MapToolLineParser:1302] DEBUG - token.name = replace(token.name, "\\s+\\B", "")
2013-06-14 13:35:57,760 [client.MapToolLineParser:1302] DEBUG - tileName = token.name
2013-06-14 13:35:57,760 [client.MapToolLineParser:1302] DEBUG - token.name = replace(token.name, "\\s+\\B", "")
2013-06-14 13:35:57,760 [client.MapToolLineParser:1302] DEBUG - name = token.name
2013-06-14 13:35:57,760 [client.MapToolLineParser:1302] DEBUG - if(indexOf(name," ") != -1, 1, 0)
2013-06-14 13:35:57,760 [client.MapToolLineParser:1302] DEBUG - x = getTokenX() - 1
2013-06-14 13:35:57,760 [client.MapToolLineParser:1302] DEBUG - y = getTokenY() - 1
2013-06-14 13:35:57,760 [client.MapToolLineParser:1302] DEBUG - w = getTokenWidth() + 2
2013-06-14 13:35:57,760 [client.MapToolLineParser:1302] DEBUG - h = getTokenHeight() + 2
2013-06-14 13:35:57,775 [client.MapToolLineParser:1302] DEBUG - if(y < 0, 1, 0)
2013-06-14 13:35:57,775 [client.MapToolLineParser:1302] DEBUG - if(x < 0, 1, 0)
2013-06-14 13:35:57,775 [client.MapToolLineParser:1302] DEBUG - rectangleJSON = json.set("{ }", "shape", "rectangle", "x", x, "y", y, "w", w, "h", h, "fill", 1)
2013-06-14 13:35:57,775 [client.MapToolLineParser:1302] DEBUG - vblData = getVBL(rectangleJSON, 1)
2013-06-14 13:35:57,791 [client.MapToolLineParser:1320] DEBUG - java.lang.NumberFormatException: For input string: "1448,5"
2013-06-14 13:35:57,791 [client.MapToolLineParser:1302] DEBUG - points='[ ]'
2013-06-14 13:35:57,806 [client.MapToolLineParser:1302] DEBUG - len = json.length(vblData)
2013-06-14 13:36:09,852 [client.MapToolLineParser:1317] DEBUG - net.rptools.parser.ParserException: Unresolved value "vblData".
2013-06-14 13:36:09,852 [client.MapToolLineParser:1302] DEBUG - len
2013-06-14 13:36:11,354 [client.MapToolLineParser:1317] DEBUG - net.rptools.parser.ParserException: Unresolved value "len".
2013-06-14 13:36:11,354 [client.MapToolLineParser:1265] INFO - [switchToken(tok)]
for reference:
- getTokenX,Y: (1450, 100)
- width, height: (300,300)

User avatar
JamzTheMan
Great Wyrm
Posts: 1872
Joined: Mon May 10, 2010 12:59 pm
Location: Chicagoland
Contact:

Re: bugs in latest patched version

Post by JamzTheMan »

Version M is just some internal cleanup and changed a field so this version is now once again backward compatible with b89! Woot! (Thanks Az for the transient tip!)

So once b90 is out, our DB2 campaign will be compatible, all the functions will be in place. Now to figure out this localization bug...
-Jamz
____________________
Custom MapTool 1.4.x.x Fork: maptool.nerps.net
Custom TokenTool 2.0 Fork: tokentool.nerps.net
More information here: MapTool Nerps! Fork



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 »

found another issue.

When changing the grid (ctrl+shift+A) I get an error on close, whether I changed something or not:
ERROR
java.lang.ClassCastException: java.util.LinkedList cannot be cast to net.rptools.maptool.model.Token
at net.rptools.maptool.client.ui.htmlframe.HTMLFrameFactory$Listener.modelChanged(HTMLFrameFactory.java:154)
at net.rptools.maptool.model.BaseModel.fireModelChangeEvent(BaseModel.java:34)
at net.rptools.maptool.model.Zone.putTokens(Zone.java:1029)
at net.rptools.maptool.client.tool.GridToolactionPerformed(GridTool.java:123)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access(Unknown Source)
at java.awt.EventQueuerun(Unknown Source)
at java.awt.EventQueuerun(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomaindoIntersectionPrivilege(Unknown Source)
at java.security.ProtectionDomaindoIntersectionPrivilege(Unknown Source)
at java.awt.EventQueuerun(Unknown Source)
at java.awt.EventQueuerun(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomaindoIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at net.rptools.maptool.client.swing.MapToolEventQueue.dispatchEvent(MapToolEventQueue.java:36)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
this does happens as soon as there is one token on the map. So not on an empty map, just drag a token onto it, hit ctrl+shift+A and then ok.

Post Reply

Return to “Testing”