-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crash with segmentation fault if kwidgetsaddons 5.101.0 is installed #6587
Comments
Confirming that this also occurs on my machine |
FYI, the upstream bug was fixed in KXmlGui 5.55.0(in this commit). |
I've had the same issue and, for a temporary fix for anyone with it as well (Arch Linux): try using |
can confirm, this workaround works on arch linux. |
Here is a workaround for the non-systemd Artix users: Downgrade kwidgetsaddons (5.101.0-1 => 5.92.0-1). Until the bug can be fixed, that is the only way to run the program at the given moment. If you don't have the downgrade package installed, it can be found on the AUR with "[aur helper] -S downgrade" or "cd /tmp && git clone https://aur.archlinux.org/downgrade.git && cd downgrade && makepkg -si" This was also mentioned by @YohananDiamond (I didn't notice until after I typed this up and didn't want to make this a waste of time) |
Can confirm as well. This works for the time being for me. Thanks all for reporting this and temporarily allowing me to carry on producing. |
Had this bug on fedora linux, with the native package as well as with the appimage. |
Is there anything I can do to speed up the fixing of this bug? I also use Kdenlive, so downgrading kwidgetsaddons don't work for me as well. I see there is a patch by voidlinux that is said to fix it. Could we merge that patch into LMMS/lmms repository? |
kwidgetsaddons 5.102 arrived, still the same problem. |
@PhysSong can you please create a new release for this? Your patch does not apply cleanly on top of 1.2.2 |
This is mainly due to large scale code formatting, e.g. 0b27497 |
As well as this one: 7227c89 Sorry, but if you do these types of large refactorings, please do a release afterwards so that people don't have to backport patches through this kind of mess. It takes a lot of effort... |
@dvzrv You can use this: diff --git a/src/gui/MainApplication.cpp b/src/gui/MainApplication.cpp
index 994ae2771..9afa20a71 100644
--- a/src/gui/MainApplication.cpp
+++ b/src/gui/MainApplication.cpp
@@ -35,6 +35,19 @@ MainApplication::MainApplication(int& argc, char** argv) :
QApplication(argc, argv),
m_queuedFile()
{
+#if !defined(LMMS_BUILD_WIN32) && !defined(LMMS_BUILD_APPLE) && !defined(LMMS_BUILD_HAIKU) && QT_VERSION >= 0x050000
+ // Work around a bug of KXmlGui < 5.55
+ // which breaks the recent files menu
+ // https://bugs.kde.org/show_bug.cgi?id=337491
+ for (auto child : children())
+ {
+ if (child->inherits("KCheckAcceleratorsInitializer"))
+ {
+ delete child;
+ }
+ }
+#endif
+
#if defined(LMMS_BUILD_WIN32) && QT_VERSION >= 0x050000
installNativeEventFilter(this);
#endif
diff --git a/src/gui/MainWindow.cpp b/src/gui/MainWindow.cpp
index e6971f96d..26532eb5b 100644
--- a/src/gui/MainWindow.cpp
+++ b/src/gui/MainWindow.cpp
@@ -33,7 +33,6 @@
#include <QMenuBar>
#include <QMessageBox>
#include <QShortcut>
-#include <QLibrary>
#include <QSplitter>
#include <QUrl>
#include <QWhatsThis>
@@ -65,21 +64,6 @@
#include "lmmsversion.h"
-#if !defined(LMMS_BUILD_WIN32) && !defined(LMMS_BUILD_APPLE) && !defined(LMMS_BUILD_HAIKU) && QT_VERSION >= 0x050000
-//Work around an issue on KDE5 as per https://bugs.kde.org/show_bug.cgi?id=337491#c21
-void disableAutoKeyAccelerators(QWidget* mainWindow)
-{
- using DisablerFunc = void(*)(QWidget*);
- QLibrary kf5WidgetsAddon("KF5WidgetsAddons", 5);
- DisablerFunc setNoAccelerators =
- reinterpret_cast<DisablerFunc>(kf5WidgetsAddon.resolve("_ZN19KAcceleratorManager10setNoAccelEP7QWidget"));
- if(setNoAccelerators)
- {
- setNoAccelerators(mainWindow);
- }
- kf5WidgetsAddon.unload();
-}
-#endif
MainWindow::MainWindow() :
@@ -92,9 +76,6 @@ MainWindow::MainWindow() :
m_metronomeToggle( 0 ),
m_session( Normal )
{
-#if !defined(LMMS_BUILD_WIN32) && !defined(LMMS_BUILD_APPLE) && !defined(LMMS_BUILD_HAIKU) && QT_VERSION >= 0x050000
- disableAutoKeyAccelerators(this);
-#endif
setAttribute( Qt::WA_DeleteOnClose );
QWidget * main_widget = new QWidget( this ); |
No, I can not. It does not apply cleanly on top of 1.2.2 and I have to backport this (see my earlier comments). |
@dvzrv It is the backported version. I can |
Alright, thank you. I'll use that then. |
Still happens on the fedora 37 release (both dnf and flatpak), use |
Add temporary patch to fix a crash at startup if kwidgetsaddons 5.101.0 is installed. The patch was obtained from LMMS ticket related with this issue[1]. [1] LMMS/lmms#6587 Since I'm here reorder Makefile to make linters happy. PR: 270470 Reported by: Manuel <[email protected]> MFH: 2023Q2
Add temporary patch to fix a crash at startup if kwidgetsaddons 5.101.0 is installed. The patch was obtained from LMMS ticket related with this issue[1]. [1] LMMS/lmms#6587 Since I'm here reorder Makefile to make linters happy. PR: 270470 Reported by: Manuel <[email protected]> MFH: 2023Q2 (cherry picked from commit 8827164)
Bug Summary
If kwidgetsaddons 5.101.0 (the newest release) is installed, lmms won't launch because of a segmentation fault during preparing ui. If using gdb to skip this line, the segmentation fault won't happen.
It seems that the related workaround code is outdated and recent updates of kwidgetsaddons break it.
Platform: Arch Linux
DM&WM: sddm+i3wm
Steps to reproduce
On Arch Linux, install kwidgetsaddons-5.101 and lmms using pacman, and then launch lmms.
Expected behavior
lmms will start normally.
Actual behavior
After the splash screen, lmms crashes with a segmentation fault.
Affected LMMS versions
Reproduced on v1.2.2 and v1.3.0-alpha.1
Logs
Backtrace, though not very helpful:
Click to expand
The text was updated successfully, but these errors were encountered: