Audio4Linux / JDSP4Linux

An audio effect processor for PipeWire and PulseAudio clients
GNU General Public License v3.0
915 stars 35 forks source link

Crash on latest JamesDSP with PipeWire #123

Closed rndtrash closed 9 months ago

rndtrash commented 1 year ago

Got a weird crash on the latest JamesDSP:

Thread 1 "jamesdsp" received signal SIGSEGV, Segmentation fault.
0x0000555555976bc5 in ArbitraryEqString2SortedNodes (arbEq=arbEq@entry=0x7fffe87e9b40, 
    frArbitraryEqString=frArbitraryEqString@entry=0x5555574747d8 "GraphicEQ: 20 -5.9; 21 -6; 22 -6.1; 23 -6.2; 24 -6.3; 26 -6.4; 27 -6.4; 29 -6.5; 30 -6.6; 32 -6.7; 34 -6.8; 36 -6.8; 38 -6.9; 40 -7; 43 -7.1; 45 -7.2; 48 -7.4; 50 -7.5; 53 -7.6; 56 -7.8; 59 -7.9; 63 -"...)
    at ../../libjamesdsp/subtree/Main/libjamesdsp/jni/jamesdsp/jdsp/generalDSP/ArbFIRGen.c:263
263                 nodes[i]->freq = val;
(gdb) bt
#0  0x0000555555976bc5 in ArbitraryEqString2SortedNodes
    (arbEq=arbEq@entry=0x7fffe87e9b40, frArbitraryEqString=frArbitraryEqString@entry=0x5555574747d8 "GraphicEQ: 20 -5.9; 21 -6; 22 -6.1; 23 -6.2; 24 -6.3; 26 -6.4; 27 -6.4; 29 -6.5; 30 -6.6; 32 -6.7; 34 -6.8; 36 -6.8; 38 -6.9; 40 -7; 43 -7.1; 45 -7.2; 48 -7.4; 50 -7.5; 53 -7.6; 56 -7.8; 59 -7.9; 63 -"...)
    at ../../libjamesdsp/subtree/Main/libjamesdsp/jni/jamesdsp/jdsp/generalDSP/ArbFIRGen.c:263
#1  0x0000555555901595 in ArbitraryResponseEqualizerStringParser
    (jdsp=0x7fffe8642010, stringEq=0x5555574747d8 "GraphicEQ: 20 -5.9; 21 -6; 22 -6.1; 23 -6.2; 24 -6.3; 26 -6.4; 27 -6.4; 29 -6.5; 30 -6.6; 32 -6.7; 34 -6.8; 36 -6.8; 38 -6.9; 40 -7; 43 -7.1; 45 -7.2; 48 -7.4; 50 -7.5; 53 -7.6; 56 -7.8; 59 -7.9; 63 -"...) at ../../libjamesdsp/subtree/Main/libjamesdsp/jni/jamesdsp/jdsp/Effects/arbEqConv.c:27
#2  0x00005555556fd350 in DspHost::updateGraphicEq(DspConfig*) (this=0x555556ad8630, config=0x555556465380 <DspConfig::instance(bool)::_instance>) at ../../src/audio/base/DspHost.cpp:400
#3  0x00005555556fe145 in DspHost::update(DspConfig*, bool) (this=0x555556ad8630, config=0x555556465380 <DspConfig::instance(bool)::_instance>, ignoreCache=false)
    at ../../src/audio/base/DspHost.cpp:637
#4  0x000055555571a278 in PipewireAudioService::update(DspConfig*) (this=0x5555567e71a0, config=0x555556465380 <DspConfig::instance(bool)::_instance>)
    at ../../src/audio/pipewire/PipewireAudioService.cpp:134
#5  0x00005555558aa1c1 in QtPrivate::FunctorCall<QtPrivate::IndexesList<0>, QtPrivate::List<DspConfig*>, void, void (IAudioService::*)(DspConfig*)>::call(void (IAudioService::*)(DspConfig*), IAudioService*, void**) (f=&virtual table offset 96, o=0x5555567e71a0, arg=0x7fffffffc3d0) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:152
#6  0x00005555558a96fb in QtPrivate::FunctionPointer<void (IAudioService::*)(DspConfig*)>::call<QtPrivate::List<DspConfig*>, void>(void (IAudioService::*)(DspConfig*), IAudioService*, void**) (f=&virtual table offset 96, o=0x5555567e71a0, arg=0x7fffffffc3d0) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:185
#7  0x00005555558a7d53 in QtPrivate::QSlotObject<void (IAudioService::*)(DspConfig*), QtPrivate::List<DspConfig*>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*)
    (which=1, this_=0x555556af6530, r=0x5555567e71a0, a=0x7fffffffc3d0, ret=0x0) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:418
