Project

General

Profile

Bug #763

Segfault when changing interface with Ampache plugin enabled

Added by Jim Turner about 6 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Minor
Assignee:
-
Category:
plugins/ampache
Target version:
Start date:
January 07, 2018
Due date:
% Done:

100%

Estimated time:
Affects version:

Description

Using Audacious 3.9-GIT (from mid December - incl. the "qtui/info_bar.cc" commit) on Linux
(Debian "Testing"-equivalent distro) w/latest Ampache (as of today) built and successfully installed.
Ampache seems to work fine in either "QT interface" or "Winamp Skins interface", but when toggling the
"Interface" dropdown beteen either one to the other produces immediate crash! The backtrace is huge
w/tons of Ampache functions, but I've included some of it here.

Problem only manifests IF Ampache is active when switching. I was able to work around (eliminate) the
segfault by modifying the following code (for now) to libaudqt/prefs-window-qt.cc to temporarily toggle
Ampache off for the switcheroo, then right back on (if was on):

static void iface_combo_changed ()
{
    /* prevent audqt from being shut down during the switch */
    init ();

    if (QLayout * layout = iface_prefs_box->layout ())
    {
        clear_layout (layout);
        delete layout;
    }

    /* JWT:PREVENT SEGFAULT WHEN CHANGING INTERFACES WHILST AMPACHE IS ENABLED (TEMP. DISABLE IT)! */
    bool ampache_was_enabled = false;
    PluginHandle * ampache_plugin;
    for (PluginHandle * plugin : aud_plugin_list (PluginType::General))
    {
        const char * plugin_name = aud_plugin_get_basename (plugin);
        if (strstr (plugin_name, "ampache") && aud_plugin_get_enabled (plugin))
        {
            aud_plugin_enable (plugin, false);
            ampache_was_enabled = true;
            ampache_plugin = plugin;
            break;
        }
    }

    aud_plugin_enable (aud_plugin_list (PluginType::Iface)[iface_combo_selected], true);

    /* JWT:RESTORE AMPACHE PLUGIN ON IF WAS ON: */
    if (ampache_was_enabled && ampache_plugin)
    {
        aud_plugin_enable (ampache_plugin, true);
    }

    iface_fill_prefs_box ();
    cleanup ();
}

========================
Here's some of the backtrace:

[New LWP 5766]
[New LWP 5779]
[New LWP 5787]
[New LWP 5769]
[New LWP 5768]
[New LWP 5775]
[New LWP 5788]
[New LWP 5771]
[New LWP 5780]
[New LWP 5773]
[New LWP 5786]
[New LWP 5789]
[New LWP 5772]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".
Core was generated by `/home/turnerjw/usr/bin/audacious -Q'.
Program terminated with signal SIGABRT, Aborted.
#0  0xb7749d65 in __kernel_vsyscall ()
[Current thread is 1 (Thread 0xb4bc57c0 (LWP 5766))]
(gdb) bt
#0  0xb7749d65 in __kernel_vsyscall ()
#1  0xb6fc7dc0 in __libc_signal_restore_set (set=0xbfebbcc0)
    at ../sysdeps/unix/sysv/linux/nptl-signals.h:79
#2  __GI_raise (sig=6) at ../sysdeps/unix/sysv/linux/raise.c:48
#3  0xb6fc9287 in __GI_abort () at abort.c:89
#4  0xb723d2ff in __gnu_cxx::__verbose_terminate_handler() ()
   from /usr/lib/i386-linux-gnu/libstdc++.so.6
#5  0xb723aea4 in ?? () from /usr/lib/i386-linux-gnu/libstdc++.so.6
#6  0xb7239c19 in ?? () from /usr/lib/i386-linux-gnu/libstdc++.so.6
#7  0xb723a417 in __gxx_personality_v0 ()
   from /usr/lib/i386-linux-gnu/libstdc++.so.6
#8  0xb716b3ff in ?? () from /lib/i386-linux-gnu/libgcc_s.so.1
#9  0xb716b877 in _Unwind_Resume () from /lib/i386-linux-gnu/libgcc_s.so.1
#10 0xa803ad5e in bool infrastructure::operator==<std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, QPixmap, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, QPixmap> > > >(infrastructure::Delegate<std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, QPixmap, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, QPixmap> > > > const&, infrastructure::Delegate<std::map<std::__cxx11::basic_string<char, std::char_tr
---Type <return> to continue, or q <return> to quit---

...

#21 0xa80765f3 in application::AmpacheBrowserApp::initializeDependencies() ()
   from /usr/local/lib/libampache_browser_1.so.0
#22 0xa8076227 in application::AmpacheBrowserApp::initializeAndLoad() ()
   from /usr/local/lib/libampache_browser_1.so.0
#23 0xa8074619 in application::AmpacheBrowserApp::run() ()
   from /usr/local/lib/libampache_browser_1.so.0
#24 0xa8083b72 in application::Application::run() ()
   from /usr/local/lib/libampache_browser_1.so.0
#25 0xa8085d24 in ampache_browser::ApplicationQt::run() ()
   from /usr/local/lib/libampache_browser_1.so.0
#26 0xa8152e7a in AmpacheBrowserPlugin::get_qt_widget (
    this=0xa81560e0 <aud_plugin_instance>) at ampache.cc:130
#27 0xa81885ee in add_dock_plugin (plugin=0x80a8b758) at plugin-window.cc:112
#28 0xa81888e7 in create_plugin_windows () at plugin-window.cc:155
#29 0xa8188111 in QtSkins::init (this=0xa81a44c0 <aud_plugin_instance>)
    at plugin.cc:149
#30 0xb7704456 in interface_load (plugin=0x80a8c900) at interface.cc:70
#31 iface_plugin_set_current (plugin=0x80a8c900) at interface.cc:143
#32 0xb7713edf in start_plugin (type=<optimized out>, p=0x80a8c900, 
    secondary=<optimized out>) at plugin-init.cc:96
#33 0xb771447b in enable_single (p=0x80a8c900, type=PluginType::Iface)
    at plugin-init.cc:263
#34 aud_plugin_enable (plugin=0x80a8c900, enable=true) at plugin-init.cc:314
#35 0xa828f58e in audqt::iface_combo_changed () at prefs-window-qt.cc:510
#36 0xa828d7ea in audqt::ComboBoxWidget::<lambda(int)>::operator() (
    idx=<optimized out>, __closure=0x80c196e0) at prefs-widget-qt.cc:241

I finally got around to testing this Ampache thing out (have never installed it before). I went ahead &
emailed Robert (Ampache maintainer) a report also. Let me know if I can provide any additional information.

Regards,

Jim

History

#1 Updated by John Lindgren about 6 years ago

  • Category set to plugins/ampache
  • Status changed from New to Closed
  • Target version set to 3.10
  • % Done changed from 0 to 100
  • Affects version 3.9 added
  • Affects version deleted (3.9.1)

Fixed, thanks for reporting.

Also available in: Atom PDF