Bug 9223 - Scanner logging tons of errors
: Scanner logging tons of errors
Status: CLOSED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Scanner
: 7.2
: PC Windows XP
: -- normal (vote)
: 7.x
Assigned To: Michael Herger
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-08-20 00:58 UTC by Michael Herger
Modified: 2009-09-08 09:30 UTC (History)
2 users (show)

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Herger 2008-08-20 00:58:09 UTC
Every track is spitting out the following line:

[08-08-20 09:55:00.7184] Slim::Player::ProtocolHandlers::handlerForURL (114) Warning: Use of uninitialized value in pattern match (m//) at D:/eclipse/Boom/server/Slim/Player/ProtocolHandlers.pm line 114.

Might be a Windows only issue: "M:/something/..." is considere a url, using protocol "M", for which there's no protocol-handler. But as handlerForURL hasn't been changed in a good while, the question is why it's called with that value.

Backtrace: 

[08-08-20 09:55:00.7192] Slim::Player::ProtocolHandlers::handlerForURL (108) Backtrace:

   frame 0: Slim::Utils::Log::logBacktrace (D:/eclipse/Boom/server/Slim/Player/ProtocolHandlers.pm line 108)
   frame 1: Slim::Player::ProtocolHandlers::handlerForURL (D:/eclipse/Boom/server/Slim/Music/Info.pm line 1019)
   frame 2: Slim::Music::Info::isRemoteURL (D:/eclipse/Boom/server/Slim/Music/Info.pm line 1525)
   frame 3: Slim::Music::Info::typeFromPath (D:/eclipse/Boom/server/Slim/Formats.pm line 153)
   frame 4: Slim::Formats::readTags (D:/eclipse/Boom/server/Slim/Schema.pm line 858)
   frame 5: Slim::Schema::newTrack (D:/eclipse/Boom/server/Slim/Utils/Scanner.pm line 335)
   frame 6: Slim::Utils::Scanner::scanDirectory (D:/eclipse/Boom/server/Slim/Music/MusicFolderScan.pm line 79)
   frame 7: Slim::Music::MusicFolderScan::startScan (D:/eclipse/Boom/server/Slim/Music/Import.pm line 491)
   frame 8: Slim::Music::Import::runImporter (D:/eclipse/Boom/server/Slim/Music/Import.pm line 335)
   frame 9: Slim::Music::Import::runScan (D:/eclipse/Boom/server/scanner.pl line 213)
   frame 10: (eval) (D:/eclipse/Boom/server/scanner.pl line 207)
   frame 11: main::main (D:/eclipse/Boom/server/scanner.pl line 353)
Comment 1 Michael Herger 2008-08-20 01:14:19 UTC
change 22424 removed the early call to isValidHandler(), passing to handlerForURL() without this check. Either we re-introduce the early check or we return undef from handlerForURL() if no handler can be found:

Index: D:/eclipse/Boom/server/Slim/Player/ProtocolHandlers.pm
===================================================================
--- D:/eclipse/Boom/server/Slim/Player/ProtocolHandlers.pm	(revision 22786)
+++ D:/eclipse/Boom/server/Slim/Player/ProtocolHandlers.pm	(working copy)
@@ -106,7 +106,7 @@
 	my $handler = $class->loadHandler($protocol);
 	
 	# Handler should be a class, not '1' for rtsp
-	return $handler =~ /::/ ? $handler : undef;
+	return $handler && $handler =~ /::/ ? $handler : undef;
 }
 
 sub iconHandlerForURL {

Dean/Chris: I'd suggest we include this in 7.2 as the messages create huge scanner log files on Windows. And lack of log rotation this can be a problem.
Comment 2 Blackketter Dean 2008-08-20 11:55:51 UTC
I agree.  Andy: you good with this patch?
Comment 3 Andy Grundman 2008-08-20 12:20:08 UTC
Looks good to me.
Comment 4 Michael Herger 2008-08-20 13:45:58 UTC
change 22794 - suppress a warning for every file scanned on Windows systems
Comment 5 James Richardson 2008-10-16 11:44:07 UTC
Verified fixed in

SqueezeCenter 7.2.1-23555
Comment 6 James Richardson 2008-12-15 12:35:00 UTC
This bug has been fixed in the 7.3.0 release version of SqueezeCenter!

Please download the new version from http://www.slimdevices.com/su_downloads.html if you haven't already.  

If you are still experiencing this problem, feel free to reopen the bug with your new comments and we'll have another look.
Comment 7 Chris Owens 2009-07-31 10:27:42 UTC
Reduce number of active targets for SC