openAV-Luppp
openAV-Luppp copied to clipboard
Segmentation fault (core dumped)
Followed build instruction with the new ntk link.
Application builds yet when run it produces the following error: [Luppp] main:78: Git: 9253890 readme: add second link for ntk, fixes #317 [Luppp] main:94: Built with BUILD_TESTS enabled [Luppp] Gui:460: Loaded preferences Segmentation fault (core dumped)
Environment: Linux 5.11.0-7614-generic CPU = AMD Ryzen 7 Pro 4750G
Would you run in gdb
and provide the output of backtrace
? That would provide debug info that can be used to diagnose the issue, thanks!
I've just tried to reproduce, but it's working fine here, so input required to reproduce this.
I've just tried to reproduce, but it's working fine here, so input required to reproduce this.
I have found the problem using the backtrace, seems that I didn't have jack running.
It is working now!
I've just tried to reproduce, but it's working fine here, so input required to reproduce this.
I guess you can reproduce it by not running jack server, but shouldn't it produce an error message instead of segmentation fault?
Yes - but there are different versions of JACK servers, client libraries, ABIs etc. If you can paste the backtrace (with debug symbols) then we should likely be able to resolve..?
I think the jack_client_open()
call in the Jack::Jack()
is failing, returning a NULL client, and then the jack_get_sample_rate()
call segfaults on the NULL client.
An early return might work, but we cannot return error codes from class constructors (ugh - I'm a C
dev these days, and now find some of the Class things like RAII and these types of things a bit annoying..)
Yes - but there are different versions of JACK servers, client libraries, ABIs etc. If you can paste the backtrace (with debug symbols) then we should likely be able to resolve..?
I think the
jack_client_open()
call in theJack::Jack()
is failing, returning a NULL client, and then thejack_get_sample_rate()
call segfaults on the NULL client.An early return might work, but we cannot return error codes from class constructors (ugh - I'm a
C
dev these days, and now find some of the Class things like RAII and these types of things a bit annoying..)
I honestly don't know what I did different now, but it is no longer creating a segfault anymore even when jack is not running.
I was going to use something like this:
client = jack_client_open(client_name, options, &status, server_name);
if (client == NULL) {
fprintf(stderr, "jack_client_open() failed, "
"status = 0x%2.0x\n", status);
if (status & JackServerFailed) {
fprintf(stderr, "Unable to connect to JACK server\n");
}
exit(1);
}
Sounds like the system config/JACK version or something changed, resulting in the code doing what it was meant to (instead of erroring-out like before. Marking as closed as we cannot reproduce.