Comments (4)
Seems after one of the latest merges it segfaults always, I will check later this evening why this is.
from ncpamixer.
So I did a bit of debugging myself, and discovered that it seems to be something to do with src/pa.cpp:457, which is:
p->app_name = pa_proplist_gets(info->proplist, PA_PROP_APPLICATION_NAME);
However, what is odd is that the segfault seems to occur (based on gdb output) because the basic_string.h
file cannot be found. The program is looking for it in an absolute path starting with /build
, but the file is actually located in /usr/include/c++
. So the file's not missing, the program just seems to be looking for it in the wrong place... This is particularly confusing, as I have not custom-installed the C++ standard libraries. I've installed everything through pacman
.
Any idea what the issue might be? Or how to investigate it further (I've not done ncurses or pa development before)?
GDB backtrace:
(gdb) backtrace
#0 0x00007ffff7af6a85 in __strlen_avx2 () from /usr/lib/libc.so.6
#1 0x00007ffff7dfe35a in std::char_traits<char>::length (__s=0x0) at /build/gcc/src/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/char_traits.h:357
#2 std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::assign (__s=0x0, this=0x7fffec017470)
at /build/gcc/src/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/basic_string.h:1438
#3 std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::operator= (this=0x7fffec017470, __s=0x0)
at /build/gcc/src/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/basic_string.h:676
#4 0x0000000100023b28 in Pa::update_input (this=0x100041840 <pulse>, info=0x7ffff738c810) at $HOME/Projects/ncpamixer-git/src/pa.cpp:457
#5 0x00000001000242bc in Pa::ctx_inputlist_cb (ctx=0x100054be0, info=0x7ffff738c810, eol=0, instance=0x100041840 <pulse>) at $HOME/Projects/ncpamixer-git/src/pa.cpp:655
#6 0x00007ffff7eebd76 in ?? () from /usr/lib/libpulse.so.0
#7 0x00007ffff7943684 in ?? () from /usr/lib/pulseaudio/libpulsecommon-13.0.so
#8 0x00007ffff79439ff in pa_pdispatch_run () from /usr/lib/pulseaudio/libpulsecommon-13.0.so
#9 0x00007ffff7ef5f01 in ?? () from /usr/lib/libpulse.so.0
#10 0x00007ffff793a339 in ?? () from /usr/lib/pulseaudio/libpulsecommon-13.0.so
#11 0x00007ffff793be8b in ?? () from /usr/lib/pulseaudio/libpulsecommon-13.0.so
#12 0x00007ffff793c027 in ?? () from /usr/lib/pulseaudio/libpulsecommon-13.0.so
#13 0x00007ffff793943a in ?? () from /usr/lib/pulseaudio/libpulsecommon-13.0.so
#14 0x00007ffff7edfb93 in pa_mainloop_dispatch () from /usr/lib/libpulse.so.0
#15 0x00007ffff7ee3311 in pa_mainloop_iterate () from /usr/lib/libpulse.so.0
#16 0x00007ffff7ee33b1 in pa_mainloop_run () from /usr/lib/libpulse.so.0
#17 0x00007ffff7ed361e in ?? () from /usr/lib/libpulse.so.0
#18 0x00007ffff792dd1c in ?? () from /usr/lib/pulseaudio/libpulsecommon-13.0.so
#19 0x00007ffff7ea53e9 in start_thread () from /usr/lib/libpthread.so.0
#20 0x00007ffff7a94293 in clone () from /usr/lib/libc.so.6
(gdb)
GDB output concerning line 457:
Thread 2 " threaded-ml" hit Breakpoint 1, Pa::update_input (this=0x100041840 <pulse>, info=0x7ffff738c810) at $HOME/Projects/ncpamixer-git/src/pa.cpp:457
457 p->app_name = pa_proplist_gets(info->proplist, PA_PROP_APPLICATION_NAME);
(gdb) p *info
$1 = {index = 945, name=0x7ffff0016af0 "LADSPA Stream", owner_module = 25, client=4294967295, sink = 1, sample_spec = {format = PA_SAMPLE_FLOAT32LE, rate = 48000, channels = 2 '\002'}, channel_map = {
channels = 2 '\002', map = {PA_CHANNEL_POSITION_FRONT_LEFT, PA_CHANNEL_POSITION_FRONT_RIGHT, PA_CHANNEL_POSITION_MONO <repeats 30 times>}}, volume = {channels = 2 '\002', values = {65536, 65536,
0 <repeats 30 times>}}, buffer_usec = 0, sink_usec = 73815, resample_method = 07ffff0016b35 "copy", driver = 0x7ffff0016b3b "module-ladspa-sink.c", mute = 0, proplist = 0x7ffff0012230, corked = 0,
has_volume = 1, volume_writable = 0, format = 0x7ffff0011080}
(gdb) p *(info->proplist)
$2 = <incomplete type>
(gdb) s
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::operator= (this=0x7ffff0017470, __s=0x0)
at /build/gcc/src/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/basic_string.h:675
675 /build/gcc/src/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/basic_string.h: No such file or directory.
(gdb) s
676 in /build/gcc/src/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/basic_string.h
(gdb) s
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::assign (__s=0x0, this=0x7ffff0017470) at /build/gcc/src/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/basic_string.h:676
676 in /build/gcc/src/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/basic_string.h
(gdb) s
std::char_traits<char>::length (__s=0x0) at /build/gcc/src/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/char_traits.h:357
357 /build/gcc/src/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/char_traits.h: No such file or directory.
(gdb) s
Thread 2 "threaded-ml" received signal SIGSEGV, Segmentation fault.
0x00007ffff7af6a85 in __strlen_avx2 () from /usr/lib/libc.so.6
(gdb)
from ncpamixer.
Looks to me that it has something to do with this commit abe0550, I would expect that pa_proplist_gets returns a char pointer but since it crashes when trying to convert it to a string I would guess that it for some reason returns a null pointer.
from ncpamixer.
To fix it i would probably do something like
readd setter
void PaInput::setAppName(const char *name)
{
if(name != nullptr) {
app_name = name;
}
}
and change back the prop getters to be used like this
p->setAppName(pa_proplist_gets(info->proplist, PA_PROP_APPLICATION_NAME));
I can't test it now since i'm at work, and I only have OSX here.
from ncpamixer.
Related Issues (20)
- Option to disable live vu-meter feature HOT 8
- Pseudographics is shown as letters HOT 20
- 1.3.3.1 and master segfault, 1.3.3 is fine HOT 4
- ncpamixer crashes when module-loopback is loaded HOT 8
- Two tabs on one? HOT 1
- Build error: ‘BUTTON5_PRESSED’ was not declared in this scope HOT 5
- NCurses utf8 chars not working HOT 2
- error: variable 'toggle_len' set but not used [-Werror,-Wunused-but-set-variable]
- SIGSEGV When selecting new track in VLC HOT 1
- new tag release HOT 1
- Assertion 'c' failed at pulse/context.c:1055, function void pa_context_disconnect(pa_context *)(). Aborting. HOT 5
- Volume can go up to infinity HOT 1
- ncpamixer crashes with EQ enabled
- SIGSEGV when firefox play/pauses HOT 3
- The popup menu displays black characters HOT 1
- Change mousewheel scroll behaviour on volumes from set to increment/decrement HOT 2
- Assertion 'c' failed at pulse/context.c:1055, function void pa_context_disconnect(pa_context *)(). Aborting. HOT 4
- SEGV when XDG_CONFIG_HOME isn't set HOT 2
- change default opening view HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ncpamixer.