Bug 2605 - Scan crashes for playlist ref to WMA file that has a "WM/URL" tag set to allofmp3.com
: Scan crashes for playlist ref to WMA file that has a "WM/URL" tag set to allo...
Status: RESOLVED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Playlists
: 6.2.1
: PC Windows XP
: P2 major (vote)
: ---
Assigned To: Dan Sully
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-11-19 17:03 UTC by Brian Ritchie
Modified: 2008-09-15 14:37 UTC (History)
1 user (show)

See Also:
Category: ---


Attachments
Full log from running SS on a one-track folder (103.85 KB, text/plain)
2005-11-19 17:08 UTC, Brian Ritchie
Details
Full log from crashed rescan on my main music folder (13.67 MB, text/plain)
2005-11-19 17:24 UTC, Brian Ritchie
Details
Euphoria.m3u - playlist that causes crash in my main folder (2.34 KB, text/plain)
2005-11-19 17:29 UTC, Brian Ritchie
Details
An example WMA file that has a WM/URL tag set to allofmp3.com (4.95 MB, audio/x-ms-wma)
2005-11-19 17:36 UTC, Brian Ritchie
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Brian Ritchie 2005-11-19 17:03:59 UTC
SlimServer Version: 6.2.1 - 5194 - Windows XP - EN - cp1252
(Component may be Database as much as Playlists)

Crashes during scan whilst processing a WMA file in a playlist, where the WMA file has a "WM/URL" tag (as reported by dBPowerAmp) with value "allofmp3.com". Not all such files cause problems; it may be the case that it only happens if the file hasn't already been scanned in its folder.
When SS is restarted, the file is sometimes (and perhaps only temporarily) duplicated when browsing its album.

Turned on logging, with d_file, d_scan, d_sql set.  Typical end of trace:

2005-11-19 23:15:52.6984 Got /C:/Documents%20and%20Settings/Brian/My%20Documents/My%20Music/Jon%20Anderson/Animation%20-%20Normalised/04%20-%20All%20In%20A%20Matter%20Of%20Time.wma from file url file:///C:/Documents%20and%20Settings/Brian/My%20Documents/My%20Music/Jon%20Anderson/Animation%20-%20Normalised/04%20-%20All%20In%20A%20Matter%20Of%20Time.wma
2005-11-19 23:15:52.6988 extracted: C:\Documents and Settings\Brian\My Documents\My Music\Jon Anderson\Animation - Normalised\04 - All In A Matter Of Time.wma from file:///C:/Documents%20and%20Settings/Brian/My%20Documents/My%20Music/Jon%20Anderson/Animation%20-%20Normalised/04%20-%20All%20In%20A%20Matter%20Of%20Time.wma
2005-11-19 23:15:52.6991 Slim::Formats::Parse::readM3U:
WARNING:
	file:///C:/Documents%20and%20Settings/Brian/My%20Documents/My%20Music/Jon%20Anderson/Animation%20-%20Normalised/04%20-%20All%20In%20A%20Matter%20Of%20Time.wma found in playlist:
	file:///C:/Documents%20and%20Settings/Brian/My%20Documents/My%20Music/Euphoria.m3u doesn't exist on disk - skipping!

