Bugzilla – Bug 7937
problem with parsing ogg file headers
Last modified: 2009-07-31 10:19:44 UTC
I am having problems playing oggs files with this version 19009 An example This is the vorbis info on the file ===================== vorbiscomment 11.Bizarre_Love_Triangle.ogg ARTIST=New Order ALBUM=Substance 1987 Disc 1 TITLE=Bizarre Love Triangle TRACKNUMBER=11 ===================== this is from the errorlog ===================== [08-04-22 08:42:50.3288] Slim::Utils::Misc::msg (1329) Warning: [08:42:50.3282] This is not an Ogg bitstream (no OggS header). at /usr/share/squeezecenter/lib/Ogg/Vorbis/Header/PurePerl.pm line 138. [08-04-22 08:42:50.3369] Slim::Utils::Misc::msg (1329) Warning: [08:42:50.3367] Use of uninitialized value in addition (+) at /usr/share/squeezecenter/lib/Ogg/Vorbis/Header/PurePerl.pm line 199. [08-04-22 08:42:50.3372] Slim::Utils::Misc::msg (1329) Warning: [08:42:50.3369] Use of uninitialized value in seek at /usr/share/squeezecenter/lib/Ogg/Vorbis/Header/PurePerl.pm line 202. [08-04-22 08:42:50.3376] Slim::Utils::Misc::msg (1329) Warning: [08:42:50.3374] No comment header? at /usr/share/squeezecenter/lib/Ogg/Vorbis/Header/PurePerl.pm line 262. [08-04-22 08:42:50.3379] Slim::Utils::Misc::msg (1329) Warning: [08:42:50.3377] Ogg::Vorbis::Header::PurePerl: Didn't find an ogg header - invalid file? ===================== Seems like it can't handle there being now comment field (guessing by the error message) I am running squeezecenter on debian amd64 Alex
Please attach the file.
Keyzer, can you get me a broken file ASAP? Would like to fix this before 7.0.1.
Hi Would love to, but when I attempt to recreate it for the same file it doesn't always work - so I am guessing it is not a problem with the file itself. I have added logWarning("Ogging ->".$file); in Ogg.pm and see if I can track it down from there
Let me correct that I have added a logWarning to /usr/share/squeezecenter/lib/Ogg/Vorbis/Header/PurePerl.pm seems like it gets called from other places apart from Ogg.pm I add this warn $data->{'filename'}; to /usr/share/squeezecenter/lib/Ogg/Vorbis/Header/PurePerl.pm @ 137 but it seem like filename isn't always set (sorry looking for a quick hack to find the problem). The file it failed on the first time, did not fail the second time (even after a restart of the server). What I do to get the problem to occur is load a playlist (about 20-30 songs), then start clicking around the playlist, which causes this error to occur. what I notice as well is I get decode errors on the player at the same time (squeezeslave). My gut feeling (only a feeling) is that, this is a plugin problem, i installed a whole lot of plugins before (since removed, but not sure what has been left behind). SC gets slow and unresponsive at these times. If I load the play list and then let it play I normally don't have any problems. I will read up a bit more on getting filenames from perl filehandles if i can and try some more, also maybe a stack dump as well to see where this call has come from alex
Are you running 7.1 and seeking within Ogg files? That might be part of your problem, especially if Squeezeslave doesn't support it. Try using a real player.
Hi Yep 7.1, I will try the SB3, but I haven't been trying to seek at all. The only thing I try is to change tracks whilst the other is still playing.
Andy I have tried with a SB3 and having had a play with it for a while (about the same time as with squeezeslave), I have not seen these errors come up. I presume by your comments and by investigating a bit, that the sb3 doesn't handle ogg natively and there for doesn't suffer from the this, where as squeezeslave does and suffers from the problem because of the inability to search (ff or fr) a ogg stream. looks like it can be closed then
SB does support native Ogg, and has some problems with it, but in general it works fine.
Hi I think I have spoken too soon, I have upgraded to 19102. I got the errors again, whilst loading a playlist to a SB3. Scenario sc was freshly restarted and the SB3 had been reboot. And the play list wasn't active on any device. I did a quick strace on squeezecenter as I had removed the debug code (and lost on the upgrade). So I think we should re open the bug
Hi I think I have spoken too soon, I have upgraded to 19102. I got the errors again, whilst loading a playlist to a SB3. Scenario sc was freshly restarted and the SB3 had been reboot. And the play list wasn't active on any device. I did a quick strace on squeezecenter as I had removed the debug code (and lost on the upgrade). Seem like it was scanning each of the files So I think we should re open the bug
Hi I have added a Carp::cluck at 137 /usr/share/squeezecenter/lib/Ogg/Vorbis/Header/PurePerl.pm this is just before the warning - seems like an appropriate place this is the output [08-04-25 18:14:13.0212] Slim::Utils::Misc::msg (1329) Warning: [18:14:13.0208] at /usr/share/squeezecenter/lib/Ogg/Vorbis/Header/PurePerl.pm line 139 Ogg::Vorbis::Header::PurePerl::_checkHeader('HASH(0x5522610)') called at /usr/share/squeezecenter/lib/Ogg/Vorbis/Header/PurePerl.pm line 100 Ogg::Vorbis::Header::PurePerl::_init('HASH(0x5522610)') called at /usr/share/squeezecenter/lib/Ogg/Vorbis/Header/PurePerl.pm line 48 Ogg::Vorbis::Header::PurePerl::new('Ogg::Vorbis::Header::PurePerl', 'GLOB(0x5a4e9c0)') called at /usr/share/perl5/Slim/Formats/Ogg.pm line 252 Slim::Formats::Ogg::getInitialAudioBlock('Slim::Formats::Ogg', 'FileHandle=GLOB(0x53d93a0)') called at /usr/share/perl5/Slim/Player/Source.pm line 2052 Slim::Player::Source::openSong('Slim::Player::Squeezebox2=ARRAY(0x5688b40)', 'undef') called at /usr/share/perl5/Slim/Player/Source.pm line 377 Slim::Player::Source::playmode('Slim::Player::Squeezebox2=ARRAY(0x5688b40)', 'play') called at /usr/share/perl5/Slim/Player/Source.pm line 1291 Slim::Player::Source::jumpto('Slim::Player::Squeezebox2=ARRAY(0x5688b40)', 7, 'undef') called at /usr/share/perl5/Slim/Control/Commands.pm line 754 Slim::Control::Commands::__ANON__() called at /usr/share/perl5/Slim/Control/Commands.pm line 809 Slim::Control::Commands::playlistJumpCommand('Slim::Control::Request=HASH(0x58405e0)') called at /usr/share/perl5/Slim/Control/Request.pm line 1753 eval {...} called at /usr/share/perl5/Slim/Control/Request.pm line 1753 Slim::Control::Request::execute('Slim::Control::Request=HASH(0x58405e0)') called at /usr/share/perl5/Slim/Web/JSONRPC.pm line 354 Slim::Web::JSONRPC::requestMethod('HASH(0x5a3c6b0)') called at /usr/share/perl5/Slim/Web/JSONRPC.pm line 201 eval {...} called at /usr/share/perl5/Slim/Web/JSONRPC.pm line 201 Slim::Web::JSONRPC::handleURI('Slim::Web::HTTP::ClientConn=GLOB(0x5968700)', 'HTTP::Response=HASH(0x5a3ba50)') called at /usr/share/perl5/Slim/Web/HTTP.pm line 497 Slim::Web::HTTP::processHTTP('Slim::Web::HTTP::ClientConn=GLOB(0x5968700)') called at /usr/share/perl5/Slim/Networking/Select.pm line 243 eval {...} called at /usr/share/perl5/Slim/Networking/Select.pm line 243 Slim::Networking::Select::select(0.422580718994141) called at /usr/sbin/squeezecenter-server line 503 main::idle() called at /usr/sbin/squeezecenter-server line 453 main::main() called at /usr/sbin/squeezecenter-server line 1012 This was against a SB3, what i did was load a playlist with about 20-30 songs and then quickly select 2 or 3 different tracks. SC seemsed to freeze for a while and then became responsive again. These were left in the server.log file
Could you reproduce with --debug scan.scanner,player.source? I think I have actually seen this too, I think the problem might be SC is trying to scan a non-Ogg file as Ogg. Did you have some non-Ogg files in the playlist?
I see the problem, the $client->streamformat can get confused and try to find an initial audio block using the wrong format class. This is only a 7.1+ issue.
And the reason for the delay is the _skipID3Header function, it is scanning the entire file looking for OggS. I'll fix this to give up after some small amount of data (or actually check for an ID3 header).
I fixed the Ogg parser so it will at least fail a lot quicker when it has to seek through the whole file. I'll look at fixing the invalid streamformat issue soon.
Fixed in 7.1 change 19168. The streamformat was not being set early enough.
Keyzer: Can you please test the latest 7.1 nightly build. Reopen this bug if you still sen an issue.
Keyzer, please retest with SqueezeCenter 7.1-21796. if you still see the error, then reopen the bug with added comments.
This bug has now been fixed in the 7.1 release version of SqueezeCenter! Please download the new version from http://www.slimdevices.com 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.
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.
Reduce number of active targets for SC