wwmm / easyeffects

Limiter, compressor, convolver, equalizer and auto volume and many other plugins for PipeWire applications
GNU General Public License v3.0
6.64k stars 270 forks source link

Easyeffects crashes on launch #1606

Closed shard77 closed 2 years ago

shard77 commented 2 years ago

Hey, I installed easyeffects 2 days ago, and it worked fine. Today, I started to launch it, and it instantly crashes. I am on Arch Linux; Plasma KDE; Kwin.

Here are the logs:

(process:10683): easyeffects-DEBUG: 11:54:48.341:   easyeffects.cpp:35  easyeffects version: 6.2.6
(process:10683): easyeffects-DEBUG: 11:54:48.342:   easyeffects.cpp:45  locale directory: /usr/share/locale

(easyeffects:10683): Gtk-WARNING **: 11:54:48.342: Locale not supported by C library.
    Using the fallback 'C' locale.
(easyeffects:10683): easyeffects-DEBUG: 11:54:48.343:   presets_manager.cpp:72  system input presets directory: "/etc/easyeffects/input"; 
(easyeffects:10683): easyeffects-DEBUG: 11:54:48.343:   presets_manager.cpp:72  system input presets directory: "/etc/xdg/easyeffects/input"; 
(easyeffects:10683): easyeffects-DEBUG: 11:54:48.343:   presets_manager.cpp:72  system input presets directory: "/home/shard/.config/kdedefaults/easyeffects/input"; 
(easyeffects:10683): easyeffects-DEBUG: 11:54:48.343:   presets_manager.cpp:75  system output presets directory: "/etc/easyeffects/output"; 
(easyeffects:10683): easyeffects-DEBUG: 11:54:48.343:   presets_manager.cpp:75  system output presets directory: "/etc/xdg/easyeffects/output"; 
(easyeffects:10683): easyeffects-DEBUG: 11:54:48.343:   presets_manager.cpp:75  system output presets directory: "/home/shard/.config/kdedefaults/easyeffects/output"; 
(easyeffects:10683): easyeffects-DEBUG: 11:54:48.343:   presets_manager.cpp:215 user presets directory already exists: /home/shard/.config/easyeffects/
(easyeffects:10683): easyeffects-DEBUG: 11:54:48.343:   presets_manager.cpp:215 user presets directory already exists: /home/shard/.config/easyeffects/input
(easyeffects:10683): easyeffects-DEBUG: 11:54:48.343:   presets_manager.cpp:215 user presets directory already exists: /home/shard/.config/easyeffects/output
(easyeffects:10683): easyeffects-DEBUG: 11:54:48.343:   presets_manager.cpp:215 user presets directory already exists: /home/shard/.config/easyeffects/autoload/input
(easyeffects:10683): easyeffects-DEBUG: 11:54:48.343:   presets_manager.cpp:215 user presets directory already exists: /home/shard/.config/easyeffects/autoload/output

