Original Message:
Sent: 11-14-2024 10:06
From: James Peltzer
Subject: params getting corrupted
DataLinq should handle the parameters just fine but it will change the OIDs it receives. Instead of getting "team0.info.name" the parameter will be listed as "team0.info.0.name"
------------------------------
James Peltzer
Ross Video
Original Message:
Sent: 11-14-2024 10:04
From: David Levy
Subject: params getting corrupted
For further info, If I change these individual structs to a struct array, the problem goes away. Will this be a problem for datalinq? I initially went with individual structs because they would always be present when I need to clear the info.
How does datalinq handle dynamic params?
------------------------------
David Levy
Lead Real Time Graphics Developer
ESPN
Charlotte United States
Original Message:
Sent: 11-13-2024 17:23
From: David Levy
Subject: params getting corrupted
Update: the code is irrelevant, even if I change a view param, this breaks
------------------------------
David Levy
Lead Real Time Graphics Developer
ESPN
Charlotte United States
Original Message:
Sent: 11-13-2024 17:21
From: David Levy
Subject: params getting corrupted
Updated Template since first post:
<param access="1" constrainttype="STRUCT" name="Team Template" oid="teamInfo.template" stream="false" type="STRUCT" widget="default"> <value> <subparam access="1" maxlength="0" name="Application Color" stream="false" suboid="applicationColor" type="STRING" value="#E40F0F" widget="color-picker"/> <subparam access="1" maxlength="0" name="Rank" stream="false" suboid="rank" type="STRING" value="" widget="text"/> <subparam access="1" maxlength="0" name="Tricode" stream="false" suboid="tricode" type="STRING" value="" widget="text"/> <subparam access="1" maxlength="0" name="City" stream="false" suboid="city" type="STRING" value="" widget="text"/> <subparam access="1" maxlength="0" name="Name" stream="false" suboid="name" type="STRING" value="" widget="text"/> <subparam access="1" maxlength="0" name="Mascot" stream="false" suboid="mascot" type="STRING" value="" widget="text"/> <subparam access="1" maxlength="0" name="Logo" stream="false" suboid="logo" type="STRING" value="" widget="file-picker"/> <subparam access="1" maxlength="0" name="ALT Logo" stream="false" suboid="altLogo" type="STRING" value="" widget="file-picker"/> <subparam access="1" maxlength="0" name="Swatch" stream="false" suboid="swatch" type="STRING" value="" widget="file-picker"/> <subparam access="1" constrainttype="INT_CHOICE" name="Swatch Selection" precision="0" stream="false" suboid="swatchSelection" type="INT32" value="0" widget="default"> <constraint key="0">Logo - 0</constraint> <constraint key="1">Primary - 1</constraint> <constraint key="2">Secondary - 2</constraint> <constraint key="3">Bottomline - 3</constraint> </subparam> <subparam access="1" maxlength="0" name="Headshot Folder" stream="false" suboid="headshotFolder" type="STRING" value="" widget="file-picker"/> <subparam access="1" constrainttype="INT_CHOICE" name="Session Selector" precision="0" stream="false" suboid="sessionSelector" type="INT32" value="1" widget="default"> <constraint key="1">1</constraint> <constraint key="2">2</constraint> </subparam> <subparam access="1" constrainttype="FLOAT_NULL" name="Vault Score" precision="0" stream="false" suboid="vaultScore" type="FLOAT32" value="0.0" widget="default"/> <subparam access="1" constrainttype="FLOAT_NULL" name="Uneven Bars Score" precision="0" stream="false" suboid="unevenBarsScore" type="FLOAT32" value="0.0" widget="default"/> <subparam access="1" constrainttype="FLOAT_NULL" name="Beam Score" precision="0" stream="false" suboid="beamScore" type="FLOAT32" value="0.0" widget="default"/> <subparam access="1" constrainttype="FLOAT_NULL" name="Floor Score" precision="0" stream="false" suboid="floorScore" type="FLOAT32" value="0.0" widget="default"/> <subparam access="1" constrainttype="FLOAT_NULL" name="Pommel Horse Score" precision="0" stream="false" suboid="pommelHorseScore" type="FLOAT32" value="0.0" widget="default"/> <subparam access="1" constrainttype="FLOAT_NULL" name="Still Rings Score" precision="0" stream="false" suboid="stillRingsScore" type="FLOAT32" value="0.0" widget="default"/> <subparam access="1" constrainttype="FLOAT_NULL" name="Parallel Bars Score" precision="0" stream="false" suboid="parallelBarsScore" type="FLOAT32" value="0.0" widget="default"/> <subparam access="1" constrainttype="FLOAT_NULL" name="Horizontal Bar Score" precision="0" stream="false" suboid="horizBarScore" type="FLOAT32" value="0.0" widget="default"/> <subparam access="1" constrainttype="INT_NULL" name="Rotation 1 Event" precision="0" stream="false" suboid="rotEvt0" type="INT32" value="0" widget="default"/> <subparam access="1" constrainttype="INT_NULL" name="Rotation 2 Event" precision="0" stream="false" suboid="rotEvt1" type="INT32" value="0" widget="default"/> <subparam access="1" constrainttype="INT_NULL" name="Rotation 3 Event" precision="0" stream="false" suboid="rotEvt2" type="INT32" value="0" widget="default"/> <subparam access="1" constrainttype="INT_NULL" name="Rotation 4 Event" precision="0" stream="false" suboid="rotEvt3" type="INT32" value="0" widget="default"/> <subparam access="1" constrainttype="INT_NULL" name="Rotation 5 Event" precision="0" stream="false" suboid="rotEvt4" type="INT32" value="0" widget="default"/> <subparam access="1" constrainttype="INT_NULL" name="Rotation 6 Event" precision="0" stream="false" suboid="rotEvt5" type="INT32" value="0" widget="default"/> <subparam access="1" constrainttype="INT_NULL" name="Rotation 7 Event" precision="0" stream="false" suboid="rotEvt6" type="INT32" value="0" widget="default"/> <subparam access="1" constrainttype="INT_NULL" name="Rotation 8 Event" precision="0" stream="false" suboid="rotEvt7" type="INT32" value="0" widget="default"/> <subparam access="1" constrainttype="INT_NULL" name="Rotation 9 Event" precision="0" stream="false" suboid="rotEvt8" type="INT32" value="0" widget="default"/> <subparam access="1" constrainttype="INT_NULL" name="Rotation 10 Event" precision="0" stream="false" suboid="rotEvt9" type="INT32" value="0" widget="default"/> <subparam access="1" constrainttype="INT_NULL" name="Rotation 11 Event" precision="0" stream="false" suboid="rotEvt10" type="INT32" value="0" widget="default"/> <subparam access="1" constrainttype="INT_NULL" name="Rotation 12 Event" precision="0" stream="false" suboid="rotEvt11" type="INT32" value="0" widget="default"/> <subparam access="1" constrainttype="INT_NULL" name="Rotation 13 Event" precision="0" stream="false" suboid="rotEvt12" type="INT32" value="0" widget="default"/> <subparam access="1" constrainttype="INT_NULL" name="Rotation 14 Event" precision="0" stream="false" suboid="rotEvt13" type="INT32" value="0" widget="default"/> <subparam access="1" constrainttype="INT_NULL" name="Rotation 15 Event" precision="0" stream="false" suboid="rotEvt14" type="INT32" value="0" widget="default"/> <subparam access="1" constrainttype="INT_NULL" name="Rotation 16 Event" precision="0" stream="false" suboid="rotEvt15" type="INT32" value="0" widget="default"/> </value></param>
------------------------------
David Levy
Lead Real Time Graphics Developer
ESPN
Charlotte United States
Original Message:
Sent: 11-13-2024 17:16
From: David Levy
Subject: params getting corrupted
Here's the offending code:
function clearTeamRotations() { for (var i = 0; i < 12; i++) { for (var j = 0; j < 16; j++) { params.setValue('team' + i + '.info.rotEvt' + j, 0, -1); } }}function updateTeamRotations() { clearTeamRotations(); // i is the rotation number in this session for (var i = 0; i < 8; i++) { var vaultTeam = params.getValue('womensSession1.'+ i +'.vaultSelector', 0); var barsTeam = params.getValue('womensSession1.'+ i +'.barsSelector', 0); var beamTeam = params.getValue('womensSession1.'+ i +'.beamSelector', 0); var floorTeam = params.getValue('womensSession1.'+ i +'.floorSelector', 0); // lookup the the team doing each event and set it's ith rotation to that event if (floorTeam != -1) { params.setValue('team'+ floorTeam +'.info.rotEvt' + i, 0, 4); } if (beamTeam != -1) { params.setValue('team'+ beamTeam +'.info.rotEvt' + i, 0, 3); } if (barsTeam != -1) { params.setValue('team'+ barsTeam +'.info.rotEvt' + i, 0, 2); } if (vaultTeam != -1) { params.setValue('team'+ vaultTeam +'.info.rotEvt' + i, 0, 1); } }}
------------------------------
David Levy
Lead Real Time Graphics Developer
ESPN
Charlotte United States
Original Message:
Sent: 11-13-2024 17:14
From: David Levy
Subject: params getting corrupted
Here's what it turns into:
<param base="teamInfo.template" name="Team 1 Info" oid="team0.info" stream="false"> <value> <subparam suboid="applicationColor" value="#B20044"/> <subparam suboid="rank" value="1"/> <subparam suboid="tricode" value="ARK"/> <subparam suboid="city" value="Arkansas"/> <subparam suboid="name" value="Arkansas"/> <subparam suboid="mascot" value="Razorbacks"/> <subparam suboid="logo" value="file:/D:/IMS%20Images/Primary/ARKANSAS.PNG"/> <subparam suboid="altLogo" value="file:/D:/IMS%20Images/Secondary/ARKANSAS.PNG"/> <subparam suboid="swatch" value="file:/D:/IMS%20Images/Swatches/ARKANSAS.PNG"/> <subparam suboid="swatchSelection" value="0"/> <subparam suboid="headshotFolder" value=""/> <subparam suboid="sessionSelector" value="1"/> <subparam suboid="vaultScore" value="1.0"/> <subparam suboid="unevenBarsScore" value="2.0"/> <subparam suboid="beamScore" value="3.0"/> <subparam suboid="floorScore" value="4.0"/> <subparam suboid="pommelHorseScore" value="0.0"/> <subparam suboid="stillRingsScore" value="0.0"/> <subparam suboid="parallelBarsScore" value="0.0"/> <subparam suboid="horizBarScore" value="0.0"/> <subparam suboid="rotEvt0" value="1"/> <subparam suboid="rotEvt1" value="4"/> <subparam suboid="rotEvt2" value="3"/> <subparam suboid="rotEvt3" value="2"/> <subparam suboid="rotEvt4" value="-1"/> <subparam suboid="rotEvt5" value="-1"/> <subparam suboid="rotEvt6" value="-1"/> <subparam suboid="rotEvt7" value="-1"/> <subparam suboid="rotEvt8" value="-1"/> <subparam suboid="rotEvt9" value="-1"/> <subparam suboid="rotEvt10" value="-1"/> <subparam suboid="rotEvt11" value="-1"/> <subparam suboid="rotEvt12" value="-1"/> <subparam suboid="rotEvt13" value="-1"/> <subparam suboid="rotEvt14" value="-1"/> <subparam suboid="rotEvt15" value="-1"/> </value></param>
------------------------------
David Levy
Lead Real Time Graphics Developer
ESPN
Charlotte United States
Original Message:
Sent: 11-13-2024 17:14
From: David Levy
Subject: params getting corrupted
Here's a sample struct pre-bug:
<param access="1" constrainttype="STRUCT" name="Team 1 Info" oid="team0.info" stream="false" templateoid="teamInfo.template" type="STRUCT" widget="default"> <value> <subparam suboid="applicationColor" value="#B20044"/> <subparam suboid="rank" value="1"/> <subparam suboid="tricode" value="ARK"/> <subparam suboid="city" value="Arkansas"/> <subparam suboid="name" value="Arkansas"/> <subparam suboid="mascot" value="Razorbacks"/> <subparam suboid="logo" value="file:/D:/IMS%20Images/Primary/ARKANSAS.PNG"/> <subparam suboid="altLogo" value="file:/D:/IMS%20Images/Secondary/ARKANSAS.PNG"/> <subparam suboid="swatch" value="file:/D:/IMS%20Images/Swatches/ARKANSAS.PNG"/> <subparam suboid="swatchSelection" value="0"/> <subparam suboid="headshotFolder" value=""/> <subparam suboid="sessionSelector" value="1"/> <subparam suboid="vaultScore" value="1.0"/> <subparam suboid="unevenBarsScore" value="2.0"/> <subparam suboid="beamScore" value="3.0"/> <subparam suboid="floorScore" value="4.0"/> <subparam suboid="pommelHorseScore" value="0.0"/> <subparam suboid="stillRingsScore" value="0.0"/> <subparam suboid="parallelBarsScore" value="0.0"/> <subparam suboid="horizBarScore" value="0.0"/> <subparam suboid="rotEvt0" value="1"/> <subparam suboid="rotEvt1" value="4"/> <subparam suboid="rotEvt2" value="3"/> <subparam suboid="rotEvt3" value="2"/> <subparam suboid="rotEvt4" value="-1"/> <subparam suboid="rotEvt5" value="-1"/> <subparam suboid="rotEvt6" value="-1"/> <subparam suboid="rotEvt7" value="-1"/> <subparam suboid="rotEvt8" value="-1"/> <subparam suboid="rotEvt9" value="-1"/> <subparam suboid="rotEvt10" value="-1"/> <subparam suboid="rotEvt11" value="-1"/> <subparam suboid="rotEvt12" value="-1"/> <subparam suboid="rotEvt13" value="-1"/> <subparam suboid="rotEvt14" value="-1"/> <subparam suboid="rotEvt15" value="-1"/> </value></param>
------------------------------
David Levy
Lead Real Time Graphics Developer
ESPN
Charlotte United States
Original Message:
Sent: 11-13-2024 17:11
From: David Levy
Subject: params getting corrupted
Ok, I did some more research. I can make this consistently when I try to params.setValue in one of those Structs.
However, when I first wrote this, I didn't have any code that wrote to those structs at the time, I was just editing view params at that time.
------------------------------
David Levy
Lead Real Time Graphics Developer
ESPN
Charlotte United States
Original Message:
Sent: 11-08-2024 20:36
From: David Levy
Subject: params getting corrupted
I have some struct tables, and my code is only reading from them.
At most, I have some code that hides them from streaming.
However, something is changing them from:
<param access="1" constrainttype="STRUCT" name="Team 1 Info" oid="team1.info" stream="false" templateoid="teamInfo.template" type="STRUCT" widget="table">
to: <param base="teamInfo.template" name="Team 1 Info" oid="team1.info" stream="false">
I promise I didn't write the "base" attribute
Also, the structs that are empty get deleted. I used to have 8, now I have 4.
I think this has happened twice.
I'm adding in the template, in case it helps.
<param access="1" constrainttype="STRUCT" name="Team Template" oid="teamInfo.template" stream="false" type="STRUCT" widget="table"> <value> <subparam access="1" maxlength="0" name="Application Color" stream="false" suboid="applicationColor" type="STRING" value="#E40F0F" widget="color-picker"/> <subparam access="1" maxlength="0" name="Rank" stream="false" suboid="rank" type="STRING" value="" widget="text"/> <subparam access="1" maxlength="0" name="Tricode" stream="false" suboid="tricode" type="STRING" value="" widget="text"/> <subparam access="1" maxlength="0" name="City" stream="false" suboid="city" type="STRING" value="" widget="text"/> <subparam access="1" maxlength="0" name="Name" stream="false" suboid="name" type="STRING" value="" widget="text"/> <subparam access="1" maxlength="0" name="Mascot" stream="false" suboid="mascot" type="STRING" value="" widget="text"/> <subparam access="1" maxlength="0" name="Logo" stream="false" suboid="logo" type="STRING" value="" widget="file-picker"/> <subparam access="1" maxlength="0" name="ALT Logo" stream="false" suboid="altLogo" type="STRING" value="" widget="file-picker"/> <subparam access="1" maxlength="0" name="Swatch" stream="false" suboid="swatch" type="STRING" value="" widget="file-picker"/> <subparam access="1" constrainttype="INT_CHOICE" name="Swatch Selection" precision="0" stream="false" suboid="swatchSelection" type="INT16" value="0" widget="default"> <constraint key="0">Logo - 0</constraint> <constraint key="1">Primary - 1</constraint> <constraint key="2">Secondary - 2</constraint> <constraint key="3">Bottomline - 3</constraint> </subparam> <subparam access="1" maxlength="0" name="Headshot Folder" stream="false" suboid="headshotFolder" type="STRING" value="" widget="file-picker"/> <subparam access="1" constrainttype="INT_CHOICE" name="Session Selector" precision="0" stream="false" suboid="sessionSelector" type="INT16" value="1" widget="default"> <constraint key="1">1</constraint> <constraint key="2">2</constraint> </subparam> <subparam access="1" constrainttype="FLOAT_NULL" name="Vault Score" precision="0" stream="false" suboid="vaultScore" type="FLOAT32" value="0.0" widget="default"/> <subparam access="1" constrainttype="FLOAT_NULL" name="Uneven Bars Score" precision="0" stream="false" suboid="unevenBarsScore" type="FLOAT32" value="0.0" widget="default"/> <subparam access="1" constrainttype="FLOAT_NULL" name="Beam Score" precision="0" stream="false" suboid="beamScore" type="FLOAT32" value="0.0" widget="default"/> <subparam access="1" constrainttype="FLOAT_NULL" name="Floor Score" precision="0" stream="false" suboid="floorScore" type="FLOAT32" value="0.0" widget="default"/> <subparam access="1" constrainttype="FLOAT_NULL" name="Pommel Horse Score" precision="0" stream="false" suboid="pommelHorseScore" type="FLOAT32" value="0.0" widget="default"/> <subparam access="1" constrainttype="FLOAT_NULL" name="Still Rings Score" precision="0" stream="false" suboid="stillRingsScore" type="FLOAT32" value="0.0" widget="default"/> <subparam access="1" constrainttype="FLOAT_NULL" name="Parallel Bars Score" precision="0" stream="false" suboid="parallelBarsScore" type="FLOAT32" value="0.0" widget="default"/> <subparam access="1" constrainttype="FLOAT_NULL" name="Horizontal Bar Score" precision="0" stream="false" suboid="horizBarScore" type="FLOAT32" value="0.0" widget="default"/> </value></param>
------------------------------
David Levy
Lead Real Time Graphics Developer
ESPN
Charlotte United States
------------------------------