Since starting with TouchDesigner this year, I have ten sites running three different applications 24/7, and more are coming soon. It’s mostly been great, but one of my apps has a random crash and I can’t figure it out.
The crashing app is basically a dynamic video player. It takes in user-created videos (we control the smartphone app that makes the videos, and we have a server that transcodes the videos into a TD-friendly format) and renders an animation featuring the latest video, before returning to a grid of the last 12 videos. Also, on an idle timer, it switches to a promotional video.
This app uses a bunch of simple GLSL shaders to create transition effects, and python + threads for networking (as I’ve documented in my last post here: viewtopic.php?f=4&t=11395). It polls our local HTTP video server every 10 seconds to see if new content is available.
I have similar code running in TD in other installations that never crash. This app seems to crash anywhere from 1-50 hours after starting it. I think the biggest difference is that this app makes a network call every 10 seconds, whereas my other apps are triggered on user interaction and create threads and do socket i/o less often. AFAIK, from Windows’ Task Manager, it’s not a memory leak, and I haven’t found any log file or crash report that gives me any clues.
- Is there any useful information that can be found in TD log files? I haven’t found anything yet.
- Are crash logs written anywhere? I can’t find any.
- Is there a way to log stdout and stderr to a file? My python code print()s useful info to stdout, and uncaught exceptions end up on stderr. I’m using TouchPlayer for remote installations and don’t know how to get logs.
As an aside, we use a Windows program called AlwaysUp to auto-launch our installations and re-start them if they crash. Unfortunately, Windows doesn’t seem to notice that TD is crashing until there’s some user interaction (moving the mouse / clicking the TD window). Then AlwaysUp quickly restarts the app. I hate to say it, but I’ve been experimenting with an auto-mouse-clicker app (murgee.com/auto-clicker/) to try to detect the crashes. It’s a horrible fix, but the TD app can restart at any time and happily update with new content… I’d love to hear how other people keep their apps running on Windows!!