Bug 7540 - Media Player crashes viewing Music by Playlist
: Media Player crashes viewing Music by Playlist
Status: RESOLVED WORKSFORME
Product: Media player
General
: 5.0/(1.2009.42-11)
: ARM Maemo
: Low critical with 1 vote (vote)
: 5.0/(2.2009.51-1)
Assigned To: unassigned
: media-player-bugs
:
: crash
:
:
  Show dependency tree
 
Reported: 2010-01-01 01:59 UTC by Darren Long
Modified: 2010-02-09 01:30 UTC (History)
2 users (show)

See Also:


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description Darren Long (reporter) 2010-01-01 01:59:12 UTC
SOFTWARE VERSION:
1.2009.42-11.203.2

EXACT STEPS LEADING TO PROBLEM: 
1. Sync entire iTunes Music collection (via USB Nokia suite mode) from Mac to
Nokia N900 with Nokia Multimedia Transfer for Mac v1.4.2 (8184), iTunes 9.0.2,
Mac OS X 10.6.2. My music library is 4014 items, 12.2 days duration, 21.88GB in
size, according to iTunes.
2. Wait for tracker to update.
3. Launch Media Player
4. Select Music
5. Select Playlist view from menu (unless already selected, in which case, go
straight to fail)

EXPECTED OUTCOME:
All playlists are shown.  Each has a duration listed.  Media Player continues
to function as usual. For example, prior to using Nokia Multimedia Transfer, I
had previously transferred the same iTunes library (probably some underlying
difference in exactly what was transferred) with  Sailing Media Sync for Mac,
and had no (major) problems (unrelated to Sailing Media Sync quirks in playlist
contents).

ACTUAL OUTCOME:
"Internal Error: Media Player Application closed" is displayed.  Prior to the
error, the Automatic Playlist section of the application display can be seen to
refresh the number of songs in the first 3 playlists (Recently Added, Recently
Played, Most Played). The last visible effect of the application running is the
Most Played playlist song count being displayed. The number of songs in the
Never Played playlist does not get displayed. The only other playlist visible
is the Music playlist in the Imported section. The number of songs in it is
displayed.

REPRODUCIBILITY:
With the iTunes library synced to the device, as it is now, this behaves
exactly as described, 100% of the time.

EXTRA SOFTWARE INSTALLED:
A fair bit, nothing obviously related or too adventurous.  No shortage of
rootfs space.

OTHER COMMENTS:
I attempted to fix this by cleaning the tracker index and subsequently running
Media Player.  After Media Player gave a countdown for the reindexing, it
errored/crashed as described above.  So, cleaning & reindexing doesn't appear
to fix the problem.

Workaround 1. Instantly after step 4 above, I can switch the display mode to
All Albums, Artists or Genres and avoid the error/crash. Media Player functions
as normal.  If I do select Playlists again, the error/crash occurs.

I intend to remove the synced iTunes library, clean the tracker index, and sync
the whole library again to see if this has any effect.  It takes a good few
hours though.

User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US;
rv:1.9.1.6) Gecko/20091201 Firefox/3.5.6

I considered increasing the Priority/Severity on this, but I'm not sure of
protocol in that respect.
Comment 1 Darren Long (reporter) 2010-01-02 18:01:43 UTC
Update.

After trying various things including resyncing with Nokia Multimedia Transfer
and reindexing with tracker, with no success, I reverted a previous change I
had made in ~/.config/tracker/tracker.cfg, and the issue seemed to be go away.

The offending change to tracker.cfg was that I had appended to line 18, the
string "$HOME/MyDocs/Podcasts/;" in an effort to exclude gpodder's podcasts and
playlists from Media Player.

It seems that the issue can be switched on by appending that directory to the
tracker.cfg line 18 and reindexing. The issue can be turned off by removing the
extra directory entry from tracker.cfg and reindexing.
Comment 2 Darren Long (reporter) 2010-01-02 18:10:04 UTC
I now suspect that the bug was initially triggered by tracker reindexing, after
switching from an iTunes music library synced by Sailing Media Sync to a music
library synced by Nokia Multimedia Sync, and that the tool used for syncing is
probably not relevant.

I suspect that I hadn't performed a tracker reindexing after initially adding
the Podcasts directory to the tracker's NoWatchDirectory entry, such that the
bug was triggered by the first reindexing with the entry present.
Comment 3 Andre Klapper maemo.org 2010-01-04 18:50:24 UTC
Thanks for your investigations!

> It seems that the issue can be switched on by appending that directory to the
> tracker.cfg line 18

Which line is this exactly? NoWatchDirectory?

You say you can constantly reproduce the crash by adding a value to that line 
and reindexing.
How exactly can I reindex?
Quick exact commands as steps to reproduce highly welcome! :)
Comment 4 Darren Long (reporter) 2010-01-04 22:39:49 UTC
Initially, the following line exists (line 18) in
~/.config/tracker/tracker.conf:

NoWatchDirectory=$HOME/MyDocs/core-dumps/;$HOME/MyDocs/cities/;$HOME/MyDocs/.sounds/Ringtones/;$HOME/MyDocs/tmp/;/media/mmc1/tmp/;/media/mmc1/cities/;

Step 1) Append the following to the end of line 18:
$HOME/MyDocs/Podcasts/;
So that it looks like:
NoWatchDirectory=$HOME/MyDocs/core-dumps/;$HOME/MyDocs/cities/;$HOME/MyDocs/.sounds/Ringtones/;$HOME/MyDocs/tmp/;/media/mmc1/tmp/;/media/mmc1/cities/;$HOME/MyDocs/Podcasts/;

and re-index using the following command, as user:

tracker-processes --hard-reset

Then, once the command tracker-status returns "Tracker status is 'Idle'", run
Media Player, choose Music->Menu->Playlists, and Media Player crahses (for me).

The folder ~/MyDocs/Podcasts contains podacasts and playlists downloaded using
gpoddder.  I don't suspect that is very relevant, as the problem with Media
Player occurs only when that folder is not supposed to be indexed.
Comment 5 Darren Long (reporter) 2010-01-04 22:41:11 UTC
Sorry, my last comment #4 entered in error.  I hadn't finished it yet.  Please
ignore.
Comment 6 Darren Long (reporter) 2010-01-04 22:57:49 UTC
Sorry about that.  Here is the info I wished to convey in comment 4.
--
Initially, the following line exists (line 18) in
~/.config/tracker/tracker.conf:

NoWatchDirectory=$HOME/MyDocs/core-dumps/;$HOME/MyDocs/cities/;$HOME/MyDocs/.sounds/Ringtones/;$HOME/MyDocs/tmp/;/media/mmc1/tmp/;/media/mmc1/cities/;

Step 1. Append the following to the end of line 18:

$HOME/MyDocs/Podcasts/;

So that it looks like:

NoWatchDirectory=$HOME/MyDocs/core-dumps/;$HOME/MyDocs/cities/;$HOME/MyDocs/.sounds/Ringtones/;$HOME/MyDocs/tmp/;/media/mmc1/tmp/;/media/mmc1/cities/;$HOME/MyDocs/Podcasts/;

Step 2. Re-index with tracker using the following command, as user:

tracker-processes --hard-reset

Step 3. Wait until the command:

tracker-status 

returns "Tracker status is 'Idle'"

Step 4. Run Media Player

Step 5. Choose Music->Menu->Playlists, unless you are already set to view
Playlists, 

Outcome. You get an initial view of the Playlists and Media Player promptly
crashes (for me).

Reproducibility.  If the change to tracker.cfg is undone, and reindexing is
performed.  The problem goes away.  This behaviour is 100% repeatable for me,
with my N900 in its current, otherwise normally working state.  This makes the
bug happen, or not happen, depending on that tweak to tracker.cfg.

Comments. The folder ~/MyDocs/Podcasts contains podcasts and playlists
downloaded using gpoddder.  I don't suspect that is very relevant, as the
problem with Media Player occurs only when that folder is not supposed to be
indexed.
Out of curiosity, I tried appending /home/user instead of using $HOME in
tracker.cfg.  This had no different effect. 
The results of running the command tracker-stats is consistent with the
intended purpose of adding the podcasts directory to tracker.cfg, as fewer
playlists and Music items are reported when the directory should be ignored by
the indexer.
Only other comment is that I do have bash installed and active as the shell for
user.