(easyeffects:10683): Adwaita-WARNING **: 11:54:48.411: Using GtkSettings:gtk-application-prefer-dark-theme with libadwaita is unsupported. Please use AdwStyleManager:color-scheme instead.
(easyeffects:10683): easyeffects-DEBUG: 11:54:48.434:   pipe_manager.cpp:1388   compiled with PipeWire: 0.3.52
(easyeffects:10683): easyeffects-DEBUG: 11:54:48.434:   pipe_manager.cpp:1389   linked to PipeWire: 0.3.52
(easyeffects:10683): easyeffects-DEBUG: 11:54:48.438:   pipe_manager.cpp:1356   core version: 0.3.52
(easyeffects:10683): easyeffects-DEBUG: 11:54:48.438:   pipe_manager.cpp:1357   core name: pipewire-0
(easyeffects:10683): easyeffects-DEBUG: 11:54:48.438:   pipe_manager.cpp:1270   found metadata: settings
(easyeffects:10683): easyeffects-DEBUG: 11:54:48.438:   pipe_manager.cpp:1270   found metadata: default
(easyeffects:10683): easyeffects-DEBUG: 11:54:48.438:   pipe_manager.cpp:1270   found metadata: route-settings
(easyeffects:10683): easyeffects-DEBUG: 11:54:48.438:   pipe_manager.cpp:1125   Audio/Sink 60 alsa_output.usb-Focusrite_Scarlett_2i4_USB-00.analog-surround-40 with serial 65 has been added
(easyeffects:10683): easyeffects-DEBUG: 11:54:48.438:   pipe_manager.cpp:1125   Audio/Source 61 alsa_input.usb-Focusrite_Scarlett_2i4_USB-00.analog-stereo with serial 66 has been added
(easyeffects:10683): easyeffects-DEBUG: 11:54:48.438:   pipe_manager.cpp:1125   Audio/Sink 62 alsa_output.usb-Burr-Brown_from_TI_USB_Audio_CODEC-00.analog-stereo-output with serial 67 has been added
(easyeffects:10683): easyeffects-DEBUG: 11:54:48.438:   pipe_manager.cpp:1125   Audio/Source 63 alsa_input.usb-Burr-Brown_from_TI_USB_Audio_CODEC-00.analog-stereo-input with serial 68 has been added
(easyeffects:10683): easyeffects-DEBUG: 11:54:48.438:   pipe_manager.cpp:1125   Audio/Sink 59 alsa_output.pci-0000_0a_00.1.hdmi-stereo with serial 939 has been added
(easyeffects:10683): easyeffects-DEBUG: 11:54:48.438:   pipe_manager.cpp:1125   Audio/Sink 121 easyeffects_sink with serial 1038 has been added
(easyeffects:10683): easyeffects-DEBUG: 11:54:48.438:   pipe_manager.cpp:1125   Audio/Source/Virtual 109 easyeffects_source with serial 1039 has been added
(easyeffects:10683): easyeffects-DEBUG: 11:54:48.438:   pipe_manager.cpp:879    new metadata property: 0, default.audio.sink, Spa:String:JSON, {"name":"alsa_output.usb-Focusrite_Scarlett_2i4_USB-00.analog-surround-40"}
(easyeffects:10683): easyeffects-DEBUG: 11:54:48.438:   pipe_manager.cpp:879    new metadata property: 0, default.audio.source, Spa:String:JSON, {"name":"alsa_input.usb-Focusrite_Scarlett_2i4_USB-00.analog-stereo"}
(easyeffects:10683): easyeffects-DEBUG: 11:54:48.439:   pipe_manager.cpp:1477   easyeffects_sink node successfully retrieved with id 121 and serial 1038
(easyeffects:10683): easyeffects-DEBUG: 11:54:48.439:   pipe_manager.cpp:1482   easyeffects_source node successfully retrieved with id 109 and serial 1039

(easyeffects:10683): easyeffects-WARNING **: 11:54:48.455:  lv2_wrapper.cpp:65  Could not find the plugin: http://drobilla.net/plugins/mda/Loudness
(easyeffects:10683): easyeffects-DEBUG: 11:54:48.455:   bass_loudness.cpp:29    soe: http://drobilla.net/plugins/mda/Loudness is not installed

(easyeffects:10683): easyeffects-WARNING **: 11:54:48.455:  lv2_wrapper.cpp:353 http://drobilla.net/plugins/mda/Loudness port symbol not found: loudness

(easyeffects:10683): easyeffects-WARNING **: 11:54:48.455:  lv2_wrapper.cpp:353 http://drobilla.net/plugins/mda/Loudness port symbol not found: output

(easyeffects:10683): easyeffects-WARNING **: 11:54:48.455:  lv2_wrapper.cpp:353 http://drobilla.net/plugins/mda/Loudness port symbol not found: link
(easyeffects:10683): easyeffects-DEBUG: 11:54:48.463:   lv2_wrapper.cpp:100 http://lsp-plug.in/plugins/lv2/sc_compressor_stereo requires feature: http://lv2plug.in/ns/ext/urid#map
(easyeffects:10683): easyeffects-DEBUG: 11:54:48.480:   lv2_wrapper.cpp:100 http://lsp-plug.in/plugins/lv2/comp_delay_x2_stereo requires feature: http://lv2plug.in/ns/ext/urid#map
(easyeffects:10683): easyeffects-DEBUG: 11:54:48.505:   lv2_wrapper.cpp:100 http://lsp-plug.in/plugins/lv2/para_equalizer_x32_lr requires feature: http://lv2plug.in/ns/ext/urid#map
(easyeffects:10683): easyeffects-DEBUG: 11:54:48.543:   lv2_wrapper.cpp:100 http://lsp-plug.in/plugins/lv2/sc_limiter_stereo requires feature: http://lv2plug.in/ns/ext/urid#map
(easyeffects:10683): easyeffects-DEBUG: 11:54:48.551:   lv2_wrapper.cpp:100 http://lsp-plug.in/plugins/lv2/loud_comp_stereo requires feature: http://lv2plug.in/ns/ext/urid#map

(easyeffects:10683): easyeffects-WARNING **: 11:54:48.558:  lv2_wrapper.cpp:65  Could not find the plugin: urn:zamaudio:ZaMaximX2
(easyeffects:10683): easyeffects-DEBUG: 11:54:48.558:   maximizer.cpp:29    soe: urn:zamaudio:ZaMaximX2 is not installed

