Bug 957 - SlimServer crash on rescan if inaccurate windows shortcut in music folder
: SlimServer crash on rescan if inaccurate windows shortcut in music folder
Status: RESOLVED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Database
: 6.0.0
: PC Windows (legacy)
: P2 major (vote)
: ---
Assigned To: Dan Sully
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-03-06 15:47 UTC by John Eckman
Modified: 2008-08-18 10:53 UTC (History)
0 users

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Eckman 2005-03-06 15:47:37 UTC
If windows shortcuts (in the sense of symbolic links/aliases from one folder 
to another) exist in the music folder to which slimserver is pointed, and the 
folder to which the shortcut points is not available (on a drive not mounted, 
for example), the server crashes when a rescan occurs - either manually 
triggered in the server_settings through the web ui, or triggered by the 
scheduled rescan from the plug in. 

Does not crash on initial scan, only rescans. 

Server should ignore shortcuts which can't be resolved, not die. (Obviously it 
can't do anything with the bad folder - except perhaps log it? only if debug 
option for scan is on?)
Comment 1 John Eckman 2005-03-06 15:50:03 UTC
Event in the event log: 
Can't call method "url" on an undefined value at: /Perl/App/Slim/Music/Info.pm 
at line 819

This might be different line number in different releases - I observed it in 
6.0a1 and 6.0a2 as well as a variety of 6.0 nightlies, but I think it moved 
from line 818 to 819 somewhere in there. 
Comment 2 KDF 2005-03-10 02:21:25 UTC
I believe 6.0b1 should be able to trap this error, avoid the crash and output
log text for d_info.

Can you try this out and see what you can see? :)
Comment 3 John Eckman 2005-03-10 11:54:10 UTC
Tried it with 6.0b1

Undefined subroutine &Slim::Music::Info::msg called 
at /PerlApp/Slim/Music/Info.pm line 875.
Comment 4 Dan Sully 2005-03-10 12:00:07 UTC
John - are you running the .exe version, or using ActiveState?

There's a small typo at that line. It can be changed to Slim::Utils::Misc::msg
instead of just msg.
Comment 5 John Eckman 2005-03-11 09:06:09 UTC
Just confirmed this bug is fixed now with two different scenarios:

1. Link to folder on another drive letter on the machine (D:\folder\) - scan 
with it available, rescan with it available, all is fine (tracks in it found). 
Then, make that drive not available (map to a different letter, for example) - 
launch server ok, rescan ok - removes tracks not found.

2. Link to a network share (folder) - scan with it available, rescan with it 
available - all is fine (tracks found). Then, make that network share not 
available (unmount - it is password protected and can't be remounted without 
my intervention) - launch server ok, rescan ok - removes tracks as not found.