Opened 10 years ago

Closed 10 years ago

#11906 closed Bug Report - General (Fixed)

MythMusic segfaults when scanning for new music

Reported by: peper03 Owned by: paulh
Priority: major Milestone: 0.27.1
Component: Plugin - MythMusic Version: 0.27-fixes
Severity: medium Keywords:
Cc: Ticket locked: no

Description

Scanning for new music (sometimes at the second attempt) reproducibly causes a segfault.

There is no current playlist, which is possibly the root cause of the problem.

The segfault effectively occurs in MusicPlayer::activePlaylistChanged.

Backtrace is attached,

Attachments (1)

gdb.txt (141.4 KB) - added by peper03 10 years ago.

Download all attachments as: .zip

Change History (10)

Changed 10 years ago by peper03

Attachment: gdb.txt added

comment:1 Changed 10 years ago by dj <dana@…>

I am too experiencing this problem. It was also happening w/ a new install of 0.26. I've recently set up a new myth install and now have separate front and backends. The mp3 files are pretty much the same as my old setup that worked. The biggest difference is that the new seperate frontend access the mp3 files on a SAMBA server (happens to be the same machine as the backend). If I select individual subdirectories, MythMusic will scan a handful of songs OK so it appears that it's having a problem with specific mp3 files. I can't figure out which one(s) out of the ~5000 on the server. I will be happy to capture logs files or whatever will be helpful. I am working on figuring out how to work the debugging stuff. Tips & suggestions are very welcome.

comment:2 Changed 10 years ago by bjorne-g@…

Found out that I had some mpg videos in the same directory as my mp3s. When I removed the videos - the scan worked.

comment:3 Changed 10 years ago by Paul Harrison <pharrison@…>

In 193dc636e5fa5ac5edd3589094a58e79a6ab779b/mythtv:

MythMusic: avoid storing a pointer to the current playlist in the music player

Always get the current playlist from MusicData? to avoid possibly referencing a
stale pointer. This can occur while doing a rescan.

Also add NULL checks everywhere just in case.

Refs #11906.

comment:4 Changed 10 years ago by Paul Harrison <pharrison@…>

In fac84fab9c8c6e43f51d3090e13e05e68db0ef6e/mythtv:

MythMusic: avoid storing a pointer to the current playlist in the music player

Always get the current playlist from MusicData? to avoid possibly referencing a
stale pointer. This can occur while doing a rescan.

Also add NULL checks everywhere just in case.

Refs #11906.

(cherry picked from commit 193dc636e5fa5ac5edd3589094a58e79a6ab779b)

comment:5 Changed 10 years ago by paulh

Can you please update and try again both issues with trying to read the tags from non music files and the random segfault should be fixed now.

comment:6 Changed 10 years ago by paulh

Status: newinfoneeded_new

comment:7 in reply to:  5 Changed 10 years ago by bjorne-g@…

Replying to paulh:

Can you please update and try again both issues with trying to read the tags from non music files and the random segfault should be fixed now.

After the fix it work for me - it gives "MetaIO::readMetadata(): Could not read 'filename' for each of the mpg videos. Thanks!

comment:8 in reply to:  5 Changed 10 years ago by peper03

Replying to paulh:

Can you please update and try again both issues with trying to read the tags from non music files and the random segfault should be fixed now.

Works for me now. I found the problem seemed to be related to 'Smart Playlists'. Scanning for new music would cause the crash if I went into 'Select Music' and scrolled down to 'Smart Playlists' first (didn't select anything, just scrolled down).

Thanks for the fix!

comment:9 Changed 10 years ago by paulh

Milestone: unknown0.27.1
Resolution: Fixed
Status: infoneeded_newclosed
Note: See TracTickets for help on using tickets.