Autodesk / sitoa

Arnold plugin for Softimage
Apache License 2.0
33 stars 16 forks source link

Test 0225 crashes with Arnold 6.1 #87

Closed JenusL closed 3 years ago

JenusL commented 3 years ago

Test 0225 is testing the switcher shaders that are using the array parameters. It's only the RGBA shader (Color4_Array_Switch) that crashes and only when there's another shader plugged in to an array item other than the first one. Here's the error I get: ERROR : [arnold] AiArrayGetRGBAFunc: out-of-range error (1 out of 0) in shaders\src\Color4Switch.cpp at line 48

The other shaders testing Float, Int, Boolean and Vector all work ok with a shader connected in any array item.

I'm pretty certain that this is a new core regression with Arnold 6.1.0.0+ I tested Arnold 6.0.4.1 and that had no problems. @sjannuz Could you check this with the core team?

sjannuz commented 3 years ago

Hi @JenusL . I can't verify in Softimage at the moment. Do you mind trying to export an ascii .ass and check if kick fails too ? In case, let me have the file please.

JenusL commented 3 years ago

Hi @JenusL . I can't verify in Softimage at the moment. Do you mind trying to export an ascii .ass and check if kick fails too ? In case, let me have the file please.

Was preparing a .ass for you and I noticed som oddities in it so I actually think it's an SItoA issue after all. Let me explain. When exporting the Array, if the item has a shader connected, the shader value itself isn't exported, leaving that array item value unset.

Color4Switch
{
 name Sources.Materials.DefaultLib.Material.Color4_Array_Switch.SItoA.1000.2
 input 2
 default 0.123999998 0.123999998 0.123999998 0.123999998
 values 3 1 RGBA
1 0 0 0 0 0 -nan 0 0 0 1 0
 values[1] Sources.Materials.DefaultLib.Material.float_to_rgba.SItoA.1000.3
 index 3 1 INT
1 2 3
}

There you can se the second array item is 0 0 -nan 0 because that array item is just skipped because the shader connection is exported instead. This caused the shader to crash. I'll fix this in SItoA so that it sets the value on all items as well as exporting the shader.