2005-11-19 23:15:52.6994 Got /C:/Documents%20and%20Settings/Brian/My%20Documents/My%20Music from file url file:///C:/Documents%20and%20Settings/Brian/My%20Documents/My%20Music
2005-11-19 23:15:52.6996 extracted: C:\Documents and Settings\Brian\My Documents\My Music from file:///C:/Documents%20and%20Settings/Brian/My%20Documents/My%20Music
2005-11-19 23:15:52.7005 Got /C:/Documents%20and%20Settings/Brian/My%20Documents/My%20Music/Kaiser%20Chiefs/Employment%20(2005)/06%20-%20Oh%20My%20God.wma from file url file:///C:/Documents%20and%20Settings/Brian/My%20Documents/My%20Music/Kaiser%20Chiefs/Employment%20(2005)/06%20-%20Oh%20My%20God.wma
2005-11-19 23:15:52.7008 extracted: C:\Documents and Settings\Brian\My Documents\My Music\Kaiser Chiefs\Employment (2005)\06 - Oh My God.wma from file:///C:/Documents%20and%20Settings/Brian/My%20Documents/My%20Music/Kaiser%20Chiefs/Employment%20(2005)/06%20-%20Oh%20My%20God.wma
2005-11-19 23:15:52.7026 Got /C:/Documents%20and%20Settings/Brian/My%20Documents/My%20Music/Kaiser%20Chiefs/Employment%20(2005)/06%20-%20Oh%20My%20God.wma from file url file:///C:/Documents%20and%20Settings/Brian/My%20Documents/My%20Music/Kaiser%20Chiefs/Employment%20(2005)/06%20-%20Oh%20My%20God.wma
2005-11-19 23:15:52.7030 extracted: C:\Documents and Settings\Brian\My Documents\My Music\Kaiser Chiefs\Employment (2005)\06 - Oh My God.wma from file:///C:/Documents%20and%20Settings/Brian/My%20Documents/My%20Music/Kaiser%20Chiefs/Employment%20(2005)/06%20-%20Oh%20My%20God.wma
2005-11-19 23:15:52.7229 DBD::SQLite::st execute failed: column url is not unique(1) at dbdimp.c line 401 at C:\program files\slimserver\server\CPAN/DBIx/ContextualFetch.pm line 51, <GEN29> line 19.
2005-11-19 23:15:52.7275 Can't update www.allofmp3.com: DBD::SQLite::st execute failed: column url is not unique(1) at dbdimp.c line 401 at C:\program files\slimserver\server\CPAN/DBIx/ContextualFetch.pm line 51, <GEN29> line 19.
 at /PerlApp/Slim/DataStores/DBI/DBIStore.pm line 1869
2005-11-19 23:15:52.7294 Slim::DataStores::DBI::Track Slim::DataStores::DBI::Track=HASH(0x405de2c) destroyed without saving changes to bitrate, multialbumsortkey, age, remote, ct, size, audio, rate, titlesort, url, lossless, tag, fs, channels, secs, album, tracknum, titlesearch, title, year at /PerlApp/Slim/DataStores/DBI/DBIStore.pm line 1006

(I've included the trace from the previous line - for a file that has since been renamed - as this shows that we're processing the playlist Euphoria.m3u.)

The relevant lines in the playlist Euphoria.m3u are:

Jon Anderson\Animation - Normalised\04 - All In A Matter Of Time.wma
Kaiser Chiefs\Employment (2005)\06 - Oh My God.wma

