From: Greg Ercolano <erco@(email surpressed)>
Subject: [Q+A] 'kCGErrorRange:' error on Mac while running Shake rendering
   Date: Wed, 18 Jan 2006 03:19:08 -0800
Msg# 1196
View Complete Thread (1 article) | All Threads
Last Next
In the following exchange, the customer confirmed after debugging it was a
QuickTime issue, saying he was able to replicate in SSH (without rush),
and the 'chown/chmod' solved the problem.

I posted my entire response, though, as it might help people debug other
kinds of problems too.

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

> [..]
> Since we upgraded to the mac, I'm not able to launch Shake jobs
> anymore remotely. I get:
>
>     kCGErrorRange: Window Server Communications from outside the console allowed for root and console user only.
>
> If the remote user is logged into the mac interactively, then it works.

 	First, make sure your Shake file isn't trying to 'render to the screen'.
 	This is the most common cause of a command line render failing with a
 	window manager related error. Try running the shake command from the
 	machine's console, and see if it pops open any windows during or on
 	completion of rendering.

 	Second, are you certain the error is fatal?
 	I've seen the error in non-fatal circumstances where it can simply
 	be ignored; the render continues anyway and doesn't fail.

 	If you're sure it's fatal, update the machine to the latest patches
 	and reboot; it might be a problem with shake or the Mac libraries it uses.
 	(ie. one of the libraries might be invoking initialization code that
 	tries to access the window manager, when it shouldn't) In such a case,
 	usually taking the latest OS update fixes the problem. I recall 10.4.0
 	had a problem like this that caused Maya to fail. Upgrading the OS to
 	the latest OS and rebooting fixed the problem.

 	If it continues to fail, try replicating through ssh(1) by first
 	logging into the machine (as the same user 'rush' is running it as)
 	with the /different/ user logged in on the console, then paste the
 	same shake command rush is running into the ssh window.

 	If you end up with the same error in the ssh(1) window, follow up
 	with Nothing Real, showing them the SSH results, not the rush results,
 	and tell them you need a solution.

 	If you /can't/ replicate in ssh, only in rush, then follow up with me:
 	paste the complete ssh results and the rush log file results here. Be
 	sure in both cases ssh + rush are running as a different user than the
 	user logged in on the console.

 	When pasting the ssh results, include the prompts.
 	When pasting the rush results, include the headers.

> I've poked around the mac forums and only come up with [..] "run everything as root".

 	Well, they're not wrong in that it will likely solve the problem.

 	Many companies using After Effects /have/ to do this, due to how AE
 	always opens a GUI. Shake /shouldn't/ be doing this, however.

 	The fault may be with Apple's own libraries that Shake is using,
 	as described above. In which case even Nothing Real might not be able
 	to help, but they can maybe tell Apple about it.

 	Making shake run setuid root should definitely make the problem 'go away'
	(ie. "chown 0:0 /path/to/bin/shake ; chmod 4755 /path/to/bin/shake")
 	but certainly it pays to first rule out everything else, as that's a last resort.

Last Next