Capture problems - Max crashing for visually intense scenes

t's icon

I am trying to capture noisy triangle mesh that you can see on the pic below in 8K resolution. I am not using qmetro but individual bangs that I trigger manually and for each bang I wait that Max renders the previous frame. Max crashes when I try to do that - sometimes the crash occurs immediately, sometimes after few frames. If I capture in 4K, it works (no crash), but then if I turn the lights on, it again crashes.

This problem happens only when capturing (I am using jit.gl.node). If I don't capture everything works fine, even when using qmetro (the frame rate for such scenes is like 'one frame per second' but it never crashes). The mesh is created with matrix going into jit.gl.mesh.

Could any cache setting solve the problem? I don't understand these cache attributes but it seems to me it could be some memory problem?

I am using Win 10, GTX 1080, Max 7.3.5.

PS: I can try to reduce the patch to the problem if needed but I hope the question could be answered without a patch.

Rob Ramirez's icon

need to see the patch to diagnose. feel free to send to me privately.

t's icon

No problem, here is the patch:

www.tadej-droljc.org/td-zip/Max-CaptureCrash.zip

It contains geometry and index matrix so I had to upload it to my site.

I tried the patch on Win 10 (Max 7.3.5) and OSX 10.10.5 (Max 7.3.4) and it crashes after 1 to 3 bangs (after turning the capture option on). Without capture it works. Press "b" for single bang.

Your help is much appreciated Rob and please reply as soon as you can because I am in hurry due to some deadline and I need to find some solution / alternative solution asap. Thanks!

t's icon

I've just tried without an index matrix and there was no crash, so it seems the problem is when using index matrix and having intense or noisy visual scene and capturing at the same time.

The piece I am working on is about deformations of an object, so I need the index matrix because the triangle mesh needs to be drawn correctly when going from well defined object into a messy/noisy one. Therefore I cannot not use it. Also max crashes only when capturing and when the object becomes noisy (I am using the same index matrix all the time, the only thing that is different are the xyz vertex coordinates within geometry matrix , the size is the same all the time).

t's icon

Also, I've noticed another problem with jit.gl.mesh and index matrix. On Mac, if I use NxN geometry matrix and on line (Mx1) index matrix, it works fine. On Win that crashes Max so I have to use jit.scanwrap to make a one line geometry matrix

t's icon

Just tried it in Max 8, also crashing....

Rob Ramirez's icon

hi T, are there steps to reproduce the crash? i just get a major slowdown but no crash.

I've encountered crashes in the OpenGL drivers before when a vertex buffer is fed noise matrices at a high rate. perhaps this is a similar issue. nothing we can do on our end if that's the case.

t's icon

Hi Rob, I assume you did not turn the capture on because it's off when you open the patch. Here are the steps to reproduce the crash:

1. Turn on Capture (it is OFF by default, just to demonstrate that it works when non capturing)

2. press "b" for one single manual bang (don’t turn metro on) and wait that it renders the frame. Repeat that (pressing b) few times and Max should crash. Usually it crashes on 3rd bang but it might be 4th or 5th.

Rob Ramirez's icon

ok I could repro a crash on windows with a Nvidia 1070, but not on mac with an AMD Radeon R9 M380.

the crash trace was deep in the nvidia driver, so not much we can do on our end. probably maxing out some GPU resource.

you could try either splitting up the mesh into two or more meshes, or try splitting up the capture using multiple capture enabled jit.gl.camera objects, using the viewport attribute to capture a section of the scene, and then stitch the captures together.