(easyeffects:10683): easyeffects-WARNING **: 11:54:48.558:  lv2_wrapper.cpp:353 urn:zamaudio:ZaMaximX2 port symbol not found: thresh

(easyeffects:10683): easyeffects-WARNING **: 11:54:48.558:  lv2_wrapper.cpp:353 urn:zamaudio:ZaMaximX2 port symbol not found: ceil

(easyeffects:10683): easyeffects-WARNING **: 11:54:48.559:  lv2_wrapper.cpp:353 urn:zamaudio:ZaMaximX2 port symbol not found: rel
(easyeffects:10683): easyeffects-DEBUG: 11:54:48.573:   lv2_wrapper.cpp:100 http://lsp-plug.in/plugins/lv2/sc_mb_compressor_stereo requires feature: http://lv2plug.in/ns/ext/urid#map
(easyeffects:10683): easyeffects-DEBUG: 11:54:48.591:   rnnoise.cpp:274 soe: rnnoise using the default model
(easyeffects:10683): easyeffects-DEBUG: 11:54:48.602:   plugin_base.cpp:268 soe: output_level successfully connected to PipeWire graph
(easyeffects:10683): easyeffects-DEBUG: 11:54:48.603:   plugin_base.cpp:268 soe: spectrum successfully connected to PipeWire graph

(easyeffects:10683): easyeffects-WARNING **: 11:54:48.620:  lv2_wrapper.cpp:65  Could not find the plugin: http://drobilla.net/plugins/mda/Loudness
(easyeffects:10683): easyeffects-DEBUG: 11:54:48.620:   bass_loudness.cpp:29    sie: http://drobilla.net/plugins/mda/Loudness is not installed

(easyeffects:10683): easyeffects-WARNING **: 11:54:48.620:  lv2_wrapper.cpp:353 http://drobilla.net/plugins/mda/Loudness port symbol not found: loudness

(easyeffects:10683): easyeffects-WARNING **: 11:54:48.620:  lv2_wrapper.cpp:353 http://drobilla.net/plugins/mda/Loudness port symbol not found: output

(easyeffects:10683): easyeffects-WARNING **: 11:54:48.620:  lv2_wrapper.cpp:353 http://drobilla.net/plugins/mda/Loudness port symbol not found: link
(easyeffects:10683): easyeffects-DEBUG: 11:54:48.628:   lv2_wrapper.cpp:100 http://lsp-plug.in/plugins/lv2/sc_compressor_stereo requires feature: http://lv2plug.in/ns/ext/urid#map
(easyeffects:10683): easyeffects-DEBUG: 11:54:48.645:   lv2_wrapper.cpp:100 http://lsp-plug.in/plugins/lv2/comp_delay_x2_stereo requires feature: http://lv2plug.in/ns/ext/urid#map
(easyeffects:10683): easyeffects-DEBUG: 11:54:48.671:   lv2_wrapper.cpp:100 http://lsp-plug.in/plugins/lv2/para_equalizer_x32_lr requires feature: http://lv2plug.in/ns/ext/urid#map
(easyeffects:10683): easyeffects-DEBUG: 11:54:48.708:   lv2_wrapper.cpp:100 http://lsp-plug.in/plugins/lv2/sc_limiter_stereo requires feature: http://lv2plug.in/ns/ext/urid#map
(easyeffects:10683): easyeffects-DEBUG: 11:54:48.717:   lv2_wrapper.cpp:100 http://lsp-plug.in/plugins/lv2/loud_comp_stereo requires feature: http://lv2plug.in/ns/ext/urid#map

(easyeffects:10683): easyeffects-WARNING **: 11:54:48.724:  lv2_wrapper.cpp:65  Could not find the plugin: urn:zamaudio:ZaMaximX2
(easyeffects:10683): easyeffects-DEBUG: 11:54:48.724:   maximizer.cpp:29    sie: urn:zamaudio:ZaMaximX2 is not installed

(easyeffects:10683): easyeffects-WARNING **: 11:54:48.724:  lv2_wrapper.cpp:353 urn:zamaudio:ZaMaximX2 port symbol not found: thresh

(easyeffects:10683): easyeffects-WARNING **: 11:54:48.724:  lv2_wrapper.cpp:353 urn:zamaudio:ZaMaximX2 port symbol not found: ceil

(easyeffects:10683): easyeffects-WARNING **: 11:54:48.724:  lv2_wrapper.cpp:353 urn:zamaudio:ZaMaximX2 port symbol not found: rel
(easyeffects:10683): easyeffects-DEBUG: 11:54:48.738:   lv2_wrapper.cpp:100 http://lsp-plug.in/plugins/lv2/sc_mb_compressor_stereo requires feature: http://lv2plug.in/ns/ext/urid#map
(easyeffects:10683): easyeffects-DEBUG: 11:54:48.756:   rnnoise.cpp:274 sie: rnnoise using the default model
(easyeffects:10683): easyeffects-DEBUG: 11:54:48.765:   plugin_base.cpp:268 sie: output_level successfully connected to PipeWire graph
(easyeffects:10683): easyeffects-DEBUG: 11:54:48.766:   plugin_base.cpp:268 sie: spectrum successfully connected to PipeWire graph
(easyeffects:10683): easyeffects-DEBUG: 11:54:48.846:   plugin_base.cpp:268 sie: bass_enhancer successfully connected to PipeWire graph
(easyeffects:10683): easyeffects-DEBUG: 11:54:48.848:   plugin_base.cpp:268 sie: gate successfully connected to PipeWire graph
easyeffects-INFO: 11:54:48.852:     application.cpp:48  disabling global bypass
(easyeffects:10683): easyeffects-DEBUG: 11:54:48.868:   application_ui.cpp:82   Icon Theme Nordic-darker detected
locale::facet::_S_create_c_locale name not valid
wwmm commented 2 years ago

locale::facet::_S_create_c_locale name not valid

I wonder why... @shard77 what is the output of the command locale in your system?

shard77 commented 2 years ago

@wwmm This may be the problem:

locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=fr_FR.UTF-8
LC_CTYPE=C.UTF-8
LC_NUMERIC="fr_FR.UTF-8"
LC_TIME=fr_FR.UTF-8
LC_COLLATE="fr_FR.UTF-8"
LC_MONETARY="fr_FR.UTF-8"
LC_MESSAGES="fr_FR.UTF-8"
LC_PAPER="fr_FR.UTF-8"
LC_NAME="fr_FR.UTF-8"
LC_ADDRESS="fr_FR.UTF-8"
LC_TELEPHONE="fr_FR.UTF-8"
LC_MEASUREMENT="fr_FR.UTF-8"
LC_IDENTIFICATION="fr_FR.UTF-8"
LC_ALL=
wwmm commented 2 years ago

With the exception of

locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory

things seem fine. @Digitalone1 do you remember what happens if a function throws an exception inside the catch block? https://github.com/wwmm/easyeffects/blob/45fd65b4a47a396de18fdaa6880ccbe4cf299c30/src/ui_helpers.cpp#L26

I have the feeling we should redesign this part of the code in a way we can catch the exception when the system is unable to provide the default C locale. Based on some google searches this kind of thing can actually happen... As unexpected as it seems...

wwmm commented 2 years ago

if a function throws an exception inside the catch block

We probably should not be doing that unless we put another try/catch there.

wwmm commented 2 years ago

@shard77 try to install EasyEffects through the AUR package so you can test a workaround for the crash I have just sent to our master branch. It won't fix the problems your system has in its default locale. But hopefully we won't crash anymore.

Digitalone1 commented 2 years ago

@shard77 this should be an issue related to your system locale. Are you sure you set it properly?

Try to follow the instructions here.

Did you decomment the right locale in locale.gen? Did you generate the locale properly?

You should'n have messages like this:

Cannot set LC_ALL to default locale: No such file or directory
shard77 commented 2 years ago

@wwmm thanks, I'll install it trough the AUR. To answer your question @Digitalone1, yes I generated it correctly, and to make sure, I even repeated the process. image

As you can see earlier in the conversation, my LC_ALL isn't set, could this be the problem?

