Bug 1506 - WPL playlists with relative paths cause the server to crash
: WPL playlists with relative paths cause the server to crash
Status: RESOLVED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Playlists
: 6.0.2
: PC All
: P2 major (vote)
: ---
Assigned To: Vidur Apparao
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-05-06 12:12 UTC by Kevin Pearsall
Modified: 2008-09-15 14:37 UTC (History)
1 user (show)

See Also:
Category: ---


Attachments
sample WPL playlist with a relative path (476 bytes, application/vnd.ms-wpl)
2005-05-06 12:13 UTC, Kevin Pearsall
Details
log of the crash with d_source d_playlist d_files (12.10 KB, text/plain)
2005-05-06 12:13 UTC, Kevin Pearsall
Details
fix to handle single item playlist (623 bytes, patch)
2005-05-06 16:07 UTC, KDF
Details | Diff
fix relative paths (915 bytes, patch)
2005-05-07 00:19 UTC, KDF
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin Pearsall 2005-05-06 12:12:19 UTC
will attach a log with d_source d_playlist and d_files, as well as a sample
playlist.

reproduced with may 6 nightly of 6.0.3.
Comment 1 Kevin Pearsall 2005-05-06 12:13:28 UTC
Created attachment 491 [details]
sample WPL playlist with a relative path

i did not change the path to a relative path, Windows Media Player put the
relative path in there all by itself...
Comment 2 Kevin Pearsall 2005-05-06 12:13:54 UTC
Created attachment 492 [details]
log of the crash with d_source d_playlist d_files
Comment 3 KDF 2005-05-06 12:25:36 UTC
this is probably related to bug781

of course, what no one has asked yet... if slimserver is to support relative
paths in playlists - relative to what??

WMP would make it relative to its own choice of roots
Comment 4 KDF 2005-05-06 12:34:34 UTC
also related to bug 1282 (not specifically dupes, though)
Comment 5 Marc Sherman 2005-05-06 12:39:28 UTC
In answer to KDF's question in comment 3, slimserver 5.4 supported relative
paths just fine; they were relative to the location of the playlist file itself.
 This interpretation is common among all the windows players I've tried (wmp,
foobar2000, qcd).

This bug doesn't really block 781, because 781 talks about the playlists created
by the slimserver itself, which are m3u files, not wpl.
Comment 6 KDF 2005-05-06 14:37:50 UTC
correct.  I meant to just meantion it in a comment, but accidentally left the
block entry in.

I wonder if this crash still happens with 6.1 builds?  line 578 seems to have no
requirement for an array ref, and isn't even involved in wpl.
Comment 7 KDF 2005-05-06 15:31:35 UTC
line 647 in 6.1 is the same crash.

out of curiosity, I changed it to an absolute path and it still crashes, so I
guess this isn't related at all with the others :)

I wonder if the real problem is that its a playlist of one file.  



Comment 8 KDF 2005-05-06 16:07:09 UTC
Created attachment 495 [details]
fix to handle single item playlist

becuase this sample playlist has only one item, the assumption of an array to
parse caused a crash.  This patch fixes it.  with this patch, this becomes a
dupe of bug 1282 where we have deep recursion if the path is relative.

changing the path to absolute in the sample playlist now works.
Comment 9 KDF 2005-05-06 16:08:43 UTC
reassigning to vidur for consideration in tandem to bug 1282.

parsing the relative item gives this:

Deep recursion on subroutine "Slim::DataStores::DBI::DBIStore::objectForUrl" at
D:/slim/server/Slim/Music/Info.pm line 295.
Deep recursion on subroutine "Slim::DataStores::DBI::DBIStore::_checkValidity"
at D:/slim/server/Slim/DataStores/DBI/DBIStore.pm line 151.
Deep recursion on subroutine "Slim::DataStores::DBI::DBIStore::_hasChanged" at
D:/slim/server/Slim/DataStores/DBI/DBIStore.pm line 1038.
Deep recursion on subroutine "Slim::Utils::Misc::pathFromFileURL" at
D:/slim/server/Slim/DataStores/DBI/DBIStore.pm line 1073.
Deep recursion on subroutine "Slim::Music::Info::isCached" at
D:/slim/server/Slim/Utils/Misc.pm line 222.
Terminating on signal SIGINT(2)
Comment 10 Kevin Pearsall 2005-05-06 16:42:41 UTC
well, the customer i was speaking with was experiencing problems with playlists
that were far more than one file...  this is just one i whipped up to test with...
Comment 11 KDF 2005-05-06 17:12:46 UTC
relative paths are still a problem.  The sample uncovered a different bug :)

I know where the problem is (Utils::Misc::fixPath).

..\Documents gets fixed to c:\playlists\..\Documents somehow.
Comment 12 KDF 2005-05-06 19:56:53 UTC
attachment 495 [details] commited to 6.1 at change 3144
Comment 13 KDF 2005-05-07 00:19:40 UTC
Created attachment 499 [details]
fix relative paths

it may not be the prettiest method, but it works.  tested on winxp with a wpl
created by wmp10.  same patch as attached to bug 1286
Comment 14 Dan Sully 2005-05-22 12:16:18 UTC
Fix from kdf commited in subversion change 3280.
Comment 15 Chris Owens 2006-06-16 14:39:57 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.