# Code crashes after a few frames when running Replicator

**URL:** <https://forums.developer.nvidia.com/t/code-crashes-after-a-few-frames-when-running-replicator/228069>\
**Category:** Samples & Examples\
**Tags:** synthetic-data\
**Created:** [September 15, 2022, 12:20pm UTC](https://forums.developer.nvidia.com/t/code-crashes-after-a-few-frames-when-running-replicator/228069 "2022-09-15T12:20:46Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sturm\_1](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/sturm_1/32/138628_2.png) [@Sturm\_1](https://forums.developer.nvidia.com/u/Sturm_1)\
**Post date:** [September 15, 2022, 12:20pm UTC](https://forums.developer.nvidia.com/t/code-crashes-after-a-few-frames-when-running-replicator/228069/1 "2022-09-15T12:20:47Z")

</div>

Hi,

I am trying to create synthetic data with Replicator. For this I wrote a script to set up the replicator scene, after running the script I run Replicator. The script loads a “main object” which will be annotated and for distraction I load some distractor objects with rep.randomizer.instantiate(rep.utils.get\_usd\_files(PROPS, recursive=True), size=size, mode=‘scene\_instance’)

Replicator runs perfectly if I dont load distractor objects. As soon as I try to generate data with distractor objects Code crashes… Sometimes during the first frame, sometimes after a few. Sometimes even if I just preview a frame.

I have a background in Rendering and not in coding so maybe I oversee something obvious. Would be nice if somebody could help me troubleshooting.

- Operating system: Windows 11
- GPU / Driver: NVIDIA GeForce RTX 3060 / 31.0.15.1659
- Code Version: 2022.1.3

Thanks in advance  
Jan

---

<div class="post-metadata">

**Author:** ![mati-nvidia](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/mati-nvidia/32/164558_2.png) [@mati-nvidia](https://forums.developer.nvidia.com/u/mati-nvidia)\
**Post date:** [September 19, 2022, 9:16pm UTC](https://forums.developer.nvidia.com/t/code-crashes-after-a-few-frames-when-running-replicator/228069/2 "2022-09-19T21:16:24Z")

</div>

Hi @Sturm_1. Let me check with the dev team on this. Could you share some log files from the crash? Here’s how to find them: [How to Report an issue with Omniverse](https://forums.developer.nvidia.com/t/how-to-report-an-issue-with-omniverse/199675)

---

<div class="post-metadata">

**Author:** ![ahaidu](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/ahaidu/32/177510_2.png) [@ahaidu](https://forums.developer.nvidia.com/u/ahaidu)\
**Post date:** [September 20, 2022, 5:36am UTC](https://forums.developer.nvidia.com/t/code-crashes-after-a-few-frames-when-running-replicator/228069/3 "2022-09-20T05:36:16Z")

</div>

Hi there,

would it be possible to share the script you are running together with the crash log?

Cheers,  
Andrei

---

<div class="post-metadata">

**Author:** ![Sturm\_1](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/sturm_1/32/138628_2.png) [@Sturm\_1](https://forums.developer.nvidia.com/u/Sturm_1)\
**Post date:** [September 20, 2022, 7:29am UTC](https://forums.developer.nvidia.com/t/code-crashes-after-a-few-frames-when-running-replicator/228069/4 "2022-09-20T07:29:19Z")

</div>

Hi guys,

Thanks for your support. Log file is here:  
[kit\_20220920\_092111.log](https://forums.developer.nvidia.com/uploads/short-url/mMMEkNWa3p8hT1RraPe5j1WDZy1.log) (860.0 KB)

If possible I would not like to share the script public, even if it is not rocket science.  
BUT: I discovered what seemed to be the cause of the crash.  
I used **rep.randomizer.instantiate(rep.utils.get\_usd\_files(PROPS, recursive=True), size=size, mode=‘scene\_instance’)** for creating my distractor objects. When changing the mode to ‘point\_instance’ replicator runs without a problem. I worked with like 10 distractor objects so I assumed scene\_instance should not be a problem.

BR  
Jan

---

<div class="post-metadata">

**Author:** ![pcallender](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/pcallender/32/407085_2.png) [@pcallender](https://forums.developer.nvidia.com/u/pcallender)\
**Post date:** [September 21, 2022, 2:32pm UTC](https://forums.developer.nvidia.com/t/code-crashes-after-a-few-frames-when-running-replicator/228069/5 "2022-09-21T14:32:38Z")

</div>

Hi @Sturm_1,

The log doesn’t appear to have a crash report in it. If you’re able to catch a log with a crash report in it, that would be ideal for debugging on our side. The next version of code may also help address this. Will circle back when its available.

---

<div class="post-metadata">

**Author:** ![Sturm\_1](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/sturm_1/32/138628_2.png) [@Sturm\_1](https://forums.developer.nvidia.com/u/Sturm_1)\
**Post date:** [September 30, 2022, 9:06pm UTC](https://forums.developer.nvidia.com/t/code-crashes-after-a-few-frames-when-running-replicator/228069/6 "2022-09-30T21:06:45Z")

</div>

Hey!  
Crash did not happen again but I have some problems with the new version 2022.2.0  
My script does not work correctly anymore, there is something messed up with the scale of the objects I load. Everythin is much too big. Do you already know about such Issues or should I open a new thread?

Br  
Jan

---

<div class="post-metadata">

**Author:** ![mati-nvidia](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/mati-nvidia/32/164558_2.png) [@mati-nvidia](https://forums.developer.nvidia.com/u/mati-nvidia)\
**Post date:** [October 6, 2022, 5:47pm UTC](https://forums.developer.nvidia.com/t/code-crashes-after-a-few-frames-when-running-replicator/228069/7 "2022-10-06T17:47:49Z")

</div>

Hey @Sturm_1. Let’s start a new thread on that.
