On 25/07/2015 at 03:40, xxxxxxxx wrote:
HELP!!!
I have a major problem that I've just spent a week trying to solve to no avail. I'm suppose to go on sale soon, but this is a show-stopper!
My plugin works fine on Windows, but on a mac the identical code hangs sometimes.
I created an executable with PyInstaller that runs fine.
p = subprocess.Popen(cmd, shell=False, bufsize=0, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, close_fds = False)
pickle.dump(data, p.stdin)
output, error_output = p.communicate()
I get my data back with p.communicate() the child process is done, and I can run it over and over again without problem. That is, until I restart C4D, then 'subprocess.Popen' hangs C4D until I use mac's 'Force Quit.' Once that happens, trying to launch any executable with Popen, even from the 'Console' inside C4D, hangs C4D. Restart C4D and still hangs.
Sometimes, I can make it work again by deleting the child executable folder and forcing Popen to throw a file not found error, but then after running the executable again, upon restart, C4D will freeze up if Popen is used again.
I've been trying to get help with this on IRC #python, but everyone who has tried to help is stumped.
It is as if subprocess.Popen is broken.
What is going on?