Hello,
I’ve been working on a project with Panda3d for many months now, and I’m very happy with it! That I haven’t had a need to ask anything until now is a credit to how good the documentation is and how easy working with panda is.
That said, I’ve encountered a problem.
I’m using multiprocessing to handle network requests in their own process. This works fine in Panda3d 1.8 when running directly with ppython.
Unfortunately, if I package it into a p3d it then fails. No matter how I run it in p3d the result is the same: browser plugin, panda3d executable, or an executable created with pdeploy standalone.
Both the working and non-working case are with panda 1.8 on win32.
The error occurs the moment I create a multiprocessing.Pipe: the specific line triggering it in my case is:
self.connectionPipe,rppipe = Pipe()
Which works as desired when run without going through a p3d file.
The traceback it creates is:
Traceback (most recent call last):
File "C:\buildslave\release_rtdist_win32\build\panda3d\built_cmu\direct\p3d\AppRunner.py", line 638, in run
File "C:\buildslave\release_rtdist_win32\build\panda3d\built_cmu\direct\task\Task.py", line 502, in run
File "C:\buildslave\release_rtdist_win32\build\panda3d\built_cmu\direct\task\Task.py", line 460, in step
<creating of the pipe for my network process>
File "c:\python27\lib\multiprocessing\__init__.py", line 107, in Pipe
File "c:\python27\lib\multiprocessing\connection.py", line 222, in Pipe
WindowsError: [Error 123] The filename, directory name, or volume label syntax is incorrect
:TaskManager: TaskManager.destroy()
It appears that something about how a p3d is run confuses multiprocessing when it tries to create a temporary file to use as a windows named pipe. Normally multiprocess creates it based on os.getpid() and an itertools counter. Does anything unusual happen that might interfere with one or both of these when running a p3d?
Thank you,
-Rick