Simulation sometimes crashes when setting DOF state tensor - an illegal memory access was encountered

Hi, I’m trying to learn a policy to control a UR5e arm with a Robotiq 2f-85 end-effector attached. The issue I’m having is that setting the DOF state tensor in reset_idx sometimes crashes the simulation.

The crash happens more frequently when more environments are used; for example, it will almost never happen if 16 environments are used but will happen very quickly if 32 are used. I’ve ruled out the possibility that my GPU is running out of memory. Also, the crash never occurs if CPU is used instead of GPU.

I’ve attached my fork of IsaacGymEnvs with a custom task which has minimal code to reproduce the issue. There’s also a traceback which is what I get when I run

python task=PushToGoal num_envs=64

What’s going on? I doubt it’s a logic error on my part since the code runs fine on CPU. I’ve seen some other posts mentioning that there are issues simulating the 2f-85 because of its cyclical joints; would this cause the crash I’m getting?

Any help is appreciated. (90.5 MB)
log.txt (13.6 KB)