Yesterday, I accidentally deleted over 264 librairies, I managed to reinstall them all (Only 2 libs weren't found), this could maybe be the problem.

wwmm commented 2 years ago

As you can see earlier in the conversation, my LC_ALL isn't set, could this be the problem?

It isn't set on my computer too. Something else is causing these warnings you have in your computer.

shard77 commented 2 years ago

Installed the AUR, same problem:

❯ easyeffects                                                                                                                                                         20:01:04

(easyeffects:17604): Gtk-WARNING **: 20:01:06.474: Locale not supported by C library.
    Using the fallback 'C' locale.

(easyeffects:17604): Adwaita-WARNING **: 20:01:06.540: Using GtkSettings:gtk-application-prefer-dark-theme with libadwaita is unsupported. Please use AdwStyleManager:color-scheme instead.
locale::facet::_S_create_c_locale name not valid

I just double checked everything: My locale.conf file is set to : LANG=en_US.UTF-8 I ran the command localectl set-locale LANG=en_US.UTF-8 And the en_US.UTF-8 is uncommented in my locale.gen file. I ran locale-gen again to make sure it's applying, still doesn't work.

wwmm commented 2 years ago

In this case the crash about locale::facet::_S_create_c_locale name not valid is not happening where I thought it was. If it was an additional warning message I added in the last commits should have been shown.

wwmm commented 2 years ago

What is the output of locale -a?

shard77 commented 2 years ago

The output is:

❯ locale -a                                                                                                                                                           20:20:31
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_COLLATE to default locale: No such file or directory
C
C.UTF-8
POSIX
en_US.utf8

Additionally, these were the few things that couldn't get installed when I reinstalled my libs:

error: target not found: libavc94
error: target not found: libraw94 
error: target not found: mpg3 
error: target not found: lib32-mpg3 
error: target not found: yabridge-bin

Maybe this is what causes the problems?

Digitalone1 commented 2 years ago

Yesterday, I accidentally deleted over 264 librairies, I managed to reinstall them all (Only 2 libs weren't found), this could maybe be the problem.

That should be the problem. It seems you have issues at system libraries.

wwmm commented 2 years ago

That should be the problem. It seems you have issues at system libraries.

Only now that you mentioned it that I saw this part of the comment. Holy... Something is definitely broken in this system... But I still would like to understand why we are still crashing. It clearly isn't because we are trying to create a C locale. Could it be that the crash is inside GTK?

shard77 commented 2 years ago

Yeah, I think I need to reset my computer, is there any way to reinstall these things? I tried searching them up, but it seems there is pretty much no result. @wwmm I don't think there is issue with easyeffects, the libs that were deleted just made everything messed up.

wwmm commented 2 years ago

I don't think there is issue with easyeffects, the libs that were deleted just made everything messed up.

The source of the crash is definitely a broken system library. But do not understand why this locale failure isn't being ignored when we try to initialize. Looking at our code it feels like it should be. Maybe the fact GTK tries to set the user locale in the application is the reason why we are crashing. In this case there is nothing I can do.

shard77 commented 2 years ago

Yep, I think there is no other choice than resetting my system 🥲 Thanks for your time and help, have a nice day/evening!

wwmm commented 2 years ago

Yep, I think there is no other choice than resetting my system smiling_face_with_tear Thanks for your time and help, have a nice day/evening!

Good Luck! I will close this issue. If it is still happens after a fresh install feel free to reopen it.

aarproducoes commented 2 years ago

Hi! I have the same issue here. My system is working perfectly and flatpak updates are all ok.

image

image

image

image

vchernin commented 2 years ago

@aarproducoes Just to be clear flatpak update does not complain about anything?

wwmm commented 2 years ago

@aarproducoes also try to get some logs as explained in the Basic Logs section of https://github.com/wwmm/easyeffects/wiki/Reporting-Bugs.

aarproducoes commented 2 years ago

@aarproducoes Just to be clear flatpak update does not complain about anything?

image

aarproducoes commented 2 years ago

@aarproducoes also try to get some logs as explained in the Basic Logs section of https://github.com/wwmm/easyeffects/wiki/Reporting-Bugs.

alright, thanks

Digitalone1 commented 2 years ago

We need something to reproduce this. At the moment it's happening to two users using Plasma and Mate. Me and @wwmm always test on Gnome and never happened. Could it be something related to desktop environment?

@shard77 could you test the previous 6.2.5 version to see if it's reproducible?

aarproducoes commented 2 years ago

@aarproducoes also try to get some logs as explained in the Basic Logs section of https://github.com/wwmm/easyeffects/wiki/Reporting-Bugs.

  1. Ubuntu Mate 22.04 LTS

  2. Installed by: $flatpak install --user flathub com.github.wwmm.easyeffects

  3. Debug Mode Log: attached

  4. PipeWire Dump: attached

  5. PulseAudio Volume Controls Screenshots image image image image image

03.easyeffects_flatpak-debug.txt 04.pipewire dump.txt

wwmm commented 2 years ago

@aarproducoes you logs stop at the same place the one from @shard77. Searching on google this is the kind of crash that can happen for different reasons... I wonder if the workaround suggested here https://github.com/void-linux/void-packages/issues/18659 has any effect in our case. Does launching the application with LANG=C before the command makes any difference?

aarproducoes commented 2 years ago

@aarproducoes you logs stop at the same place the one from @shard77. Searching on google this is the kind of crash that can happen for different reasons... I wonder if the workaround suggested here void-linux/void-packages#18659 has any effect in our case. Does launching the application with LANG=C before the command makes any difference?

Same error.

image

Digitalone1 commented 2 years ago

I wonder if the workaround suggested here void-linux/void-packages#18659 has any effect in our case.

So Void Linux is patching standard C++ library because it has issues with locales? But if it has issues, why only some people are affected by this problem?

And since it's happening with C locale, will it occur also if we had a GUI locale undependent (I mean not trying to set the locale in any way)?

wwmm commented 2 years ago

So Void Linux is patching standard C++ library because it has issues with locales? But if it has issues, why only some people are affected by this problem?

I think that they are using libstdc++ instead of glibc. I think that although we see the same error message in our case it has another source. The only thing I can think of would be https://github.com/wwmm/easyeffects/commit/e79608a0c0646974221dd8de80ea928e5f62a9aa. But how it was before the sanatizer was catching an "use after free". So even if that is the reason for the current crash on some systems we can't just go back to how it was before. And based on the test that @shard77 did withthe AUR package using std::locale::classic() isn't the problem because the crash happened before the code had a change to get to the place where we try to set a C locale.

wwmm commented 2 years ago

And since it's happening with C locale, will it occur also if we had a GUI locale undependent (I mean not trying to set the locale in any way)?

I think if it is complaining about something so basic as the C locale even if we stopped supporting locales there would be a problem. What I do not understand is why we do not see this bug... I even tried to force the Brazilian Portuguese language in EasyEffects and nothing unusual happens...

aarproducoes commented 2 years ago

And since it's happening with C locale, will it occur also if we had a GUI locale undependent (I mean not trying to set the locale in any way)?

I think if it is complaining about something so basic as the C locale even if we stopped supporting locales there would be a problem. What I do not understand is why we do not see this bug... I even tried to force the Brazilian Portuguese language in EasyEffects and nothing unusual happens...

Found something...

Workaround: ╭─aarpro@AvellB153 ~ ╰─$ flatpak run --env=LC_ALL=en_US.UTF-8 com.github.wwmm.easyeffects
You have PipeWire 0.3.48 installed This is newer or the same as PipeWire 0.3.41 required to run EasyEffects

The easyeffects open normal.

╭─aarpro@AvellB153 ~ ╰─$ flatpak run --env=LC_ALL=pt_BR.UTF-8 com.github.wwmm.easyeffects
/bin/bash: warning: setlocale: LC_ALL: cannot change locale (pt_BR.UTF-8) You have PipeWire 0.3.48 installed This is newer or the same as PipeWire 0.3.41 required to run EasyEffects

(easyeffects:2): Gtk-WARNING **: 19:50:46.843: Locale not supported by C library. Using the fallback 'C' locale. locale::facet::_S_create_c_locale name not valid

easyeffects error

wwmm commented 2 years ago

flatpak run --env=LC_ALL=en_US.UTF-8 com.github.wwmm.easyeffects

I can't think of a reason why setting LC_ALL=en_US.UTF-8 should be necessary. Specially because in my computer LC_ALL is empty. But I do have en_US.UTF-8 enabled in my locale besides pt_BR.UTF-8. I have my system language in English and Brazilian Portuguese only for numbers. Or in other words LC_NUMERIC=pt_BR.UTF-8.

Something that called my attention is that the warning Gtk-WARNING **: 19:50:46.843: Locale not supported by C library. disappears with the workaround. This warning is coming directly from the GTK library. This reinforces the idea that we are crashing because GTK is crashing.

Digitalone1 commented 2 years ago

@wwmm It's unbelievable but I completely forgot about all those std::locale("") in ftm.format.

They can throw an exception if the system locale is not properly set. This means we should make a try catch statement for all format calls with locales. The crash may happen there while one of the UI labels is being formatted.

It's very tough. I'm starting to think we should get rid of locales. Making exceptions handling on formats is doable, but the code will get uglier, it's already complex now.

I wanted locales because I thought they was better, but they cause lots of issues, maybe it's not worth it. It could be better to use a single format for all users and it's guaranteed to work.

HelpSeeker commented 2 years ago

I receive the same error. Not sure when it started happening. I haven't opened easyeffects since before my upgrade to F36.

The workaround of setting LC_ALL=en_US.UTF-8 explicitly works for me as well.

System: Fedora 36 with GNOME (upgraded from F35) Version: Flatpak (flatpak update doesn't complain about anything) Debug: Log attached Pipewire: Log attached (just in case) Output of locale:

LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC=de_DE.UTF-8
LC_TIME=de_DE.UTF-8
LC_COLLATE="en_US.UTF-8"
LC_MONETARY=de_DE.UTF-8
LC_MESSAGES="en_US.UTF-8"
LC_PAPER=de_DE.UTF-8
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT=de_DE.UTF-8
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

Output of locale -a: Log attached

debug.txt pipewire.txt locale -a.txt

wwmm commented 2 years ago

It's unbelievable but I completely forgot about all those std::locale("") in ftm.format.

Oh... I replaced the old code because the sanatizer was warning me about an use after free that could happen there. For some reason it does not happen if we use std::locale(""). But I totally forgot this thing can throw an exception if the user locale is not properly configured.

wwmm commented 2 years ago

I wanted locales because I thought they was better, but they cause lots of issues, maybe it's not worth it. It could be better to use a single format for all users and it's guaranteed to work.

I am not sure you were the only one wanting locale. At least for people used to programs like LibreOffice it is a natural expectation. So I think we should keep it. Specially after all the effort we put on this.

Digitalone1 commented 2 years ago

I am not sure you were the only one wanting locale. At least for people used to programs like LibreOffice it is a natural expectation. So I think we should keep it. Specially after all the effort we put on this.

So how to handle this in a beauty way? Maybe having a static locale somewhere, initialize it one only time ensuring it really works and provide it anywhere rather than making {try catch} over and over? It's my only option.

wwmm commented 2 years ago

Maybe having a static locale somewhere, initialize it one only time ensuring it really works and provide it anywhere rather than making {try catch} over and over?

I think the try/catch will give less headaches. The reason is that GTK sets the global locale in the way it considers best. If we try to do something like this too we are probably going to overwrite part of what gtk is doing or the other way around. Maybe we should wrap the fmt calls in a function that has the try/catch so we do not have to write them everywhere.

LoonixCube commented 2 years ago

Yep, EasyEffects is completely broken for me and I rely on it entirely for headphone EQ.

At some point this weekend it stopped auto-launching and does not open normally, this popup appears when I click its desktop shortcut:

ksnip

and running the program in konsole throws this big pile of errrors:

(easyeffects:4276): Gtk-WARNING **: 13:52:49.585: Locale not supported by C library.
        Using the fallback 'C' locale.

(easyeffects:4276): Adwaita-WARNING **: 13:52:49.667: Using GtkSettings:gtk-application-prefer-dark-theme with libadwaita is unsupported. Please use AdwStyleManager:color-scheme instead.

(easyeffects:4276): easyeffects-WARNING **: 13:52:49.737:       lv2_wrapper.cpp:65      Could not find the plugin: http://drobilla.net/plugins/mda/Loudness

(easyeffects:4276): easyeffects-WARNING **: 13:52:49.737:       lv2_wrapper.cpp:353     http://drobilla.net/plugins/mda/Loudness port symbol not found: loudness

(easyeffects:4276): easyeffects-WARNING **: 13:52:49.737:       lv2_wrapper.cpp:353     http://drobilla.net/plugins/mda/Loudness port symbol not found: output

(easyeffects:4276): easyeffects-WARNING **: 13:52:49.737:       lv2_wrapper.cpp:353     http://drobilla.net/plugins/mda/Loudness port symbol not found: link

(easyeffects:4276): easyeffects-WARNING **: 13:52:49.902:       lv2_wrapper.cpp:65      Could not find the plugin: urn:zamaudio:ZaMaximX2

(easyeffects:4276): easyeffects-WARNING **: 13:52:49.902:       lv2_wrapper.cpp:353     urn:zamaudio:ZaMaximX2 port symbol not found: thresh

(easyeffects:4276): easyeffects-WARNING **: 13:52:49.902:       lv2_wrapper.cpp:353     urn:zamaudio:ZaMaximX2 port symbol not found: ceil

(easyeffects:4276): easyeffects-WARNING **: 13:52:49.902:       lv2_wrapper.cpp:353     urn:zamaudio:ZaMaximX2 port symbol not found: rel

(easyeffects:4276): easyeffects-WARNING **: 13:52:49.994:       lv2_wrapper.cpp:65      Could not find the plugin: http://drobilla.net/plugins/mda/Loudness

(easyeffects:4276): easyeffects-WARNING **: 13:52:49.994:       lv2_wrapper.cpp:353     http://drobilla.net/plugins/mda/Loudness port symbol not found: loudness

(easyeffects:4276): easyeffects-WARNING **: 13:52:49.994:       lv2_wrapper.cpp:353     http://drobilla.net/plugins/mda/Loudness port symbol not found: output

(easyeffects:4276): easyeffects-WARNING **: 13:52:49.995:       lv2_wrapper.cpp:353     http://drobilla.net/plugins/mda/Loudness port symbol not found: link

(easyeffects:4276): easyeffects-WARNING **: 13:52:50.161:       lv2_wrapper.cpp:65      Could not find the plugin: urn:zamaudio:ZaMaximX2

(easyeffects:4276): easyeffects-WARNING **: 13:52:50.161:       lv2_wrapper.cpp:353     urn:zamaudio:ZaMaximX2 port symbol not found: thresh

(easyeffects:4276): easyeffects-WARNING **: 13:52:50.161:       lv2_wrapper.cpp:353     urn:zamaudio:ZaMaximX2 port symbol not found: ceil

(easyeffects:4276): easyeffects-WARNING **: 13:52:50.161:       lv2_wrapper.cpp:353     urn:zamaudio:ZaMaximX2 port symbol not found: rel
locale::facet::_S_create_c_locale name not valid

So is this GTK or EasyEffects that went bust? I dual boot so I guess until this catastrophic bug is fixed I will be on a short vacation to Windows 7.

Digitalone1 commented 2 years ago

@wwmm No, I don't want to set the global locale. I'm talking about initializing the locale object somewhere and the make use of it rather than reinitialize it anytime the ftm::format has to be performed.

As I see in the constructor, just declaring the locale object sets the C locale.

std::locale l1; 
// l1 is a copy of the classic "C" locale

This should not throw any exception and then we make a try statement in the attempt to get the locale object related to the system locale.

Digitalone1 commented 2 years ago

So is this GTK or EasyEffects that went bust? I dual boot so I guess until this catastrophic bug is fixed I will be on a short vacation to Windows 7.

If your locale is properly set, you should not have any type of issue. Since you're using Plasma, try to set the locale language from the System Settings.

If it's still happening, try to downgrade EE to the previous working version. Which distribution are you using?

LoonixCube commented 2 years ago

So is this GTK or EasyEffects that went bust? I dual boot so I guess until this catastrophic bug is fixed I will be on a short vacation to Windows 7.

If your locale is properly set, you should not have any type of issue. Since you're using Plasma, try to set the locale language from the System Settings.

If it's still happening, try to downgrade EE to the previous working version. Which distribution are you using? Arch Linux.

I checked my locale and it is configured properly. Based on your advice I found a temporary solution:

I went into /var/cache/pacman/pacman/pkg and searched for easyeffects, ran sudo pacman -U and downgraded EE to version 6.2.5-1 and rebooted. EasyEffects now works perfectly as before and loaded all plugins, however this package is outdated by almost a month (6.2.6-1 and 6.2.6-2 are both borked for me)

And to prove this is a bug pertaining to the current build (6.2.6-2) I ran pacman -Syu and it prompted an upgrade to 6.2.6-2 then I rebooted. The exact error(s) came back.

wwmm commented 2 years ago

and running the program in konsole throws this big pile of errrors:

@LoonixCube Almost all of the "errors" you see are just warnings about plugins you do not have installed in your system. Only the last line is relevant and for some reason it only happens on some systems that have something missing in their locale configuration. Does the workaround some people talked about before make any difference for you?

I'm talking about initializing the locale object somewhere and the make use of it rather than reinitialize it anytime the ftm::format has to be performed. This should not throw any exception and then we make a try statement in the attempt to get the locale object related to the system locale

I see. I wonder why replacing std::locale(setlocale(LC_ALL, nullptr)) by std::locale("") had such a catastrophic effect on some systems. I do not think there should be a lot of differences between them... In any case I think that at this moment we would be putting a try/catch in 9 lines @Digitalone1. Would it not be better to just put them in each place and see if this is actually going to fix the problem before doing something more elaborated?

Digitalone1 commented 2 years ago

I made a merge request. Let's see if this resolves the issue.

wwmm commented 2 years ago

I made a merge request. Let's see if this resolves the issue.

I have merged it to the master branch. People on Arch Linux can use the AUR package to test as it builds from our master branch. The ones on Flatpak can use the Flathub nighly channel https://github.com/wwmm/easyeffects/wiki/Package-Repositories#nightly-flatpak. But in this case it may take 24 hours until the package is available.

I still think that is suspicious that the warning Gtk-WARNING **: 19:50:46.843: Locale not supported by C library is gone when people use LC_ALL=en_US.UTF-8 as a workaround...

Digitalone1 commented 2 years ago

Please people test it and report here.

aarproducoes commented 2 years ago

Please people test it and report here.

Hi! I capture the screen to show the results:

  1. normal flatpak use vs. the workaround: https://youtu.be/Mcm49fdXCeo
  2. install nightly flatpak and launch: https://youtu.be/n6nreKP3KXA
  3. waiting long time and the app "started" but don't launch: https://youtu.be/PCu_ZkMbd6w
Digitalone1 commented 2 years ago

@aarproducoes I think flatpak nightly is not updated yet to the master branch.

@LoonixCube can you try to install easyeffects-git from AUR?

vchernin commented 2 years ago

I think flatpak nightly is not updated yet to the master branch.

Yeah it won’t be available for a couple hours.

I think it would be nice to have CI builds here for Flatpak, so a installable Flatpak package is made for every commit on master and PRs too. I might make a PR for that sooner or later.

aarproducoes commented 2 years ago

@aarproducoes I think flatpak nightly is not updated yet to the master branch.

@LoonixCube can you try to install easyeffects-git from AUR?

Ok. Thanks. I will try again later.