ID 555005 - Crash occurs when using lx.service.Layer LayerMaterial()

Follow

Problem summary
Crash occurs when using lx.service.Layer LayerMaterial()
 
Customer reported version
modo.16.0v1
 
Customer reported platform
windows10
 
Steps to reproduce
 
1) Open Modo and create a simple Cube.

2) Select the Cube and go to Layout > Palletes > Scripting

3) Copy and paste the script below and run it.
 

layer_service = lx.service.Layer()
layer_material_count = layer_service.LayerMaterialCount()
# result
1
material = layer_service.LayerMaterial(0)
 
Expected behaviour
Modo shouldn't crash and it should returns the material item (ILxItem) at the given index in the list of materials in the active layers.
 
Actual behaviour
Modo crashes.
 
Workaround
Unknown.
 
Reproduced by support
This bug has been reproduced in:
16.1v8 - Windows 10, macOS 13
15.0v1 - Windows 10, macOS 13
 
Earliest version tested
15.0v1 - This issue appears to be in all tested versions of the product.
 

    We're sorry to hear that

    Please tell us why