Opened 20 years ago
Closed 20 years ago
#2578 closed defect (fixed)
MythMusic segfaults when activating the "Select music playlists" jumppoint twice
| Reported by: | Owned by: | Isaac Richards | |
|---|---|---|---|
| Priority: | minor | Milestone: | unknown |
| Component: | mythmusic | Version: | 0.20 |
| Severity: | medium | Keywords: | |
| Cc: | Ticket locked: | no |
Description
I have a key bound to the "Select music playlists" jumppoint (using the 0.20-fixes branch). When activated, the music selection screen is shown, and a few seconds later the boxes are ticked for the tracks that are currently selected.
If I activate the same jumppoint again during that interval, mythfrontend segfaults.
I've looked at the code, and I'm not certain but it seems that the problem is that the current selections are filled in asynchronously, and if the jumppoint is activated again, Myth tries to destroy the current tree and playlist objects before they are finished loading which means that the "songs" QPtrList (private member of class Playlist) is not in a consistent state yet.
The backtrace is as follows....I can provide a fuller backtrace with debugging symbols later if necessary...
#0 0xb64aee48 in QGList::first () from /usr/lib/libqt-mt.so.3 #1 0xb25058ef in Playlist::removeAllWidgets () from /usr/lib/mythtv/plugins/libmythmusic.so #2 0xb254a43e in DatabaseBox::~DatabaseBox () from /usr/lib/mythtv/plugins/libmythmusic.so #3 0xb24dd7f3 in startDatabaseTree () from /usr/lib/mythtv/plugins/libmythmusic.so #4 0xb24e1cfc in runMusicSelection () from /usr/lib/mythtv/plugins/libmythmusic.so #5 0xb68f1010 in MythMainWindow::ExitToMainMenu () from /usr/lib/libmythui-0.20.so.0 #6 0xb68f4f30 in MythMainWindow::customEvent () from /usr/lib/libmythui-0.20.so.0 #7 0xb61f3f2c in QObject::event () from /usr/lib/libqt-mt.so.3 #8 0xb622caaf in QWidget::event () from /usr/lib/libqt-mt.so.3 #9 0xb6199e1f in QApplication::internalNotify () from /usr/lib/libqt-mt.so.3 #10 0xb619941e in QApplication::notify () from /usr/lib/libqt-mt.so.3 #11 0xb619ac16 in QApplication::sendPostedEvents () from /usr/lib/libqt-mt.so.3 #12 0xb619aa96 in QApplication::sendPostedEvents () from /usr/lib/libqt-mt.so.3 #13 0xb614292a in QEventLoop::processEvents () from /usr/lib/libqt-mt.so.3 #14 0xb61ac1d8 in QEventLoop::enterLoop () from /usr/lib/libqt-mt.so.3 #15 0xb61ac088 in QEventLoop::exec () from /usr/lib/libqt-mt.so.3 #16 0xb619a071 in QApplication::exec () from /usr/lib/libqt-mt.so.3 #17 0x0807451e in reloadTheme () #18 0xb5b80974 in __libc_start_main () from /lib/tls/libc.so.6 #19 0x08067661 in ?? ()
Attachments (1)
Change History (3)
by , 20 years ago
| Attachment: | mythtv.2758.patch added |
|---|
comment:1 by , 20 years ago
I've attached a patch which fixes this problem by ensuring that the loading threads are done before trying to clean up after them. Compiled and tested with the 0.20-fixes branch.
comment:2 by , 20 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
(In [12462]) In MythMusic's Select music playlists screen wait for the AllMusic and PlaylistsContainer loading threads to finish before exiting the screen. Prevents a segfault when activating the 'Select Music Playlists' jumppoint twice in quick succession.
Used a slightly different patch than the one on the ticket. Fixes #2578

Patch to fix the segfault