The reference to allofmp3.com in the trace is intriguing.  Only one tag browser I have, dBPowerAmp, shows this file as having a "WM/URL" tag, with value "allofmp3.com". (I'm not (yet) able to modify or even remove this tag.)

Subsequent rescans ("find new") of the same folder crash at the same point.

If I move the file away, the same thing happens with another file (with a WM/URL tag = allofmp3.com) in another playlist.
If I move all playlists away, SS scans normally.
Restoring just the problematic Euphoria playlist did not cause a crash, but resulted in behaviour similar to that described below.

I tried to replicate this behaviour in isolation, using a music folder that contains just this track and a single-entry playlist.  SlimServer didn't crash, but did behave strangely.  On a "clean" scan, the log file contains a "complaint" about a path "allofmp3.com". After a rescan, browsing to the album view showed two copies of the track (title and all); drilling down on the first was OK, but the second showed no details at all.  When I then navigated back to Browse By Artist and down again, the second copy disappeared. I have a full log of this, but it's too big for this comment field.  Here's a curious snippet from the processing of Euphoriarr.m3u (which, just to be clear, does NOT contain the text "allofmp3.com" anywhere:

2005-11-19 23:39:01.9204 Got /C:/Documents%20and%20Settings/Brian/My%20Documents/My%20Moo-Sick/Euphoriarr.m3u from file url file:///C:/Documents%20and%20Settings/Brian/My%20Documents/My%20Moo-Sick/Euphoriarr.m3u
2005-11-19 23:39:01.9207 extracted: C:\Documents and Settings\Brian\My Documents\My Moo-Sick\Euphoriarr.m3u from file:///C:/Documents%20and%20Settings/Brian/My%20Documents/My%20Moo-Sick/Euphoriarr.m3u
2005-11-19 23:39:01.9218 itempath: www.allofmp3.com and file:///C:/Documents%20and%20Settings/Brian/My%20Documents/My%20Moo-Sick/Euphoriarr.m3u made file:///C:/Documents%20and%20Settings/Brian/My%20Documents/My%20Moo-Sick/Euphoriarr.m3u/www.allofmp3.com
2005-11-19 23:39:01.9227 Got /C:/Documents%20and%20Settings/Brian/My%20Documents/My%20Moo-Sick/Euphoriarr.m3u/www.allofmp3.com from file url file:///C:/Documents%20and%20Settings/Brian/My%20Documents/My%20Moo-Sick/Euphoriarr.m3u/www.allofmp3.com
2005-11-19 23:39:01.9229 extracted: C:\Documents and Settings\Brian\My Documents\My Moo-Sick\Euphoriarr.m3u\www.allofmp3.com from file:///C:/Documents%20and%20Settings/Brian/My%20Documents/My%20Moo-Sick/Euphoriarr.m3u/www.allofmp3.com
2005-11-19 23:39:01.9232 isList(file:///C:/Documents%20and%20Settings/Brian/My%20Documents/My%20Moo-Sick/Euphoriarr.m3u/www.allofmp3.com) == 0
2005-11-19 23:39:01.9233 not a list: file:///C:/Documents%20and%20Settings/Brian/My%20Documents/My%20Moo-Sick/Euphoriarr.m3u/www.allofmp3.com
2005-11-19 23:39:01.9234 Skipping unknown type: file:///C:/Documents%20and%20Settings/Brian/My%20Documents/My%20Moo-Sick/Euphoriarr.m3u/www.allofmp3.com
2005-11-19 23:39:01.9236 numitems: 1
2005-11-19 23:39:01.9237 index: 1

and from the end of the initial scan:

2005-11-19 23:39:01.9665 Got to end of dir, done!
2005-11-19 23:39:01.9665 addToList_done. returning 1 items
2005-11-19 23:39:01.9666   file:///C:/Documents%20and%20Settings/Brian/My%20Documents/My%20Moo-Sick/Kaiser%20Chiefs/Employment%20(2005)/06%20-%20Oh%20My%20God.wma
2005-11-19 23:39:01.9681 pathFromFileURL: www.allofmp3.com isn't a file URL...
2005-11-19 23:39:01.9684 Backtrace:

   frame 0: Slim::Utils::Misc::pathFromFileURL (/PerlApp/Slim/DataStores/DBI/DBIStore.pm line 1376)
   frame 1: Slim::DataStores::DBI::DBIStore::_hasChanged (/PerlApp/Slim/DataStores/DBI/DBIStore.pm line 1345)
   frame 2: Slim::DataStores::DBI::DBIStore::_checkValidity (/PerlApp/Slim/DataStores/DBI/DBIStore.pm line 246)
   frame 3: Slim::DataStores::DBI::DBIStore::objectForId (/PerlApp/Slim/Music/Import.pm line 260)
   frame 4: Slim::Music::Import::artScan (/PerlApp/Slim/Utils/Scheduler.pm line 99)
   frame 5: Slim::Utils::Scheduler::run_tasks (slimserver.pl line 618)
   frame 6: main::idle (slimserver.pl line 570)
   frame 7: main::main (slimserver.pl line 59)
   frame 8: PerlSvc::Interactive (perlsvc.pl line 1485)
   frame 9: PerlSvc::_interactive (slimserver.pl line 0)
   frame 10: (eval) (slimserver.pl line 0)

2005-11-19 23:39:01.9685 extracted:  from www.allofmp3.com

A similar trace is generated by drilling-down on the second copy of the file (when shown) in the album list.

I'm reporting this following the topic I started in Beginners, "Soon-to-be user, getting worried!" which may contain more information (though less structured).
Comment 1 Brian Ritchie 2005-11-19 17:08:04 UTC
Created attachment 1035 [details]
Full log from running SS on a one-track folder

Log for d_files, d_scan, d_sql
Additional annotations marked "# BR"
(Probably supercedes snippets in initial comment, which could have been much shorter had I realised I could add the full log later!)
Comment 2 Brian Ritchie 2005-11-19 17:24:06 UTC
Created attachment 1036 [details]
Full log from crashed rescan on my main music folder

This is the other log extracted in the main description.
The "previous log" referred to here was from a fresh rescan of the same folder. Curiously, it didn't crash at this point (though allofmp3.com gets a mention again); but it did crash for another allofmp3.com file in another playlist.
Comment 3 Brian Ritchie 2005-11-19 17:29:13 UTC
Created attachment 1037 [details]
Euphoria.m3u - playlist that causes crash in my main folder

The "offending entry" is the Kaiser Chiefs track Oh My God.
In my "Moo-Sick" test, the playlist Euphoriarr.m3u contains just that one entry.
Comment 4 Brian Ritchie 2005-11-19 17:36:41 UTC
Created attachment 1038 [details]
An example WMA file that has a WM/URL tag set to allofmp3.com

The "main offender"; but not the only one, I should add: I've had similar behaviour for two more files, and suspect there may be many more. The common link appears to be that all have a WM/URL tag = allofmp3.com, and all appear in playlists.
Comment 5 Dan Sully 2005-11-21 11:57:15 UTC
Brian - I've checked in change 5272 - which will be in the 11-22-2005 nightly and should fix your issue.

Please give that a try.

Thanks.
Comment 6 Brian Ritchie 2005-11-22 14:51:59 UTC
(In reply to comment #5)
> Brian - I've checked in change 5272 - which will be in the 11-22-2005 nightly
> and should fix your issue.
> 
> Please give that a try.

Excellent! It seems to have done the trick... well, with one minor proviso.
eMusic Tag Editor lets me edit the URL tag, but not delete it; for one
file, I'd emptied the tag, and SS crashed on that:

2005-11-22 22:11:10.0392 extracted: C:\Documents and Settings\Brian\My Documents\My Music\Kaiser Chiefs\Employment (2005)\06 - Oh My God.wma from file:///C:/Documents%20and%20Settings/Brian/My%20Documents/My%20Music/Kaiser%20Chiefs/Employment%20(2005)/06%20-%20Oh%20My%20God.wma
2005-11-22 22:11:10.0625 DBD::SQLite::st execute failed: column url is not unique(1) at dbdimp.c line 401 at C:\program files\slimserver\server\CPAN/DBIx/ContextualFetch.pm line 51, <GEN91> line 328.
2005-11-22 22:11:10.0872 Can't update 0: DBD::SQLite::st execute failed: column url is not unique(1) at dbdimp.c line 401 at C:\program files\slimserver\server\CPAN/DBIx/ContextualFetch.pm line 51, <GEN91> line 328.
 at /PerlApp/Slim/DataStores/DBI/DBIStore.pm line 1890
2005-11-22 22:11:10.1009 Slim::DataStores::DBI::Track Slim::DataStores::DBI::Track=HASH(0x3d520c4) destroyed without saving changes to bitrate, multialbumsortkey, age, remote, ct, size, audio, rate, titlesort, url, lossless, tag, fs, channels, secs, album, tracknum, titlesearch, title, year at /PerlApp/Slim/DataStores/DBI/DBIStore.pm line 1006

Once I re-edited the tag (to "something.else.stupid" :-)) and did a fresh scan, all went well.  A subsequent rescan also worked; and I've not found any "ghost" duplicate tracks in albums.

So, maybe you also need to catch the case where someone's been daft enough to create an empty URL tag (!) too.

I'm impressed at how quickly this has been resolved!  Many thanks.

Brian
Comment 7 Chris Owens 2006-06-16 14:40:01 UTC
There are 536 bugs in the database with targets of '---' that were fixed prior to new year 2006.  I am setting them to targets of 6.2.1 to keep them from showing up in my queries.