Skip to content
This repository has been archived by the owner on Feb 28, 2024. It is now read-only.

[BUG-18251] Multiple errors in keywords_lsl_*.llsd.xml #2646

Open
sl-service-account opened this issue Jun 2, 2016 · 2 comments
Open

[BUG-18251] Multiple errors in keywords_lsl_*.llsd.xml #2646

sl-service-account opened this issue Jun 2, 2016 · 2 comments

Comments

@sl-service-account
Copy link

Steps to Reproduce

I was examining the keywords file from the simulator, keywords_lsl_c056b691-4757-4c71-11fd-2d597032a616.llsd.xml, in order to update my keywords database file. I ran some automated checks and found a number of problems in it.

Findings

Missing constants

The following constants should be defined, but aren't:

  • PASS_IF_NOT_HANDLED, an integer with value 0. See SVC-5923 and/or http://wiki.secondlife.com/wiki/LlPassTouches and/or http://wiki.secondlife.com/wiki/LlPassCollisions

  • PASS_ALWAYS, an integer with value 1. See SVC-5923 and/or http://wiki.secondlife.com/wiki/LlPassTouches and/or http://wiki.secondlife.com/wiki/LlPassCollisions

  • PASS_NEVER, an integer with value 2. See SVC-5923 and/or http://wiki.secondlife.com/wiki/LlPassTouches and/or http://wiki.secondlife.com/wiki/LlPassCollisions

  • PSYS_PART_BF_ONE_MINUS_SOURCE_COLOR, an integer with value 5.

  • PSYS_PART_BF_ONE_MINUS_SOURCE_ALPHA, an integer with value 9.

    Extra constants

  • LSL_XP_ERROR_REQUEST_PERM_TIMEOUT does not exist in LSL but is defined in the keywords file.

  • REGION_FLAG_BLOCK_FLYOVER does not exist in LSL but is defined in the keywords file.

    Constants with wrong values

  • ATTACH_LULEG indicates a wrong value (27). The correct value is 26.

  • CAMERA_POSITION_LAG indicates a wrong value (6). The correct value is 5.

  • CAMERA_POSITION_LOCKED indicates a wrong value (22). The correct value is 21.

  • PSYS_PART_MAX_AGE indicates a wrong value (19). The correct value is 7.

  • RC_REJECT_TYPES indicates a wrong value (2). The correct value is 0.

  • VEHICLE_LINEAR_MOTOR_DECAY_TIMESCALE indicates a wrong value (35). The correct value is 31.

    Constants with wrong types

    The following constants are all of type string but they are wrongly specified as being of type key. This can be readily verified by putting them inside a list and checking the type of the list element.

  • NULL_KEY (should be the string "00000000-0000-0000-0000-000000000000")

  • TEXTURE_BLANK

  • TEXTURE_DEFAULT

  • TEXTURE_MEDIA

  • TEXTURE_PLYWOOD

  • TEXTURE_TRANSPARENT

    Test script to verify:

    default { state_entry() {
      integer i;
      for (i = 0; i < 7; ++i) llOwnerSay((string)[i+1, ": ", TYPE_STRING == llGetListEntryType([NULL_KEY, TEXTURE_BLANK, TEXTURE_DEFAULT, TEXTURE_MEDIA, TEXTURE_PLYWOOD, TEXTURE_TRANSPARENT, (key)""], i)]);
    }}

    The script should print:

    1: 1
    2: 1
    3: 1
    4: 1
    5: 1
    6: 1
    7: 0

    (the last one is to verify that actual keys display as 0).

    Malformed argument list

    The following LSL functions AND events are specified with a LLSD encoding that is not compatible with the viewer, resulting in their argument lists being shown as empty in the viewer.

    Their argument list should be encoded like the rest: rather than a containing a series of key/value pairs, it should be an containing a series of one-element s. I guess that the reason is because maps are considered unordered collections of key/value pairs, and for specifying the order of the arguments an array is required instead.

  • experience_permissions

  • experience_permissions_denied

  • llAgentInExperience

  • llCreateKeyValue

  • llDeleteKeyValue

  • llGetExperienceDetails

  • llGetExperienceErrorMessage

  • llKeysKeyValue

  • llReadKeyValue

  • llRequestExperiencePermissions

  • llUpdateKeyValue

    Functions with wrong return type

  • llGetRegionFPS indicates a wrong return type (void); it should be float.

  • llPow indicates a wrong return type (void); it should be float.

  • llScaleByFactor indicates a wrong return type (float). It should be integer.

    Functions and Events with wrong argument lists

  • llLinkParticleSystem - second argument indicates the wrong type (integer); it should be list.

  • llRegionSay - second argument indicates the wrong type (integer); it should be string.

  • llSetVehicleRotationParam - second argument indicates the wrong type (float); it should be rotation.

  • llSetVehicleVectorParam - second argument indicates the wrong type (float); it should be vector.

  • experience_permissions_denied event - the second argument is missing (integer Reason).

    Minor problems

  • ATTACH_AVATAR_TOUNGE: apart from the misspelling reported in BUG-18250, the tooltip text is also misspelled as "tounge".

  • The constant CHANGED_MEDIA is specified in decimal (2048). For consistency with the others, it should be specified in hex (0x800).

  • The constant STATUS_BLOCK_GRAB is specified in decimal (64). For consistency with the others, it should be specified in hex (0x40).

  • The constant STATUS_BLOCK_GRAB_OBJECT is specified in decimal (1024). For consistency with the others, it should be specified in hex (0x400).

  • The constant DEG_TO_RAD needs one more digit for it to equal the LSL value. The actual value that equals a LSL float is 0.017453293 (the last digit, 3, is missing).

  • llGiveMoney indicates a wrong return type (void), it should be integer (but it always returns 0, so no one uses the return value).

  • llMakeFountain misses two parameters, integer bounce (before the texture) and float bounce_offset (at the end).

