Running an oF App over a long time period.

Hoi,

we are working on the final preparations for an interactive outdoor installation. This installation will be running for a month and part of it is driven by an oF app (using ofxOsc, ofxNetwork, ofxJitterNetworkSender). The app is compiled on Mac Os X and it will be running on a dedicated mac mini together with a SuperCollider instance, which is periodically sending OSC packages to the app. The memory footprint is stable.

My question is directed to people, who’ve been doing something similar. Are there any things I should think or could take care about to prevent problems during this time period? Any tricks or hints?

Thanks,
/m

i saw this link sometime ago with really good info about how to setup osx for installations:

http://blairneal.com/blog/installation-up-4evr/

1 Like

Thanks for the link, the article is a good checklist. Helped a lot. I also noticed that a couple of oF community members commented and improved it.

I had a problem with one of our applications becoming unresponsive, methods such as Launchd wouldn’t help in this situation. My solution was to have the oF app write to a log file every n seconds, and use the following apple script to continually check the file has been updated, and if it hasn’t, force a system restart.

  
--  
-- File Mod Watchdog  
--  
-- Continually checks that a file is modified, otherwise will force a system restart  
--  
-- 2013 David Penney  
--  
  
  
-- Config  
set HFSpath to "/app/data/logfile.log"  
set username to "user"  
set passwrd to "pass"  
set updateIntervalSeconds to 5  
-- End Config  
  
  
  
set lastModTime to "Deltron 3030"  
delay (60)  
  
repeat  
	tell application "System Events"  
		set newModTime to modification date of file HFSpath  
	end tell  
	if newModTime is equal to lastModTime then  
		do shell script "shutdown -r now" user name username password passwrd with administrator privileges  
	else  
		set lastModTime to newModTime  
	end if  
	delay (updateIntervalSeconds)  
end repeat  
  

I just came across an oF addon, than copes with this kind of issue. Its called ofxWatchdog.

A process watchdog timer for openFrameworks applications.
You can watch your application’s hang-up, illegal memory access,
illegal instruction, segmentation fault, zero devide, abort (uncaught C++ exception).
Then exit safely or reboot application.

Haven’t tried it yet, but it sounds promising.

1 Like