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
Segfault when booting server (invalid port names) #160
Comments
This means that pyo can't connect its "output ports" to system's input ports, not the other way! I don't think the problem is with duplex=0 (it behaves as it is supposed to) but rather with pyo assuming that jack's default port names are "system". I guess this is not the case for you, is it? However, I agree that a segfault is unacceptable in the case of failure to connect... |
I meant pyo expects jack output ports named 'system' to exist, which it then intends to use as input.
Documentation says setting duplex to 0 will set pyo to output-only mode where it will only attempt to connect to jack's input ports. It demonstrably doesn't work like that, still attempts to connect to jack's output ports, fails to find them and sigsegvs. Doing this manually by disabling auto-connection, booting the server and connecting just the output to jack's input does work.
Jack, for me, has input ports named 'system', but no output ports named 'system'. I suspect the latter appear if there is a line in/mic in active, but do not exist at other times. I'm going to guess that the dev who committed this works on a laptop, where a mic is always present.
+1. I could be missing/wrong about something as I haven't had cause to fully grok linux audio to date. |
Output of jack-client for python
|
I think I got it. Nothing prevent the auto-connection in the Server's jack backend. This does not create any trouble in my Debian computer so I've never spot it. I'm out of town, I'll fix it when I come back and let you know when it's ready for testing. |
My apologies - this would normally be a pull request instead of a bug report, but I don't understand pyo and jack well enough nor would I know your preferred way to fix it. Very happy to test of course. |
Can you give me the exact error message, if any, when you try with duplex=0 ? Thanks! |
This is with Server(audio='jack', duplex=0). With Server(), which uses portaudio which in turn uses jack on my system, the server boots, doesn't segfault, but audio doesn't work and nothing shows up in the jack connections. |
…king if input ports variable is NULL (trying to fix issue #160).
Can you compile pyo from latest sources and tell me if my fix is working? Thank you! |
Duplex works as expected now. Unless someone knows to use it, pyo still sigsegvs by default in my config. Since a fix for that is not present in the last commit, I'm assuming this is expected. |
The segfault is now fixed. If Jack doesn't have any input ports, pyo's Server simply falls back to playback-only mode. It's in git now. |
Linux (Arch,5.3-rc-latest from git), latest pyo from pypi.
I have no inputs available. Default (set to portaudio for some reason) wouldn't work at all, server wouldn't boot complaining about input channels < 2, both when running pulseaudio only and jack+pulseaudio. Setting duplex=0 didn't help. I did manage to get it to boot once by hard setting input channels in the jack config, but output didn't work.
Setting audio='jack' and duplex=0 didn't work either. It now segfaults because it can't connect to input ports = 'system'. This was supposed to be partially fixed via #15, since pyo has no reason to connect to inputs when duplex=0, but the fix does not work for me.
This is a problem, because:
I've managed to work around the issue with:
However, this is imo unsatisfactory, especially since it's not documented anywhere. I recall having this same issue when attempting to try out pyo many months back, and not having the time/motivation to debug at the time, concluded that it wasn't worth the time to do so just to try it out.
This is not intended to be harsh, btw, although my LKML-influenced style might make it read that way ;) Please assume that I'm thrilled that someone took the time to create this.
The text was updated successfully, but these errors were encountered: