Strange Pixel renders as rect patches

Hi all,
I have a scene with a point light and two shaderball objects one with Lambert Shading and another with Mirror reflective Shading/Material. When I tried to render the reflective object it gives some strange rect patches in rendering the pixel (attaching the pictures for reference).

I tried to check/create this issue in the optix-advanced-sample example and it only happens when we remove the PerRayData flag for terminate. And I tried to implement that in my project I still get the errors.

It would be great if anyone have reference to the details and need for the terminate flag in per ray data structure used.

Note: For Indoor scene this issue does not comes.

Reference Images

[url]https://imgur.com/lYn2TnN[/url]
[url]https://imgur.com/ddbcWeF[/url]
[url]https://imgur.com/moFdAAv[/url]

Corruption in form of 8x4 screen space blocks in an OptiX 2D launch are normally an indication for uninitialized rtPayload variables in your code.

Please check if you have initialized all your fields in the rtPayload structure variable to useful default values before sourcing them and not only inside the individual program domains touching the rtPayload, because these might not be invoked.
Then check if all programs fill in all necessary information into the rtPayload required to produce a valid output.

If this only happens in the outdoor scenes, check the programs which handle the environment if that fills all necessary rtPayload values. Since that is normally handled in a miss program that would be an end-of-path condition for the radiance ray which needs to be indicated, and that is done with the terminate flag.

In any error case, first try to enable all OptiX exceptions, implement an exception program for each entry point, and check if any exceptions are raised. All OptiX Introduction examples contain the necessary code.