Original Jira Fields
Field Value
Issue BUG-18251
Summary Multiple errors in keywords_lsl_*.llsd.xml
Type Bug
Priority Unset
Status Accepted
Resolution Accepted
Reporter Sei Lisa (sei.lisa)
Created at 2016-06-02T09:14:35Z
Updated at 2016-06-06T19:28:35Z
{
  'Business Unit': ['Platform'],
  'Date of First Response': '2016-06-06T08:15:00.230-0500',
  'ReOpened Count': 0.0,
  'Severity': 'Unset',
  'System': 'SL Simulator',
  'Target Viewer Version': 'viewer-development',
  'What just happened?': 'h3. Missing constants\r\n\r\nThe following constants should be defined, but aren\'t:\r\n\r\n- PASS_IF_NOT_HANDLED, an integer with value 0. See SVC-5923 and/or http://wiki.secondlife.com/wiki/LlPassTouches and/or http://wiki.secondlife.com/wiki/LlPassCollisions\r\n- PASS_ALWAYS, an integer with value 1. See SVC-5923 and/or http://wiki.secondlife.com/wiki/LlPassTouches and/or http://wiki.secondlife.com/wiki/LlPassCollisions\r\n- PASS_NEVER, an integer with value 2. See SVC-5923 and/or http://wiki.secondlife.com/wiki/LlPassTouches\r\n- PSYS_PART_BF_ONE_MINUS_SOURCE_COLOR, an integer with value 5.\r\n- PSYS_PART_BF_ONE_MINUS_SOURCE_ALPHA, an integer with value 9.\r\n\r\nh3. Extra constants\r\n\r\n- LSL_XP_ERROR_REQUEST_PERM_TIMEOUT does not exist in LSL but is defined in the keywords file.\r\n- REGION_FLAG_BLOCK_FLYOVER does not exist in LSL but is defined in the keywords file.\r\n\r\nh3. Constants with wrong values\r\n\r\n- ATTACH_LULEG indicates a wrong value (27). The correct value is 26.\r\n- CAMERA_POSITION_LAG indicates a wrong value (6). The correct value is 5.\r\n- CAMERA_POSITION_LOCKED indicates a wrong value (22). The correct value is 21.\r\n- PSYS_PART_MAX_AGE indicates a wrong value (19). The correct value is 7.\r\n- RC_REJECT_TYPES indicates a wrong value (2). The correct value is 0.\r\n- VEHICLE_LINEAR_MOTOR_DECAY_TIMESCALE indicates a wrong value (35). The correct value is 31.\r\n\r\nh3. Constants with wrong types\r\n\r\nThe following constants are all of type *string* but they are wrongly specified as being of type *key*. This can be readily verified by putting them inside a list and checking the type of the list element.\r\n\r\n- NULL_KEY (should be the string "00000000-0000-0000-0000-000000000000")\r\n- TEXTURE_BLANK\r\n- TEXTURE_DEFAULT\r\n- TEXTURE_MEDIA\r\n- TEXTURE_PLYWOOD\r\n- TEXTURE_TRANSPARENT\r\n\r\nTest script to verify:\r\n{code}\r\ndefault { state_entry() {\r\n  integer i;\r\n  for (i = 0; i < 7; ++i) llOwnerSay((string)[i+1, ": ", TYPE_STRING == llGetListEntryType([NULL_KEY, TEXTURE_BLANK, TEXTURE_DEFAULT, TEXTURE_MEDIA, TEXTURE_PLYWOOD, TEXTURE_TRANSPARENT, (key)""], i)]);\r\n}}\r\n{code}\r\nThe script should print:\r\n{code}\r\n1: 1\r\n2: 1\r\n3: 1\r\n4: 1\r\n5: 1\r\n6: 1\r\n7: 0\r\n{code}\r\n(the last one is to verify that actual keys display as 0).\r\n\r\nh3. Malformed argument list\r\n\r\nThe following LSL functions AND events are specified with a LLSD encoding that is not compatible with the viewer, resulting in their argument lists being shown as empty in the viewer.\r\n\r\nTheir argument list should be encoded like the rest: rather than a <map> containing a series of key/value pairs, it should be an <array> containing a series of one-element <map>s. I guess that the reason is because maps are considered unordered collections of key/value pairs, and for specifying the order of the arguments an array is required instead.\r\n\r\n- experience_permissions\r\n- experience_permissions_denied\r\n- llAgentInExperience\r\n- llCreateKeyValue\r\n- llDeleteKeyValue\r\n- llGetExperienceDetails\r\n- llGetExperienceErrorMessage\r\n- llKeysKeyValue\r\n- llReadKeyValue\r\n- llRequestExperiencePermissions\r\n- llUpdateKeyValue\r\n\r\nh3. Functions with wrong return type\r\n\r\n- llGetRegionFPS indicates a wrong return type (void); it should be float.\r\n- llPow indicates a wrong return type (void); it should be float.\r\n- llScaleByFactor indicates a wrong return type (float). It should be integer.\r\n\r\nh3. Functions and Events with wrong argument lists\r\n\r\n- llLinkParticleSystem - second argument indicates the wrong type (integer); it should be list.\r\n- llRegionSay - second argument indicates the wrong type (integer); it should be string.\r\n- llSetVehicleRotationParam - second argument indicates the wrong type (float); it should be rotation.\r\n- llSetVehicleVectorParam - second argument indicates the wrong type (float); it should be vector.\r\n- experience_permissions_denied event - the second argument is missing (integer Reason).\r\n\r\nh3. Minor problems\r\n\r\n- ATTACH_AVATAR_TOUNGE: apart from the misspelling reported in BUG-18250, the tooltip text is also misspelled as "tounge".\r\n- The constant CHANGED_MEDIA is specified in decimal (2048). For consistency with the others, it should be specified in hex (0x800).\r\n- The constant STATUS_BLOCK_GRAB is specified in decimal (64). For consistency with the others, it should be specified in hex (0x40).\r\n- The constant STATUS_BLOCK_GRAB_OBJECT is specified in decimal (1024). For consistency with the others, it should be specified in hex (0x400).\r\n- The constant DEG_TO_RAD needs one more digit for it to equal the LSL value. The actual value that equals a LSL float is 0.017453293 (the last digit, 3, is missing).\r\n- llGiveMoney indicates a wrong return type (void), it should be integer (but it always return 0).\r\n- llMakeFountain misses two parameters, integer bounce (before the texture) and float bounce_offset (at the end).\r\n',
  'What were you doing when it happened?': 'I was examining the keywords file from the simulator, keywords_lsl_c056b691-4757-4c71-11fd-2d597032a616.llsd.xml, in order to update my keywords database file. I ran some automated checks and found a number of problems in it.',
  'What were you expecting to happen instead?': '.',
  'Where': 'Any RC region',
}
@sl-service-account
Copy link
Author

