memory leak / stack trace error

Hi, I think I can reproduce a stack trace / memory leak error with V-Ray 3.6

If you creat a really large MASH world (ie 1 million trees)
Then use the V-Ray clipepr on it, it will create a memory leak during the embree stage:


[2017/Sep/15|17:05:45] V-Ray: Building embree static accelerator ...
Stack trace:
  vray.dll!VUtils::CameraFrustrum::operator=
  vray.dll!VUtils::CameraFrustrum::operator=
  vray.dll!VUtils::CameraFrustrum::operator=
  vray.dll!VUtils::CameraFrustrum::operator=
  vray.dll!VUtils::CameraFrustrum::operator=
  vray.dll!VUtils::CameraFrustrum::operator=
  vray.dll!VUtils::CameraFrustrum::operator=
  KERNEL32.DLL!BaseThreadInitThunk
  ntdll.dll!RtlUserThreadStart

However. I can get around this by rendering the scene first with cache turned on, then turn the clipper on, then render again and there will be no stack trace or memory leak issue.
The moemory leak will only happen during the first render.

Hope it makes sense. Let me know if I can help out anymore with this one.

Hi,
I’ll try to reproduce it on my end and will get back to you with some more information. Thank you for your feedback.

I think it actually might have something to do with Embree on further investigation. It seems when I disable embree the memory usage is expected but with embree turned on it skyrockets (even with conserve memory on).

The issue you’re having is a crash not a memory leak. Unfortunately I didn’t have any success on reproducing. If the objects instanced with the MASH world have some specific nodes like displacement fur or something else that is combined with the clipper might cause the crash. Some more information or if possible a scene would be very helpful.

I only thought it was a memory leak because the memory would skyrocket to the point where it took all the 32GB of RAM (and then started flooding the pagefile) and froze the computer.
Something I haven’t seen happen since the early days when rendering with 32bit computers.

It’s quite strange because it only happens on the first render. But if you hide half the scene, render, cancel, then unhide the scene and render it is fine and memory hovers around 15GB.

The only solution I found was to change Default geometry from auto to dynamic and that solved the issue when rendering batch. I think this just might be a specific scene issue and perhaps not a bug. I just haven’t seen a scene take up so much memory before but thinks it’s safe to close this ticket.

Hi,
I’m glad you found a solution. We’ll still make some more tests and try to reproduce it. I’ll keep you up to date if we find what causes the issue.

Thanks Ivan.

You could also try with lots of lights and adaptive lighting on?

Yes, I tried that too.I also tried on scenes with a lot of textured and displaced, objects with fur and proxies but without success. Thanks for your feedback I’ll keep digging in to it.