-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hangs Pd on close #2
Comments
i can confirm that this happens for me as well, but not sure about the cause. |
Same issue here, on my laptop with Ubuntu 20.04LTS and on a RPI 400 with Debian 11. |
Looking at the problem rn, it seems the problem occurs when building pyext with a multithhreaded build of flext. My bet is on a thread that isn't joined / exited correctly ; i'm still troubleshooting tho. |
My intuition seems to be right : if you comment the following line (~275) of Pd doesn't hang on close. But of course, it disables the good functioning of threading in py/pyext. I'm digging into quworker and what causes the issue now. |
I solved the issue and commited it on my fork; you can check the following pull request #8. See complete fix here b3b5878. Explanation for(;;) {
while((el = qufifo.Get())) {
++el->th->thrcount;
{
ThrLock lock(my);
el->th->docall(el->fun,el->args);
Py_XDECREF(el->fun);
Py_XDECREF(el->args);
}
--el->th->thrcount;
qufifo.Free(el);
}
qucond.Wait(); // <--- the source of all our problems
} From my understanding, The solution We need to make a call to The only solution I've found for now is to create a class which sole purpose is to be destroyed at some point before This ensures to break the loop and hence, to let puredata exit when we make a call for it, without having to kill the process :) |
thank you @grybouilli for your contributions! i just wanted to note that i am no longer working at SOPI and im not sure if this repo has a maintainer now. perhaps the best way forward would be to make a pull request to the original https://github.com/grrrr/py repo? the main reason i never got around to that was because the cmake build was still a bit messy, but it seems your fork has some improvements to that. it would be great to get the python3 support into the hands of more people. |
Sure enough, I will clean things a bit and make a PR asap :) |
compilation
run
everything works great. however:
The text was updated successfully, but these errors were encountered: