You are not logged in.

#1 2022-12-14 12:04:03

miko c
Member
Registered: 2022-12-14
Posts: 8

[SOLVED] lmms crashes if kwidgetsaddons-5.101.0-1 is installed

Hello, after I upgraded kwidgetsaddons from 5.100.0-1 to 5.101.0-1 with pacman -Syu, lmms failed to launch and I got a segmentation fault:

Thread 1 "lmms" received signal SIGSEGV, Segmentation fault.
0x00007ffff688cadb in QCoreApplicationPrivate::sendThroughApplicationEventFilters (this=this@entry=0x555555956bb0, receiver=receiver@entry=0x5555560acc70, event=event@entry=0x7fffffffd540) at kernel/qcoreapplication.cpp:1172
1172	            if (obj->eventFilter(receiver, event))
(gdb) bt
#0  0x00007ffff688cadb in QCoreApplicationPrivate::sendThroughApplicationEventFilters(QObject*, QEvent*)
    (this=this@entry=0x555555956bb0, receiver=receiver@entry=0x5555560acc70, event=event@entry=0x7fffffffd540) at kernel/qcoreapplication.cpp:1172
#1  0x00007ffff7978b5a in QApplicationPrivate::notify_helper(QObject*, QEvent*) (this=0x555555956bb0, receiver=0x5555560acc70, e=0x7fffffffd540)
    at kernel/qapplication.cpp:3608
#2  0x00007ffff688cf98 in QCoreApplication::notifyInternal2(QObject*, QEvent*) (receiver=0x5555560acc70, event=0x7fffffffd540)
    at kernel/qcoreapplication.cpp:1064
#3  0x00007ffff79a53fa in QWidgetPrivate::setStyle_helper(QStyle*, bool) (this=<optimized out>, newStyle=0x0, propagate=<optimized out>)
    at kernel/qwidget.cpp:2659
#4  0x00007ffff79b0405 in QWidget::setParent(QWidget*, QFlags<Qt::WindowType>) (this=0x5555560acc70, parent=<optimized out>, f=...)
    at kernel/qwidget.cpp:10501
#5  0x00007ffff799d19a in QWidgetPrivate::init(QWidget*, QFlags<Qt::WindowType>) (this=0x555555d41c00, parentWidget=<optimized out>, f=...)
    at kernel/qwidget.cpp:1046
#6  0x0000555555759513 in MainWindow::MainWindow() (this=this@entry=0x555555ce6540) at /usr/include/qt/QtCore/qflags.h:120
#7  0x000055555574ccd9 in GuiApplication::GuiApplication() (this=this@entry=0x555555a499e0)
    at /usr/src/debug/lmms/lmms-1.2.2/src/gui/GuiApplication.cpp:116
#8  0x00005555556482ca in main(int, char**) (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/lmms/lmms-1.2.2/src/core/main.cpp:759

The problem happens for both community/lmms and aur/lmms-git. Downgrading kwidgetsaddons or uninstalling it will temporarily solve the issue.

I thought it's related to qt stuff, but my other qt applications work well. Hope you guys can give me some suggestions. Please let me know if any other information is needed.

Last edited by miko c (2022-12-15 16:44:08)

Offline

#2 2022-12-14 13:13:32

seth
Member
Registered: 2012-09-03
Posts: 51,176

Re: [SOLVED] lmms crashes if kwidgetsaddons-5.101.0-1 is installed

Does

QT_STYLE_OVERRIDE=Cleanlooks lmms

help?

Online

#3 2022-12-14 13:50:00

miko c
Member
Registered: 2022-12-14
Posts: 8

Re: [SOLVED] lmms crashes if kwidgetsaddons-5.101.0-1 is installed

seth wrote:

Does

QT_STYLE_OVERRIDE=Cleanlooks lmms

help?

Seems Cleanlooks is not available here. Is there a package for that style?

QApplication: invalid style override 'Cleanlooks' passed, ignoring it.
	Available styles: HighContrastInverse, HighContrast, Adwaita-HighContrastInverse, Adwaita-HighContrast, Adwaita-Dark, Adwaita, Windows, Fusion

I tried all the available styles and none of them worked.

Offline

#4 2022-12-14 14:23:16

seth
Member
Registered: 2012-09-03
Posts: 51,176

Re: [SOLVED] lmms crashes if kwidgetsaddons-5.101.0-1 is installed

qt5-styleplugins (for the Qt5 build of lmms), though "Fusion" should have done.

You're probably running this in a KDE session?
Try sth. like

DESKTOP_SESSION=lmms QT_QPA_PLATFORMTHEME=gtk2 lmms

the kwidgetsaddon plugin is proabla loaded by the platform theme (for the open/close dialogs) but why this would segfault here I can' tell from the backtrace sad

Online

#5 2022-12-14 16:25:01

miko c
Member
Registered: 2022-12-14
Posts: 8

Re: [SOLVED] lmms crashes if kwidgetsaddons-5.101.0-1 is installed

seth wrote:

qt5-styleplugins (for the Qt5 build of lmms), though "Fusion" should have done.

You're probably running this in a KDE session?
Try sth. like

DESKTOP_SESSION=lmms QT_QPA_PLATFORMTHEME=gtk2 lmms

the kwidgetsaddon plugin is proabla loaded by the platform theme (for the open/close dialogs) but why this would segfault here I can' tell from the backtrace sad

Cleanlooks doesn't help as well.

Tried different values for DESKTOP_SESSION and QT_QPA_PLATFORMTHEME. Still not working...

I'm using i3wm+sddm.

Offline

#6 2022-12-14 17:04:17

seth
Member
Registered: 2012-09-03
Posts: 51,176

Re: [SOLVED] lmms crashes if kwidgetsaddons-5.101.0-1 is installed

strace -o /tmp/lmms.strace lmms

- maybe we can see how kwidgetsaddons gets drawn in…

Online

#7 2022-12-14 17:36:33

miko c
Member
Registered: 2022-12-14
Posts: 8

Re: [SOLVED] lmms crashes if kwidgetsaddons-5.101.0-1 is installed

seth wrote:
strace -o /tmp/lmms.strace lmms

- maybe we can see how kwidgetsaddons gets drawn in…

Here is the output.

Offline

#8 2022-12-15 08:57:02

seth
Member
Registered: 2012-09-03
Posts: 51,176

Re: [SOLVED] lmms crashes if kwidgetsaddons-5.101.0-1 is installed

It's loaded failry late but there's no hint as to what might draw it in.
So let's throw some shit against the wall

printenv
pacman -Qs 'flatpak|portal'

And you can oc. "break dlopen" in gdb.

The bug is likely w/ lmms and I assume an internal overlay style (to look like a music-pro tool, because those must never just look like regular programs but mimic HW synths from the 80ies… roll)

Online

#9 2022-12-15 13:48:36

miko c
Member
Registered: 2022-12-14
Posts: 8

Re: [SOLVED] lmms crashes if kwidgetsaddons-5.101.0-1 is installed

And you can oc. "break dlopen" in gdb.

It turned out that kwidgetsaddons was explicitly loaded by lmms's code... (thanks to "break dlopen")

The relevant function: disableAutoKeyAccelerators, which is called here, though I don't quite understand what this is about (know nothing about qt...)

I skipped the function call in gdb and the segmentation fault didn't happen then.

The bug is likely w/ lmms

Do you think I should report this to lmms team (or qt, maybe)? I'm still not sure if it's due to some misconfiguration in my system or not.

FYI:

$ pacman -Qs 'flatpak|portal'
local/xdg-desktop-portal 1.16.0-1
    Desktop integration portals for sandboxed apps
local/xdg-desktop-portal-gtk 1.14.1-1
    A backend implementation for xdg-desktop-portal using GTK
$ printenv
SHELL=/bin/bash
WINDOWID=23068676
COLORTERM=truecolor
XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session3
GTK_IM_MODULE=fcitx
HISTSIZE=10000
I3SOCK=/run/user/1000/i3/ipc-socket.4172
DEVKITPRO=/opt/devkitpro
HISTTIMEFORMAT=%F %T
XMODIFIERS=@im=fcitx
DESKTOP_SESSION=i3
GTK_MODULES=canberra-gtk-module
XDG_SEAT=seat0
PWD=/home/fox
XDG_SESSION_DESKTOP=i3
LOGNAME=fox
XDG_SESSION_TYPE=x11
XAUTHORITY=/home/fox/.Xauthority
QT_STYLE_OVERRIDE=adwaita-dark
MOTD_SHOWN=pam
HOME=/home/fox
LANG=en_US.UTF-8
LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=00:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.avif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.webp=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:*~=00;90:*#=00;90:*.bak=00;90:*.old=00;90:*.orig=00;90:*.part=00;90:*.rej=00;90:*.swp=00;90:*.tmp=00;90:*.dpkg-dist=00;90:*.dpkg-old=00;90:*.ucf-dist=00;90:*.ucf-new=00;90:*.ucf-old=00;90:*.rpmnew=00;90:*.rpmorig=00;90:*.rpmsave=00;90:
XDG_CURRENT_DESKTOP=i3
XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
DEVKITARM=/opt/devkitpro/devkitARM
ALACRITTY_SOCKET=/run/user/1000/Alacritty-:0-4263.sock
XDG_SESSION_CLASS=user
TERM=alacritty
USER=fox
DISPLAY=:0
SHLVL=1
PROMPT_DIRTRIM=4
QT_IM_MODULE=fcitx
XDG_VTNR=1
XDG_SESSION_ID=5
DEVKITPPC=/opt/devkitpro/devkitPPC
XDG_RUNTIME_DIR=/run/user/1000
DEBUGINFOD_URLS=https://debuginfod.archlinux.org
PATH=/home/fox/.local/bin:/opt/devkitpro/tools/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
ALACRITTY_LOG=/tmp/Alacritty-4263.log
HISTFILESIZE=10000
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
HG=/usr/bin/hg
MAIL=/var/spool/mail/fox
ALACRITTY_WINDOW_ID=23068676
_=/usr/bin/printenv

