Bug 1373 - blank entry in music folder (was: slimserver crashes - Can't call method "titlesort" on an undefined value)
: blank entry in music folder (was: slimserver crashes - Can't call method "tit...
Status: CLOSED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Database
: 6.1.0
: PC All
: P2 normal (vote)
: ---
Assigned To: Vidur Apparao
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-04-13 17:40 UTC by michael
Modified: 2008-08-18 10:54 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 michael 2005-04-13 17:40:20 UTC
using a recent svn checkout (revision 2958 at the moment)
slimser is playing along and then suddenly crashes. The console message says:

Can't call method "titlesort" on an undefined value at
/usr/src/slim/server/Slim/Music/Info.pm line 1061

--d_info  doesn't reveal anything more useful.
Comment 1 KDF 2005-04-13 21:35:27 UTC
d_sql, d_files maybe

you could also add this before the return at 1060:

unless ($obj) {
   print "object not found for $item\n";
   Slim::Utils::Misc::bt();
}
Comment 2 KDF 2005-04-13 21:39:46 UTC
oh...apparently this bug was mentioned in teh comments for bug1329.  Vidur just
committed a fix at r2959 that fixes this crash.
Comment 3 michael 2005-04-13 22:54:43 UTC
reopening this. 
The change in 2959 certainly keeps it from crashing, but there's still an
underlying cause that needs to be pinned down, at least for this code path.
updating summary to reflect new behaviour.

So, here's what I've tracked down so far...
If you have "Sort By File Name" set to "Sort by song information" and you Browse
Music Folder to a directory that contains an external cuesheet, then
getInfoForSort() gets an incorrect value from isList().  Before revision 2959,
this would cause a crash. After 2959, it displays a blank entry (no title/link,
just buttons) where the cuesheet file should be listed.  The lack of a title
suggests that perhaps objectForUrl() isn't returning an object in this case.

Then, if you leave it running for awhile, it'll "fix" itself.  But don't worry,
if it does this all you have to do is wipe cache to get back to the bug
behaviour described here.

Comment 4 KDF 2005-04-14 01:33:37 UTC
seems that new folders also cause this blank entry in Browse Music Folder.  This
is relatively new, since this used to work fine.
Comment 5 Vidur Apparao 2005-04-15 15:07:50 UTC
Could be related to my posting to
http://forums.slimdevices.com/showthread.php?t=13622.
Comment 6 Dan Sully 2005-04-19 11:33:04 UTC
Vidur - I think I saw a checkin from you to fix this?
Comment 7 Vidur Apparao 2005-04-19 11:37:39 UTC
Actually, r2987 from Michael should have fixed this. Michael, can you confirm?
Comment 8 michael 2005-04-19 13:32:26 UTC
The crash or blank line issue specifically mentioned is fixed, and the remaining
problems seem to be captured by other bug entries, so I guess this can be closed.

Outstanding issues worth noting, sorting is all wrong (see bug 1360) and fixing
this seems to have reverted my partial fix for bug 720.
Comment 9 Chris Owens 2008-03-11 11:28:10 UTC
This bug was marked resolved in Slimserver 6.1, which is several versions ago.  If you're still seeing this bug, please re-open it.  Thanks!