--
Hope these steps let you reproduce it.
Comment 7 Darren Long (reporter) 2010-01-05 03:36:33 UTC
I suspect that there may be two bugs here.

1) The tracker indexer does something unexpected when the
$HOME/MyDocs/Podcasts/ directory is added to the NoWatchDirectory list in
tacker.cfg.

2) Media Player crashes when the tracker indexer does the unexpected thing.

--

I've conducted more tests.

Each of the following tests were carried out by reindexing after modifying
tracker.cfg, before running Media Player.

a) I wondered what  effect having other directories added to the
NoWatchDirectory list instead would have, so I copied one m3u and the
corresponding directory of mp3 files from ~/MyDocs/Podcasts out to
~/MyDocs/test and added that to the NoWatchDirectory list instead.  This also
caused Media Player to error. The number of items reported by tracker-stats was
consistent.

b) I then changed the additional directory in the NoWatchDirectory list to be
~/MyDocs/test2 which didn't exist at all. This also caused Media Player to
error. The number of items reported by tracker-stats was consistent.

c) I then modified the existing $HOME/MyDocs/tmp directory entry in the
NoWatchDirectory list to be $HOME/MyDocs/test. This also caused Media Player to
error. The number of items reported by tracker-stats was consistent.

d) I then commented out the NoWatchDirectory list and replaced it with an empty
one, on line 19. This also caused Media Player to error. The number of items
reported by tracker-stats was consistent. I then restored theb $HOME/MyDocs/tmp
entry.

e) Modified tracker.cfg  line 18 (should be as per original) and new line 19 as
below:

Line 18:
NoWatchDirectory=$HOME/MyDocs/core-dumps/;$HOME/MyDocs/cities/;$HOME/MyDocs/.sounds/Ringtones/;$HOME/MyDocs/tmp/;/media/mmc1/tmp/;/media/mmc1/cities/;
Line 19: #NoWatchDirectory=

This also caused Media Player to error. The number of items reported by
tracker-stats was consistent.

f) As per e) aove but with modifed line 19 as below, in case of syntax error:
Line 19: #NoWatchDirectory=

This also caused Media Player to error. The number of items reported by
tracker-stats was consistent.

g) Removed new line 19, as per e) above.  This should restore a working Media
Player.  It doesn't.  Eeek :)


--

I thought I was going to prove something here, but I didn't.  Just when i'd
have placed a bet on the outcome, I seem to be unable to get Media Player to
not crash/error, even with a seemingly defauly tracker.cfg and a fresh reindex.

--
Currently puzzled.
Comment 8 Darren Long (reporter) 2010-01-05 04:20:09 UTC
Well, I had another idea.  In comment 7 test a) I created a ~/MyDocs/test
directory which I then attempted to exclude from indexing.  After that test led
to the Media Player error, I deleted the test directory.  Media Player never
worked again.

I've now recreated the test directory, and Media Player seems to work normally,
with the default tracker.cfg.

So, my last hypothesis for tonight, is that once a directory (or its contents)
have been indexed, Media Player is unhappy if that directory is subsequently
added to the NoWatchDirectory list and reindexing performed.

Sorry for all the waffle.  Hopefully it will be useful :)
Comment 9 Andre Klapper maemo.org 2010-01-13 23:31:37 UTC
Uff. First of all thanks for the investigations.
I must say that I'm a bit lost - so the current expectation is that this has to
do with NoWatchDirectory, right?
/me trying to find the steps how to reproduce...
Comment 10 Andre Klapper maemo.org 2010-02-03 19:32:56 UTC
Ao if this is also still an issue in 2.2009.51-1, can you please provide exact
steps to reproduce (summarizing your findings again) for the Nokia testers
again? Thanks a lot in advance!
Comment 11 Darren Long (reporter) 2010-02-07 20:51:22 UTC
Now works for me with updated version 2.2009.51-1.

I can now exclude the Podcasts directory from the tracker indexer without
causing problems with Media Player.

FWIW, I should point out that I upgraded by reflashing a good while back.  I've
only just edited the tracker conf and initiated a rescan with the tracker.
Comment 12 Andre Klapper maemo.org 2010-02-09 01:30:29 UTC
Hmm, okay... Thanks for rechecking this. Closing for the time being, if this
happens again feel free to reopen.