I’m having a really strange issue with ShowBase crashing with exit code 10, but only from within a child process after forking, and only from within Django’s test runner. I posted some example code here: stackoverflow.com/questions/1045 … -framework
I did some more testing, and it works fine on Linux. I get the error on Mac. I also tried switching from os.fork() to multiprocessing.Process, and instead of crashing, the ShowBase() call hangs. Again, only on mac. Any idea what might cause this on mac?
I don’t know offhand, but OSX does have some funny rules about subprocesses and window permissions. Perhaps it’s forbidding the child process to open a window?
To make the Panda3D browser plugin work on OSX, I had to render to an offscreen buffer in the child process, then copy the resulting pixels to RAM where the parent process could copy them out again and copy them to the screen. I used the SubprocessWindow and SubprocessWindowBuffer classes for this purpose.
I’m not necessarily recommending this approach, but it does prove that there’s at least one way around this problem, as heinous as it is. There might be a better solution available.
Actually, since it works when running tests.py directly (not through manage.py), I don’t think it’s specifically an OS/X problem. It must be something that manage.py is doing that breaks Panda3D (but only on mac!).
timo, I was never able to fix the problem, but I was never able to get anyone else to reproduce it either, so I have no idea what causes it. It still happens on one laptop I have.