#8  0x00007ffff66f39af in QtPrivate::QSlotObjectBase::call(QObject*, void**) (a=0x7fffffffc3d0, r=0x5555567e71a0, this=0x555556af6530)
    at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#9  doActivate<false>(QObject*, int, void**) (sender=0x555556465380 <DspConfig::instance(bool)::_instance>, signal_index=4, argv=0x7fffffffc3d0) at kernel/qobject.cpp:3923
#10 0x00005555558f3ddc in DspConfig::updated(DspConfig*) (this=0x555556465380 <DspConfig::instance(bool)::_instance>, _t1=0x555556465380 <DspConfig::instance(bool)::_instance>)
    at moc_DspConfig.cpp:333
#11 0x0000555555700b4a in DspConfig::load() (this=0x555556465380 <DspConfig::instance(bool)::_instance>) at ../../src/config/DspConfig.h:242
#12 0x000055555588544d in MainWindow::MainWindow(bool, QWidget*) (this=0x5555566cdbe0, statupInTray=false, parent=0x0) at ../../src/MainWindow.cpp:257
#13 0x00005555558ad7dd in initGui(bool, bool) (launchInTray=false, watchConfig=false) at ../../src/main.cpp:110
#14 0x00005555558afbad in main(int, char**) (argc=1, argv=0x7fffffffdcd8) at ../../src/main.cpp:294

I'm using PipeWire 0.3.65 on Ubuntu 23.04

My configs: jamesdsp.zip

rndtrash commented 1 year ago

Update: moving any node on Graphic EQ crashes the program.

GaborSzajkoTelio commented 11 months ago

it crashes on my machine too.

GaborSzajkoTelio commented 11 months ago

I found the issue, my locale settings uses comma as a decimal separator. get_floatArb function uses strtof function to parse EQ settings, which is locale dependent. In my case it causes a crash....I'm working on the fix..

MamaLilla2022 commented 9 months ago

I have this issue too when using Fedora 39 with german language. As soon as i switch to US which uses dot a a decimal separator instead of a comma it works. Any updates regarding a fix?

Too further test this i used the graphical eq with full numbers only and it works fine but as soon as i set fractional numbers with a dot decimal separator it crashes as soon as the equalizer is active.

timschneeb commented 9 months ago

Any updates regarding a fix?

Yes, this should have been fixed recently. However, there hasn't been a stable release since then yet. I'm planning to create a new stable release within the next week, but I still need to make some more changes.

You can already use the app with the bugfix if you compile the app from the master branch. Or for Arch distros, you can also install the jamesdsp-git package from the AUR to get the latest bleeding-edge version.

MamaLilla2022 commented 9 months ago

Thanks for the very quick reply and your help. I think i can wait this few days for now i just use us language profile with some tweaks.

And especially thank you for this great piece of software :-)

player0k commented 9 months ago

Jamesdsp crash

$ jamesdsp -v jamesdsp 2.6.1-15-g243ad9f (Pipewire flavor)

