Project

General

Profile

Bug #1007

Segfault from 6/30 git (Qt interfaces)

Added by Jim Turner over 4 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Trivial
Assignee:
-
Category:
libaudqt
Target version:
-
Start date:
July 01, 2020
Due date:
% Done:

100%

Estimated time:
Affects version:

Description

Audacious will segfault on exit if [Settings].[Plugins].{any plugin}.[config options window] left open when exiting Audacious in Qt interfaces. the corresponding [info options windows] are not subject to this b/c they're modal (can not interact with main window whilst one of them is open).

Steps to reproduce:
1) Start up Audacious normally (Qt) NOTE: GTK startup does not seem to fail.
2) Open [File].[Settings].[Plugins] window. (window pops up correctly)
3) Select any plugin which has config. options (click wrench/screwdriver icon). (window pops up correctly)
4) Select [File].[Quit] from main window (segfault). NOTE: Pbm. seems to be the fact the options window was left open, as it does not matter if the (parent) Plugins window itself is still displayed or not.

GTK interfaces don't seem to be affected, but both Qt & Qt-skins are.
I'm marking this as "trivial" b/c it only happens on exit and config/playlist changes seem to STILL be saved, so pbly not noticable to must users.

gdb_backtrace.txt (1.17 KB) gdb_backtrace.txt gdb backtrace Jim Turner, July 01, 2020 02:09

History

#1 Updated by Thomas Lange over 4 years ago

Which Qt version are you using?
I was not able to reproduce this issue on Arch Linux with Qt 5.15.

#2 Updated by Jim Turner over 4 years ago

The testing box I was using (that fails) is 32bit, running Qt v5.7.1,
however my main box is 64bit running v5.12.5 but it seems to work properly there.

Idk how "old" or how widely used v5.7.1 still is, so can't say then if this is worth fixin' or not? If it's below your supported Qt version and difficult to fix, then ok w/me to reject without prejudice.

#3 Updated by John Lindgren over 4 years ago

I see no crash with Qt 5.3.2 either. Is there a particular plugin that this happens with?

#4 Updated by Jim Turner over 4 years ago

I tried at least a half dozen of 'em (most, but not all are "Input" plugins - that have config parms), failed on all I tried. I'm guessing it's a failure to clean something up that normally gets cleaned up when the subwindow is closed by the user.

#5 Updated by Jim Turner over 4 years ago

The last thing in the backtrace says "0xb7547bb3 in QObject::~QObject() ()", so decided to do a slight bit of digging in prefs-plugin.cc (where these subwindows are created) and found that:

QObject::connect(cw->root, &QObject::destroyed, [p, cw]() {...

gets called when user presses the [Close] button, and does a cw->root = nullptr; but this is NOT called when exiting Audacious with the window left open (dangling?) Hope this is the right haystack.

Regards,

Jim

#7 Updated by Jim Turner over 4 years ago

That seems to have fixed it! However, I had to #include <memory> in prefs-plugin.cc to get to compile (compiler did not recognize std::unique_ptr)! (gcc -v=gcc version 6.3.0 20170516 (Debian 6.3.0-18+deb9u1)) on this old 32bit box where it was failing before.

prefs-plugin.cc:
@@ -17,6 +17,7 @@
  * the use of this software.
  */

+#include <memory>
 #include <QDialog>
 #include <QDialogButtonBox>
 #include <QPointer>

Thanks,

Jim

#8 Updated by John Lindgren over 4 years ago

  • % Done changed from 0 to 100
  • Status changed from New to Closed

Okay, that should be fixed now too. Thanks for testing!

Also available in: Atom PDF