FIXED: TouchDesigner crash when entering component or during startup

Hello,

We’re having some issues with TouchDesigner crashing in one of our projects recently.

Sometimes the appication will crash during startup, the loader on the splash screen will reach 100% and then the process will freeze and stop responding.

The other way to make it crash is more consistent. We have one component with an external tox which seems to work fine when the project starts. But when entering the component, the program will freeze straight away.

We can probably fix this by deleting the COMP and recreating it, since it mostly contains other COMPs with external toxes that seem to work fine by themselves. But it’s still a bit worrysome to have a project become potentially unusable.

Here you’ll find the .tox that is causing the issue. When you drop it in an empty project and try to enter it, it should crash straight away. I also added the dump file generated by TD and one that I recorded using Windbg Preview.

SCENE.tox (3.5 KB)
TouchDesignerCrash.2020.27390.1.dmp (350.4 KB)
enter-scene.dmp (309.5 KB)

Best,
Thijs

P.S. using TD version 2020.27390

Thanks for the report. I was able to reproduce the crash with the tox file. I have a potential patch that allows you to enter the component safely, but I still want to do a little more digging to get a better idea of why the issue was happening in the first place.

I’ll let you know when we have a solution available.

Hi Rob,

Thanks for looking into it! I agree it would be good to get to the root of the problem.

Best,
Thijs

After looking into the issue a little further, it doesn’t appear that there is any more significant problem going on. The crash was related to the top viewers in your component, and it was the same issue in all of the files you submitted. It looks like it was just a rare series of events that was happening inside your component that we just hadn’t encountered before.

I’ve submitted the patch which will appear in the next official and experimental releases. Thanks again for the report and let us know if you run into any further issues.

Thanks again for resolving the issue!

Concerning our current project, do you know when the new release of TD with the patch will be available?

Otherwise, is there a workaround we can implement on our end? If I recreate the component, is there a chance of this happening again with the current release?

@thijs-mf Do you need Official or Experimental build for your project?

Hi @ben, we run the Official build

We won’t be posting a new Official shortly since one was just posted, so here’s an internal build with that fix.

That’s awesome! Thanks a lot, for both of you! :raised_hands:

Hi @robmc & @ben,

It seems like I celebrated a bit prematurely. The first time I tried that build I actually got the crash on startup again. Then I tried again and it didn’t happen. I reopened the project about 10 times without crash, so I turned a blind eye to that first launch and considered it resolved.

Today, however, I can’t seem to open the project without it crashing. Nothing changed in the project files. Here are a few of the crash dumps. Is it still the same issue?

TouchDesignerCrash.2020.27580.1.dmp (323.0 KB) TouchDesignerCrash.2020.27580.2.dmp (329.2 KB) TouchDesignerCrash.2020.27580.3.dmp (314.3 KB) TouchDesignerCrash.2020.27580.4.dmp (325.7 KB)

Sorry you’re still having problems. I will take a look at the dumps and let you know what I find.

No worries about that.

It seems like when it crashes once and it generates the CrashAutoSave file, it will keep crashing as long as that file is there. I just deleted the CrashAutoSave and now the project starts again.

And I’m able to enter the component that was having problems before, so that part seems solved.

I’m wondering, do I need to re-save all the toxes in my project with this new version, would that prevent any further crashes on startup? Since we work with Git and have a lot of toxes, I generally only save a component when it has an update.

It’s hard to verify in one go, since it doesn’t reliably crash on startup.

Resaving the tox files shouldn’t make any difference. The previous crash was related to displaying the TOP node viewers and wouldn’t affect the contents of the file.

I’m still downloading the source files necessary to inspect your dump files, but hopefully I’ll have more information on that shortly.

On a side note, I am separately working on file format changes that will let you do git compares between versions of a tox file, so that workflow will hopefully be a little smoother in the future.

I heard that you were working on that :drooling_face: it would be a fantastic addition for the Git workflow!

So I took a look at the dump files and it’s crashing in a completely different system than the issue that I looked at before, so I’m not really surprised that the other fix didn’t help with this.

Unfortunately, at first glance it’s not really clear what the new problem actually is based on just the dump file. I will continue to investigate, but would you be able to send over the toe file and the crashautosave that was triggering it? That might make it a lot easier to diagnose. Thanks.

Hi Rob, here is a set of files from the crash. What I said yesterday, that it’s impossible to start without crash when the CrashAutoSave file is generated, doesn’t seem to be true. It’s just super random.

Note that the project tries to load a lot of other dependencies (scripts, json, toxes). I don’t mind sending you more of the project if necessary, but will send as personal message. Let me know!

CrashAutoSave.protoroomv3_td.813.toe (6.4 KB)
protoroomv3_td.toe (6.3 KB)
TouchDesignerCrash.2020.27580.1.dmp (326.6 KB)

Thanks for the files. Hopefully, I can reproduce the crash here and get a better idea of what’s going wrong. Files that you don’t want to share publicly can always be sent via forum messages or by email to support@derivative.ca or robmc@derivative.ca

Thanks for the files. It looks like the crash was caused by an Info CHOP deleting the node it was trying to watch due to a combination of python callbacks, replicators and external toxs.

The crash appeared somewhat random just because of the way memory is allocated in c++. Fortunately, in our debug version there are additional memory precautions that made it easier to reproduce using your files.

I’ve committed a fix on our end and will post a link to the new version when it is ready so that you can give it a try.

Here’s a link to the new version that includes the fix. Let me know if you run into any further problems.