:58:57.109] [DBG] AppConfig::isAppBlocked: Google Chrome is not blocked
[19:58:57.109] [DBG] PwPipelineManager::on_metadata_property: new metadata property: 76, target.node, Spa:Id, 89
[19:58:57.109] [DBG] PwPipelineManager::on_metadata_property: new metadata property: 76, target.object, Spa:Id, 99
[19:58:57.112] [DBG] PwPipelineManager::on_metadata_property: new metadata property: 76, target.node, Spa:Id, 111
[19:58:57.113] [DBG] PwPipelineManager::on_metadata_property: new metadata property: 76, target.object, Spa:Id, 344
[19:58:57.128] [DBG] PwPipelineManager::on_registry_global: Google Chrome port 75 is connected to jamesdsp_sink port 116
[19:58:57.128] [DBG] PwPipelineManager::on_registry_global: Google Chrome port 71 is connected to jamesdsp_sink port 109
[19:59:16.998] [DBG] PwPipelineManager::on_destroy_node_proxy: Stream/Output/Audio 133 Google Chrome has been removed
[19:59:37.224] [DBG] PwPipelineManager::on_registry_global: Stream/Output/Audio 133 Google Chrome with serial 385 has been added
[19:59:37.227] [DBG] AppConfig::isAppBlocked: Google Chrome is not blocked
[19:59:37.230] [DBG] PwPipelineManager::on_metadata_property: new metadata property: 133, target.node, Spa:Id, 111
[19:59:37.230] [DBG] PwPipelineManager::on_metadata_property: new metadata property: 133, target.object, Spa:Id, 344
[19:59:37.243] [DBG] PwPipelineManager::on_registry_global: Google Chrome port 121 is connected to jamesdsp_sink port 116
[19:59:37.244] [DBG] PwPipelineManager::on_registry_global: Google Chrome port 115 is connected to jamesdsp_sink port 109
[19:59:49.237] [DBG] PwPipelineManager::on_destroy_node_proxy: Stream/Output/Audio 76 Google Chrome has been removed
[20:04:50.601] [DBG] PwPipelineManager::on_destroy_node_proxy: Stream/Output/Audio 133 Google Chrome has been removed
[20:04:56.119] [DBG] FilterContainer::on_link_changed::<lambda>: No app linked to our device wants to play. Unlinking our filters.
[20:04:56.120] [DBG] FilterContainer::disconnect_filters: disconnecting the JamesDsp filter from PipeWire
[20:08:32.203] [DBG] PwPipelineManager::on_registry_global: Stream/Output/Audio 72 Google Chrome with serial 391 has been added
[20:08:32.205] [DBG] AppConfig::isAppBlocked: Google Chrome is not blocked
[20:08:32.207] [DBG] PwPipelineManager::on_metadata_property: new metadata property: 72, target.node, Spa:Id, 111
[20:08:32.214] [DBG] PwPipelineManager::on_metadata_property: new metadata property: 72, target.node, Spa:Id, 89
[20:08:32.215] [DBG] PwPipelineManager::on_metadata_property: new metadata property: 72, target.object, Spa:Id, 99
[20:08:32.215] [DBG] PwPipelineManager::on_metadata_property: new metadata property: 72, target.node, Spa:Id, 111
[20:08:32.215] [DBG] PwPipelineManager::on_metadata_property: new metadata property: 72, target.object, Spa:Id, 344
[20:08:32.219] [DBG] PwPipelineManager::on_registry_global: Google Chrome port 138 is connected to jamesdsp_sink port 116
[20:08:32.220] [DBG] PwPipelineManager::on_registry_global: Google Chrome port 83 is connected to jamesdsp_sink port 109
[20:08:32.220] [DBG] FilterContainer::on_link_changed: At least one app linked to our device wants to play. Linking our filters.
[20:08:32.225] [DBG] PwBasePlugin::connect_to_pw: @PwJamesDspPlugin: JamesDsp successfully connected to PipeWire graph
[20:10:01.577] [DBG] PwPipelineManager::on_destroy_node_proxy: Stream/Output/Audio 72 Google Chrome has been removed
[20:10:07.119] [DBG] FilterContainer::on_link_changed::<lambda>: No app linked to our device wants to play. Unlinking our filters.
[20:10:07.120] [DBG] FilterContainer::disconnect_filters: disconnecting the JamesDsp filter from PipeWire
[20:10:24.404] [DBG] PwPipelineManager::on_registry_global: Stream/Output/Audio 133 Google Chrome with serial 406 has been added
[20:10:24.407] [DBG] AppConfig::isAppBlocked: Google Chrome is not blocked
[20:10:24.409] [DBG] PwPipelineManager::on_metadata_property: new metadata property: 133, target.node, Spa:Id, 111
[20:10:24.412] [DBG] PwPipelineManager::on_metadata_property: new metadata property: 133, target.node, Spa:Id, 89
[20:10:24.412] [DBG] PwPipelineManager::on_metadata_property: new metadata property: 133, target.object, Spa:Id, 99
[20:10:24.413] [DBG] PwPipelineManager::on_metadata_property: new metadata property: 133, target.node, Spa:Id, 111
[20:10:24.413] [DBG] PwPipelineManager::on_metadata_property: new metadata property: 133, target.object, Spa:Id, 344
[20:10:24.422] [DBG] PwPipelineManager::on_registry_global: Google Chrome port 134 is connected to jamesdsp_sink port 116
[20:10:24.422] [DBG] PwPipelineManager::on_registry_global: Google Chrome port 81 is connected to jamesdsp_sink port 109
[20:10:24.430] [DBG] FilterContainer::on_link_changed: At least one app linked to our device wants to play. Linking our filters.
[20:10:24.433] [DBG] PwBasePlugin::connect_to_pw: @PwJamesDspPlugin: JamesDsp successfully connected to PipeWire graph
[20:10:24.461] [DBG] PwPipelineManager::on_registry_global: Stream/Output/Audio 76 Google Chrome with serial 421 has been added
[20:10:24.464] [DBG] AppConfig::isAppBlocked: Google Chrome is not blocked
[20:10:24.466] [DBG] PwPipelineManager::on_metadata_property: new metadata property: 76, target.node, Spa:Id, 111
[20:10:24.467] [DBG] PwPipelineManager::on_metadata_property: new metadata property: 76, target.object, Spa:Id, 344
[20:10:24.477] [DBG] PwPipelineManager::on_registry_global: Google Chrome port 71 is connected to easyeffects_sink port 91
[20:10:24.477] [DBG] PwPipelineManager::on_registry_global: Google Chrome port 82 is connected to easyeffects_sink port 93
[20:10:24.482] [DBG] PwPipelineManager::on_registry_global: Google Chrome port 71 is connected to jamesdsp_sink port 116
[20:10:24.483] [DBG] PwPipelineManager::on_registry_global: Google Chrome port 82 is connected to jamesdsp_sink port 109
zsh: killed     jamesdsp
timschneeb commented 9 months ago

The fix for GraphicEQ crash is now included in the latest stable version: https://github.com/Audio4Linux/JDSP4Linux/releases/tag/2.7.0