Open apronchenkov opened 6 years ago
remove the last "NULL" on client_open and try again. looks suspicious...
I have tried the following code. The result is the same, the client crashes.
#include <jack/jack.h>
int main() {
jack_status_t status;
jack_client_t* jclient =
jack_client_open("default", JackNoStartServer, &status);
return status;
}
is this all the code the application have? or are you mixing it with some other stuff? (as mentioned countless times, mixing libjackserver and libjack stuff won't work...)
do the jack examples work for you?
For this issue it's the all code that I have.
I have identified at least one of the issues #342
I'm curious, do you know why there are two versions of jack_client_open? One in JackLibApi.cpp and in JackServerApi.cpp?
@apronchenkov FYI I tried the example code and it works as expected:
$ ./jc
Jack: JackClient::SetupDriverSync driver sem in flush mode
Jack: JackLinuxFutex::Connect name = jack_sem.1000_default_default
Jack: Clock source : system clock via clock_gettime
Jack: JackLibClient::Open name = default refnum = 3
$ echo $?
0
$ ./jc
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
$ echo $?
17
The JackNoStartServer
is used in several example clients and there it seems to work too.
Not sure what problem we are facing here, checking #341 now.
@apronchenkov If you have new insights, please post them here, thanks.
I'm using jack2-1.9.12. When I run the following simple client:
I expected that if there is no jackd process running, it will produce an error that the client is unable to connect to the server. And if the server is running, it will connect to it.
What I got. If there is no ~/.jackrc`, the client crashes because it's unable to find a driver name (=NULL):
If I create the file with the following content:
jackd --no-realtime -n default --verbose -d dummy
but with no runningjackd
-- the client prints the following message:and crashes
If there is jackd already running in background, the client prints
and crashes
I'm not sure what happens, but the feeling is that
jack_client_open(JackNoStartServer)
tries to start a jackd server. Will appreciate any help.-- Thanks, Alexander