Closed IBAV8N closed 1 year ago
Did you successfully use previous version of xPilot, or is this your first time running xPilot?
@IBAV8N, maybe this is the same problem as mine (https://github.com/xpilot-project/xpilot/issues/144). Could you please start it from commandline and post the output?
-Justin>
Yes, I reinstalled .41 and it works well on this computer.
And you get the error if you upgrade to beta 42?
And you get the error if you upgrade to beta 42?
Correct. When I execute it from command line it returns 'Segmentation fault (core dumped)'.
$ ./xPilot.AppImage Segmentation fault (core dumped)
Can you run xPilot via gdb and paste the exception stacktrace?
If you can tell what command to type I can.
gdb ./xPilot.AppImage
This will start the gdb session.
Next enter the command run
to start the xPilot executable. This should print out the exception stacktrace.
(gdb) run Starting program: /home/me/xPilot/xPilot.AppImage [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". [Detaching after fork from child process 348781] process 348777 is executing new program: /tmp/.mount_xPilot2u1E65/AppRun process 348777 is executing new program: /tmp/.mount_xPilot2u1E65/usr/bin/xpilot [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". [New Thread 0x7ffff6055700 (LWP 348786)] [New Thread 0x7ffff550a700 (LWP 348787)]
Thread 1 "xpilot" received signal SIGSEGV, Segmentation fault. 0x0000555555932a08 in ma_context_get_device_info_source_callback__pulse(ma_pa_context, ma_pa_source_info const, int, void*) ()
Then, after the crash within the gdb shell, type bt
for the backtrace.
(gdb) run Starting program: /home/me/xPilot/xPilot.AppImage [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". [Detaching after fork from child process 355655] process 355651 is executing new program: /tmp/.mount_xPilotlhOQJR/AppRun process 355651 is executing new program: /tmp/.mount_xPilotlhOQJR/usr/bin/xpilot [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". [New Thread 0x7ffff6055700 (LWP 355660)] [New Thread 0x7ffff550a700 (LWP 355661)]
Thread 1 "xpilot" received signal SIGSEGV, Segmentation fault. 0x0000555555932a08 in ma_context_get_device_info_source_callback__pulse(ma_pa_context, ma_pa_source_info const, int, void*) () (gdb) bt
at /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-13.99.so
at /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-13.99.so
at /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-13.99.so
at /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-13.99.so
at /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-13.99.so
at /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-13.99.so
at /lib/x86_64-linux-gnu/libpulse.so.0
at /lib/x86_64-linux-gnu/libpulse.so.0
--Type
0x555555859af0 <main>, argc=1, argv=0x7fffffffd9b8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffd9a8)
at ../csu/libc-start.c:308
(gdb)
I was able to reproduce this with a vanilla install of Mint on a VM. It appears to be a pulseaudio permission issue; I was able to successfully launch xPilot via sudo.
I'd be curious to know if running pulseaudio -vvv
in your command line yields the same results as me:
justin@justin-VirtualBox:~$ pulseaudio -vvv
I: [pulseaudio] main.c: setrlimit(RLIMIT_NICE, (31, 31)) failed: Operation not permitted
I: [pulseaudio] main.c: setrlimit(RLIMIT_RTPRIO, (9, 9)) failed: Operation not permitted
D: [pulseaudio] core-rtclock.c: Timer slack is set to 50 us.
D: [pulseaudio] core-util.c: RealtimeKit worked.
I: [pulseaudio] core-util.c: Successfully gained nice level -11.
I: [pulseaudio] main.c: This is PulseAudio 13.99.1
D: [pulseaudio] main.c: Compilation host: x86_64-pc-linux-gnu
D: [pulseaudio] main.c: Compilation CFLAGS: -g -O2 -fdebug-prefix-map=/build/pulseaudio-rCGjZv/pulseaudio-13.99.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wall -W -Wextra -pipe -Wno-long-long -Wno-overlength-strings -Wunsafe-loop-optimizations -Wundef -Wformat=2 -Wlogical-op -Wsign-compare -Wformat-security -Wmissing-include-dirs -Wformat-nonliteral -Wpointer-arith -Winit-self -Wdeclaration-after-statement -Wfloat-equal -Wmissing-prototypes -Wredundant-decls -Wmissing-declarations -Wmissing-noreturn -Wshadow -Wendif-labels -Wcast-align -Wstrict-aliasing -Wwrite-strings -Wno-unused-parameter -fno-common -fdiagnostics-show-option -fdiagnostics-color=auto
D: [pulseaudio] main.c: Running on host: Linux x86_64 5.4.0-58-generic #64-Ubuntu SMP Wed Dec 9 08:16:25 UTC 2020
D: [pulseaudio] main.c: Found 2 CPUs.
I: [pulseaudio] main.c: Page size is 4096 bytes
D: [pulseaudio] main.c: Compiled with Valgrind support: no
D: [pulseaudio] main.c: Running in valgrind mode: no
D: [pulseaudio] main.c: Running in VM: yes
D: [pulseaudio] main.c: Running from build tree: no
D: [pulseaudio] main.c: Optimized build: yes
D: [pulseaudio] main.c: FASTPATH defined, only fast path asserts disabled.
I: [pulseaudio] main.c: Machine ID is 2a4b02270e3742148865b3f7bd5aa46f.
I: [pulseaudio] main.c: Session ID is c1.
I: [pulseaudio] main.c: Using runtime directory /run/user/1000/pulse.
I: [pulseaudio] main.c: Using state directory /home/justin/.config/pulse.
I: [pulseaudio] main.c: Using modules directory /usr/lib/pulse-13.99.1/modules.
I: [pulseaudio] main.c: Running in system mode: no
E: [pulseaudio] pid.c: Daemon already running.
E: [pulseaudio] main.c: pa_pid_file_create() failed.
A quick Google search of the pa_pid_file_create() failed
error has lots of results, but I couldn't find a solution that worked for me.
$ pulseaudio -vvv I: [pulseaudio] main.c: setrlimit(RLIMIT_NICE, (31, 31)) failed: Operation not permitted I: [pulseaudio] main.c: setrlimit(RLIMIT_RTPRIO, (9, 9)) failed: Operation not permitted D: [pulseaudio] core-rtclock.c: Timer slack is set to 50 us. D: [pulseaudio] core-util.c: RealtimeKit worked. I: [pulseaudio] core-util.c: Successfully gained nice level -11. I: [pulseaudio] main.c: This is PulseAudio 13.99.1 D: [pulseaudio] main.c: Compilation host: x86_64-pc-linux-gnu D: [pulseaudio] main.c: Compilation CFLAGS: -g -O2 -fdebug-prefix-map=/build/pulseaudio-rCGjZv/pulseaudio-13.99.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wall -W -Wextra -pipe -Wno-long-long -Wno-overlength-strings -Wunsafe-loop-optimizations -Wundef -Wformat=2 -Wlogical-op -Wsign-compare -Wformat-security -Wmissing-include-dirs -Wformat-nonliteral -Wpointer-arith -Winit-self -Wdeclaration-after-statement -Wfloat-equal -Wmissing-prototypes -Wredundant-decls -Wmissing-declarations -Wmissing-noreturn -Wshadow -Wendif-labels -Wcast-align -Wstrict-aliasing -Wwrite-strings -Wno-unused-parameter -fno-common -fdiagnostics-show-option -fdiagnostics-color=auto D: [pulseaudio] main.c: Running on host: Linux x86_64 5.15.0-56-generic #62~20.04.1-Ubuntu SMP Tue Nov 22 21:24:20 UTC 2022 D: [pulseaudio] main.c: Found 12 CPUs. I: [pulseaudio] main.c: Page size is 4096 bytes D: [pulseaudio] main.c: Compiled with Valgrind support: no D: [pulseaudio] main.c: Running in valgrind mode: no D: [pulseaudio] main.c: Running in VM: no D: [pulseaudio] main.c: Running from build tree: no D: [pulseaudio] main.c: Optimized build: yes D: [pulseaudio] main.c: FASTPATH defined, only fast path asserts disabled. I: [pulseaudio] main.c: Machine ID is 2a4b02270e3742148865b3f7bd5aa46f. I: [pulseaudio] main.c: Session ID is c2. I: [pulseaudio] main.c: Using runtime directory /run/user/1000/pulse. I: [pulseaudio] main.c: Using state directory /home/me/.config/pulse. I: [pulseaudio] main.c: Using modules directory /usr/lib/pulse-13.99.1/modules. I: [pulseaudio] main.c: Running in system mode: no E: [pulseaudio] pid.c: Daemon already running. E: [pulseaudio] main.c: pa_pid_file_create() failed.
And mine will launch via sudo.
Same result I see. I’m not a Linux user so my knowledge ends here as to why pulseaudio is acting up. I’ll see about adding additional error checking so xPilot doesn’t segfault.
Since a pulseaudio user daemon is already running in Mint I believe that outcome is normal.
I would try like this:
# stop it first
pulseaudio -k
# run it in foreground with verbose output
pulseaudio -vvv
It's weird that a user program cannot connect to pulseaudio, but when run with sudo it can?
In order to rule out any AppImage shenanigans, you can also try the plain executable from the Artifacts-2.0.0-beta.42.zip from https://github.com/xpilot-project/xpilot/releases/tag/v2.0.0-beta.42.
Same problem for me (FED36). Executing xPilot with SUDO helps but should not be the appropriate way to run it.
Completely stopping pulseaudio...
systemctl --user stop pulseaudio.socket systemctl --user stop pulseaudio.service
...and the executing xPilot.AppImage also does not solve the problem.
However, now xPilot (started without SUDO) dies silent.
@justinshannon, yes, it would be great to have useful error messages. @jonaseberle, I would agree that this seems to be normal - I do not get the problem. The daemon is running. Why is this a problem?
I am sure, my issue has the same underlying reason... Maybe the "wayland problem" is just for information... https://github.com/xpilot-project/xpilot/issues/144
pulseaudio with verbose output:
I was just pointing out that running pulseaudio -vvv
on top of an already running pulseaudio won't work. Your test case stops pulseaudio, then runs xPilot which leaves you with ALSA only which is most probably not what you want either.
running without the AppImage overhead:
In order to rule out any security settings or missing configuration for the AppImage on your system, I would try running the plain ./Linux/xPilot
from the Artifacts-2.0.0-beta.42.zip
@jonaseberle, got that. THX. I do not understand why pulseaudio has to be explicitly started if it is already running. I am far away from C programming in linux but should the code not just connect to the daemon instead of starting it?
I have just tried on my secondary Ubuntu 22.04 machine (pulseaudio 14.2). I get a segfault at the same codepoint as you. It happens for .AppImage and the plain executable.
# I forgot earlier that pulseaudio is set to restart itself via a user systemd unit:
$ systemctl --user stop pulseaudio.socket
$ pulseaudio -k; pulseaudio -vvv
# when running ./xPilot.AppImage in another terminal
I: [pulseaudio] client.c: Created 2 "Native client (UNIX socket client)"
D: [pulseaudio] protocol-native.c: Protocol version: remote 35, local 34
I: [pulseaudio] protocol-native.c: Got credentials: uid=1001 gid=1001 success=1
D: [pulseaudio] protocol-native.c: SHM possible: yes
D: [pulseaudio] protocol-native.c: Negotiated SHM: yes
D: [pulseaudio] protocol-native.c: Memfd possible: yes
D: [pulseaudio] protocol-native.c: Negotiated SHM type: shared memfd
D: [pulseaudio] memblock.c: Using shared memfd memory pool with 1024 slots of size 64,0 KiB each, total size is 64,0 MiB, maximum usable slot size is 65472
D: [pulseaudio] srbchannel.c: SHM block is 65472 bytes, ringbuffer capacity is 2 * 32712 bytes
D: [pulseaudio] protocol-native.c: Enabling srbchannel...
D: [pulseaudio] module-augment-properties.c: Looking for .desktop file for xpilot
D: [pulseaudio] protocol-native.c: Client enabled srbchannel.
I: [pulseaudio] client.c: Freed 2 "xpilot"
I: [pulseaudio] protocol-native.c: Connection died.
So pulseaudio seems rather happy.
Something in miniaudio's pulseaudio callback function? Has that recently been changed @justinshannon ?
It does not happen with older xPilot versions (I've just tried 2.0.0-beta.41).
I do not understand why pulseaudio has to be explicitly started if it is already running.
That was for debugging only to see its messages (-vvv
). You would see when pulseaudio clients connect.
I found a typo in the audio code...
@IBAV8N can you give this version a try? https://xpilot-project.org/files/xPilot-2.0.0-beta.42-Linux.zip
@IBAV8N can you give this version a try?
It works. Nice job, Justin.
Thanks... this fix will be in the next release.
Installs but will not execute:![image](https://user-images.githubusercontent.com/76073024/211208008-8032a16d-6ebc-41b9-a47d-576f6f578ce2.png)