Announcement

Collapse
No announcement yet.

Crashing when performing certain operations inside of a VRayOSLTexture node

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Crashing when performing certain operations inside of a VRayOSLTexture node

    V-Ray for Maya version: V-Ray Next for Maya, update 1 (v4.12.01.29159 from May 8 2019)
    Maya version: 2019.3

    I grabbed an OSL shader written for 3DS Max from here:
    https://github.com/ADN-DevTech/3dsMa...iWindowBox.osl

    But it causes V-Ray to crash. I have simplified it to demonstrate what I think is causing the crash:

    Code:
    shader jiWindowBox_Max
    (
    string filename = "missingcolor",
    output color result = color(0.0),
    )
    {
    color finalRGB;
    
    color objI = transform("object", -I);
    objI = -objI;
    
    color objP = (color(u,v,0.5) * 2.0 - color(1.0)) * 0.5 + color(0.5);
    
    color sections = step(0, objI);
    color baseDepth = (objP-sections)/(-objI);
    
    color baseDepthX = (objI*baseDepth[1] + objP + color(1.0));
    color baseDepthY = (objI*baseDepth[0] + objP + color(1.0));
    
    float horizU = baseDepthY[2] - 0.5;
    
    // works
    // finalRGB = color(horizU);
    
    // doesn't work
    finalRGB = color(clamp(horizU, 0.0, 1.0));
    
    result = finalRGB;
    }
    In the above example, outputting "horizU" directly seems to give the correct result - but modifying it in any way appears to lead to a crash.

    Has anyone seen this before?
    Last edited by shaneasimms; 16-06-2021, 12:30 AM.

  • #2
    Thanks for the report. I'll try to debug it.

    Best regards,
    Ivan

    Comment


    • #3
      Thanks for looking into it! Would be great to have a fix

      Comment


      • #4
        I could not reproduce the crash (tried with all variants of the minimal shader and even with the original one) and I begin to suspect there is something to do with the backend codegen and the specific CPU. Any of the following would help to narrow down the issue:
        1) Your exact CPU model. We've encountered similar crashes with Xeon Gold/SIlver/Platinum/Bronze in the past.
        2) Any crash dumps and even plain V-Ray log files.
        3) Any exported vrscenes would be helpful too.

        Best regards,
        Ivan

        Comment


        • #5
          Hey Ivan, sorry for the late response, and thanks so much for looking into this!

          It is in fact running on an Intel Xeon Silver 4114 CPU @2.2GHz.
          Unfortunately as it's a work thing getting any files to you is a little difficult, but I'll look into it.

          Thanks, Shane

          Comment


          • #6
            Thanks! That's already more than enough. I'll check if it is possible to backport any of the Xeon fixes back to 4.12.

            Best regards,
            Ivan

            Comment


            • #7
              Hey Ivan, just curious if there are any updates on this?

              Comment


              • #8
                Hello Shane, I'm sorry about the delay. I'm working on porting the required patches to 4.12. I'll notify you, once I have a working test build for Maya 2019.

                Best regards,
                Ivan

                Comment

                Working...
                X