Offline

#10 2022-12-15 14:33:58

seth
Member
Registered: 2012-09-03
Posts: 51,176

Re: [SOLVED] lmms crashes if kwidgetsaddons-5.101.0-1 is installed

reinterpret_cast<DisablerFunc>(kf5WidgetsAddon.resolve("_ZN19KAcceleratorManager10setNoAccelEP7QWidget"));

I know a parrot that will go into cardiac arrest this afternoon.

They dlopen a file (fine) reinterpret_cast a static symbol into a function and then run that function as long as the symbol is resolvable - based on a KDE bug from 2017 that was fixed in 2019…

For your local build, just remove that suicide trigger and report a bug against lmms to not pull reverse-lennarts.
This would have been an awesome moment to say "not our bug", but iffffff one goes for this kind of hyper-fragile workaround, one wanted to have closely tracked the original bug and narrow/remove the workarounds asap.

Online

#11 2022-12-15 15:25:28

miko c
Member
Registered: 2022-12-14
Posts: 8

Re: [SOLVED] lmms crashes if kwidgetsaddons-5.101.0-1 is installed

seth wrote:

reinterpret_cast<DisablerFunc>(kf5WidgetsAddon.resolve("_ZN19KAcceleratorManager10setNoAccelEP7QWidget"));

I know a parrot that will go into cardiac arrest this afternoon.

They dlopen a file (fine) reinterpret_cast a static symbol into a function and then run that function as long as the symbol is resolvable - based on a KDE bug from 2017 that was fixed in 2019…

For your local build, just remove that suicide trigger and report a bug against lmms to not pull reverse-lennarts.
This would have been an awesome moment to say "not our bug", but iffffff one goes for this kind of hyper-fragile workaround, one wanted to have closely tracked the original bug and narrow/remove the workarounds asap.

Thanks for the explanation! I get the picture now. And thank you so much for all your help!

I'm going to report this to lmms now. Do you mind if I mention your replies in the bug report?

Offline

#12 2022-12-15 15:51:27

seth
Member
Registered: 2012-09-03
Posts: 51,176

Re: [SOLVED] lmms crashes if kwidgetsaddons-5.101.0-1 is installed

They might have questions about the parrot, but otherwise no wink
This should™ however be uncontentious - this is a dirty hack, it's causing trouble and it's vastly outdated.

Online

#13 2022-12-15 16:26:02

miko c
Member
Registered: 2022-12-14
Posts: 8

Re: [SOLVED] lmms crashes if kwidgetsaddons-5.101.0-1 is installed

seth wrote:

They might have questions about the parrot, but otherwise no wink
This should™ however be uncontentious - this is a dirty hack, it's causing trouble and it's vastly outdated.

I would like to do so because I'm concerned that I may make some inaccurate description tongue I'll just summarize your points instead of putting a link then.

And let's wait for a lmms release before marking this as solved, or shall I just mark it now?

Offline

#14 2022-12-15 16:37:42

seth
Member
Registered: 2012-09-03
Posts: 51,176

Re: [SOLVED] lmms crashes if kwidgetsaddons-5.101.0-1 is installed

The problem is solved, so to speak - there's nothing else to do on this platform and the indicator will help users w/ similar problems to understand that there's perhaps a solution lined out here.
(Even if tthat solution includes fixing and rebuilding lmms)

Online

#15 2022-12-15 16:43:55

miko c
Member
Registered: 2022-12-14
Posts: 8

Re: [SOLVED] lmms crashes if kwidgetsaddons-5.101.0-1 is installed