Oz Linden commented at 2016-06-06T13:15:00Z

A most excellent bug report - thank you.

Please review this changeset:

https://bitbucket.org/lindenlab/bento-box/commits/8110147b745bbc983d5c29ac44c18b29417b0406

That includes a couple of other changes that had been made on the server since the last time the viewer fallback version of the hints had been updated, but should include all the fixes you enumerated.

@sl-service-account
Copy link
Author

Sei Lisa commented at 2016-06-06T19:02:55Z, updated at 2016-06-06T19:28:35Z

Thanks for the prompt response!

It's much better now. A few problems remain; some of them I neglected to report (sorry, it was a long diff) and a few others are new.

  • The LLSD type for all constants encoded in hexadecimal, other than the ones I reported, is , not . I mean they are encoded like 0x800 rather than 0x800. However, the ones I reported are now encoded as . I'm not sure if this will affect how the values are displayed in the viewer. I suspect it will; otherwise I don't think the rest would use instead. This affects CHANGED_MEDIA, STATUS_BLOCK_GRAB, STATUS_BLOCK_GRAB_OBJECT.
  • The LLSD type used for the string constants NULL_KEY, TEXTURE_BLANK, TEXTURE_DEFAULT, TEXTURE_MEDIA, TEXTURE_PLYWOOD and TEXTURE_TRANSPARENT is , not . This is a bit weird; I'm not sure if it will cause problems. Maybe not.
  • The constant REGION_FLAG_BLOCK_FLYOVER is still defined but it doesn't compile. Maybe the plans are to implement it in LSL rather than remove it from the syntax highlighting file?
  • In llKeysKeyValue the types of both arguments should be integer, not string.
  • In llGetLinkMedia, the third argument's type should be list, not integer.
  • In llGetLinkPrimitiveParams, the second argument's type should be list, not integer.
  • There are two constants that I didn't report intentionally, because I suspect they are deprecated or unimplemented. The wiki doesn't document them. They are KFM_CMD_SET_MODE (integer with value 3) and PSYS_SRC_OBJ_REL_MASK (integer with value 1). I'm reporting them for consideration just in case.
  • [Edit] I almost forgot again! A minor issue: the value of the constant EOF is reported as "0x0A0x0A0x0A". That's hard to understand; wouldn't it be clearer if it's reported as "\n\n\n", since scripters should be acquainted with what \n is when inside a string? (perhaps it should be encoded as ```
    \n\n\n
    
    I think that should be all. Thanks again!
    

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant