xthexder / go-jack

Go bindings for Jack Audio Connection Kit
MIT License
75 stars 22 forks source link

midipassthrough SuspendRefNum error #19

Open sirjohndfox opened 4 years ago

sirjohndfox commented 4 years ago

I'm unable to run the midi pass through example. First of all it was segfaulting but I resolved the by moving the port registration lines as per issue #13.

Now I am getting SuspendRefNum error.

Anyway the client creates and then crashes. Here is the output from the terminal:

[Running] go run "/home/john/go/src/github.com/xthexder/go-jack/example/midipassthrough.go" Jack: JackClient::SetupDriverSync driver sem in flush mode Jack: JackLinuxFutex::Connect name = jack_sem.1000_default_Go Midi Passthrough Jack: Clock source : system clock via clock_gettime Jack: JackLibClient::Open name = Go Midi Passthrough refnum = 5 Jack: JackClient::PortRegister ref = 5 name = Go Midi Passthrough:midi_in type = 8 bit raw midi port_index = 45 Jack: JackClient::PortRegister ref = 5 name = Go Midi Passthrough:midi_out type = 8 bit raw midi port_index = 46 Jack: JackClient::Activate Jack: JackPosixThread::StartImp : create non RT thread Jack: JackPosixThread::ThreadHandler : start Jack: JackClient::kBufferSizeCallback buffer_size = 128 Jack: JackClient::Init : period = 2666 computation = 300 constraint = 2666 Jack: JackPosixThread::AcquireRealTimeImp priority = 1 Jack: JackClient::ClientNotify ref = 5 name = Go Midi Passthrough notify = 2 Jack: JackClient::kActivateClient name = Go Midi Passthrough ref = 5

Jack: JackClient::ClientNotify ref = 5 name = Go Midi Passthrough notify = 18 Jack: JackClient::ClientNotify ref = 5 name = Go Midi Passthrough notify = 18 Jack: JackClient::ClientNotify ref = 5 name = Go Midi Passthrough notify = 18 Jack: JackClient::ClientNotify ref = 5 name = Go Midi Passthrough notify = 18 SuspendRefNum error JackClient::Execute error name = Go Midi Passthrough Jack: JackLibClient::ShutDown Jack: JackClient::ShutDown Jack: JackPosixThread::Terminate Jack: jack_client_close Jack: JackClient::Close ref = 5 Jack: JackClient::Deactivate Jack: JackSocketClientChannel::Stop Jack: JackPosixThread::Kill Jack: JackClientSocket::Close Jack: JackClientSocket::Close Jack: JackLibClient::~JackLibClient Jack: JackShmReadWritePtr1::~JackShmReadWritePtr1 4 Jack: Succeeded in unlocking 426 byte memory area Jack: JackLibGlobals Destroy 150fad0 Jack: ~JackLibGlobals Jack: no message buffer overruns Server is not running Jack: JackPosixThread::Stop Jack: JackPosixThread::ThreadHandler : exit Jack: JackShmReadWritePtr::~JackShmReadWritePtr 1 Jack: Succeeded in unlocking 1187 byte memory area Jack: JackShmReadWritePtr::~JackShmReadWritePtr 0 Jack: Succeeded in unlocking 107341338 byte memory area Jack: jack_client_close res = -1

[Done] exited with code=0 in 1.782 seconds

sirjohndfox commented 4 years ago

On futher investigation - it works intermittently. Some times after 5 attempts sometimes after 105 attempts. There is some kind of timing issue with the jack server.

hicks927 commented 3 years ago

Hi @sirjohndfox , did you ever figure out the cause of this?

sirjohndfox commented 3 years ago

@hicks927 No mate, sorry. I hit a dead end back then.