OK, I've marked this as solved. Again thank you for your help! big_smile

Offline

#16 2022-12-17 17:01:06

p_noumenon
Member
Registered: 2021-10-22
Posts: 22

Re: [SOLVED] lmms crashes if kwidgetsaddons-5.101.0-1 is installed

I'm getting this same problem now; but I'm not smart enough to understand what the problem is based on what you're talking about above.

Offline

#17 2022-12-17 17:21:05

seth
Member
Registered: 2012-09-03
Posts: 51,176

Re: [SOLVED] lmms crashes if kwidgetsaddons-5.101.0-1 is installed

There's a fragile hack in lmms to work around an ancient kwidgetsaddons bug and now falls flat because it relies on internal behavior of that library that existed 3-5 years ago.
Other then building lmms locally and patching out that hack or removing kwidgetsaddons there's no direct remedy.

You could try to LD_PRELOAD=/usr/lib/libKF5WidgetsAddons.so and hope that this somehow initiates the context of the library enough to allow the hack to succeed, but that's a far stretch and certainly not reliable (iffff it can achieve this at all)

Online

#18 2022-12-18 10:35:36

p_noumenon
Member
Registered: 2021-10-22
Posts: 22

Re: [SOLVED] lmms crashes if kwidgetsaddons-5.101.0-1 is installed

seth wrote:

There's a fragile hack in lmms to work around an ancient kwidgetsaddons bug and now falls flat because it relies on internal behavior of that library that existed 3-5 years ago.
Other then building lmms locally and patching out that hack or removing kwidgetsaddons there's no direct remedy.

You could try to LD_PRELOAD=/usr/lib/libKF5WidgetsAddons.so and hope that this somehow initiates the context of the library enough to allow the hack to succeed, but that's a far stretch and certainly not reliable (iffff it can achieve this at all)

Yeah, that didn't work. I'm not sure I feel brave enough to try patching lmms locally myself; I guess I'll just wait until someone fixes the bug, I assume we're not the only ones experiencing it. I only use lmms infrequently anyway, so it's no rush for me.

Last edited by p_noumenon (2022-12-18 10:36:01)

Offline

#19 2022-12-19 10:35:31

p_noumenon
Member
Registered: 2021-10-22
Posts: 22

Re: [SOLVED] lmms crashes if kwidgetsaddons-5.101.0-1 is installed

Alright, found a temporary fix on the issue opened for this problem on GitHub. That fix is to downgrade kwidgetsaddons to 5.100.0-1 (as long as it's in your cache that would be "pacman -U file:///var/cache/pacman/pkg/kwidgetsaddons-5.100.0-1-x86_64.pkg.tar.zst", otherwise the issue describes using a program called "downgrade" to do it, I'm sure people will find a way). Now LMMS boots as it should.

Offline

#20 2022-12-19 10:47:38

seth
Member
Registered: 2012-09-03
Posts: 51,176

Re: [SOLVED] lmms crashes if kwidgetsaddons-5.101.0-1 is installed

If you get away w/ that a more contained approach would be to extract that library somewhere and incude it in the LD_LIBRARY_PATH to limit the "downgrade" to lmms (which indeed doesn't really do anything w/ it)

Online

#21 2022-12-19 16:41:23

p_noumenon
Member
Registered: 2021-10-22
Posts: 22

Re: [SOLVED] lmms crashes if kwidgetsaddons-5.101.0-1 is installed

seth wrote:

If you get away w/ that a more contained approach would be to extract that library somewhere and incude it in the LD_LIBRARY_PATH to limit the "downgrade" to lmms (which indeed doesn't really do anything w/ it)

I see, so that only LMMS uses that downgraded version. I guess for something more impactful I'd look into that, but in this case nothing I use seems to be affected at all.

Offline

#22 2022-12-21 11:37:17

middlewalker
Member
Registered: 2022-12-04
Posts: 2

Re: [SOLVED] lmms crashes if kwidgetsaddons-5.101.0-1 is installed

seth wrote:

There's a fragile hack in lmms to work around an ancient kwidgetsaddons bug and now falls flat because it relies on internal behavior of that library that existed 3-5 years ago.
Other then building lmms locally and patching out that hack or removing kwidgetsaddons there's no direct remedy.

You could try to LD_PRELOAD=/usr/lib/libKF5WidgetsAddons.so and hope that this somehow initiates the context of the library enough to allow the hack to succeed, but that's a far stretch and certainly not reliable (iffff it can achieve this at all)

this did end up working for me

Offline

Board footer

Powered by FluxBB