ID 428285 - OpScript: getChildName() returns a nil versus an empty string when accessing an index-out-of-bounds

Follow

Problem summary
In an OpScript node, getChildName() returns a nil versus an empty string when accessing an index-out-of-bounds.

Customer reported version
katana.3.5v1

Customer reported platform
n_a_linux

Steps to reproduce
1) Create an OpScript node with the following Lua code and set the applyWhere parameter to "at specific location". 

local gb = GroupBuilder()gb:set("foo", StringAttribute("bar"))Interface.SetAttr('groupAttribute', gb:build())
2) Attach a new OpScript node downstream with the following Lua code and set the applyWhere parameter to "at specific location". 

local foo = Interface.GetAttr('groupAttribute')print('getChildName() type: ' .. type(foo:getChildName(1)))
3) Expand the scene graph.

Expected behavior
Terminal shows that getChildName() returns a string.

getChildName() type: string​ 

Actual behavior
Terminal shows that getChildName()​ returns a nil.

getChildName() type: nil​

Workaround
Type-check after calling getChildName()​ to catch potential type errors.

Reproduced by support
This bug has been reproduced in:
Katana 3.5v2 - CentOS 7, Windows 10
Katana 3.5v1 - CentOS 7, Windows 10

Unable to reproduce bug in:
Katana 3.2v4 - CentOS 7, Windows 10
Katana 3.2v1 - CentOS 7, Windows 10
Katana 3.1v1 - CentOS 7, Windows 10
Katana 3.0v1 - CentOS 7, Windows 10
Katana 2.5v1 - Windows 10
 

    We're sorry to hear that

    Please tell us why