Page MenuHomePhabricator

Notice: Undefined index: qb4tlxyr.ogg in /srv/mediawiki/php-1.32.0-wmf.19/extensions/Score/includes/Score.php on line 507
Closed, ResolvedPublic

Description

From hhvm log bucket:

Notice: Undefined index: qb4tlxyr.ogg in /srv/mediawiki/php-1.32.0-wmf.19/extensions/Score/includes/Score.php on line 507

Apparently from https://en.wikipedia.org/w/index.php?action=render&title=Music+of+Star+Wars

#0 /srv/mediawiki/php-1.32.0-wmf.19/extensions/Score/includes/Score.php(507): MWExceptionHandler::handleError(integer, string, string, integer, array, array)
#1 /srv/mediawiki/php-1.32.0-wmf.19/extensions/Score/includes/Score.php(343): Score::generateHTML(Parser, string, array)
#2 /srv/mediawiki/php-1.32.0-wmf.19/includes/parser/Parser.php(3953): Score::render(string, array, Parser, PPTemplateFrame_Hash)
#3 /srv/mediawiki/php-1.32.0-wmf.19/includes/parser/CoreParserFunctions.php(1099): Parser->extensionSubstitution(array, PPTemplateFrame_Hash)
#4 /srv/mediawiki/php-1.32.0-wmf.19/includes/parser/Parser.php(3478): CoreParserFunctions::tagObj(Parser, PPTemplateFrame_Hash, array)
#5 /srv/mediawiki/php-1.32.0-wmf.19/includes/parser/Parser.php(3185): Parser->callParserFunction(PPTemplateFrame_Hash, string, array)
#6 /srv/mediawiki/php-1.32.0-wmf.19/includes/parser/Preprocessor_Hash.php(1114): Parser->braceSubstitution(array, PPTemplateFrame_Hash)
#7 /srv/mediawiki/php-1.32.0-wmf.19/extensions/Scribunto/includes/engines/LuaCommon/LuaCommon.php(889): PPFrame_Hash->expand(PPNode_Hash_Tree)
#8 /srv/mediawiki/php-1.32.0-wmf.19/extensions/Scribunto/includes/engines/LuaCommon/LuaCommon.php(724): Scribunto_LuaEngine->doCachedExpansion(PPTemplateFrame_Hash, PPNode_Hash_Tree, array)
#9 /srv/mediawiki/php-1.32.0-wmf.19/extensions/Scribunto/includes/engines/LuaSandbox/Engine.php(393): Scribunto_LuaEngine->expandTemplate(string, string, array)
#10 [internal function]: Scribunto_LuaSandboxCallback->__call(string, array)
#11 /srv/mediawiki/php-1.32.0-wmf.19/extensions/Scribunto/includes/engines/LuaSandbox/Engine.php(316): LuaSandboxFunction->call(LuaSandboxFunction)
#12 /srv/mediawiki/php-1.32.0-wmf.19/extensions/Scribunto/includes/engines/LuaCommon/LuaCommon.php(295): Scribunto_LuaSandboxInterpreter->callFunction(LuaSandboxFunction, LuaSandboxFunction)
#13 /srv/mediawiki/php-1.32.0-wmf.19/extensions/Scribunto/includes/engines/LuaCommon/LuaCommon.php(967): Scribunto_LuaEngine->executeFunctionChunk(LuaSandboxFunction, PPTemplateFrame_Hash)
#14 /srv/mediawiki/php-1.32.0-wmf.19/extensions/Scribunto/includes/common/Hooks.php(128): Scribunto_LuaModule->invoke(string, PPTemplateFrame_Hash)
#15 /srv/mediawiki/php-1.32.0-wmf.19/includes/parser/Parser.php(3478): ScribuntoHooks::invokeHook(Parser, PPTemplateFrame_Hash, array)
#16 /srv/mediawiki/php-1.32.0-wmf.19/includes/parser/Parser.php(3185): Parser->callParserFunction(PPTemplateFrame_Hash, string, array)
#17 /srv/mediawiki/php-1.32.0-wmf.19/includes/parser/Preprocessor_Hash.php(1114): Parser->braceSubstitution(array, PPTemplateFrame_Hash)
#18 /srv/mediawiki/php-1.32.0-wmf.19/includes/parser/Parser.php(3359): PPFrame_Hash->expand(PPNode_Hash_Tree)
#19 /srv/mediawiki/php-1.32.0-wmf.19/includes/parser/Preprocessor_Hash.php(1114): Parser->braceSubstitution(array, PPFrame_Hash)
#20 /srv/mediawiki/php-1.32.0-wmf.19/includes/parser/Parser.php(2999): PPFrame_Hash->expand(PPNode_Hash_Tree, integer)
#21 /srv/mediawiki/php-1.32.0-wmf.19/includes/parser/Parser.php(1345): Parser->replaceVariables(string)
#22 /srv/mediawiki/php-1.32.0-wmf.19/includes/parser/Parser.php(474): Parser->internalParse(string)
#23 /srv/mediawiki/php-1.32.0-wmf.19/includes/content/WikitextContent.php(341): Parser->parse(string, Title, ParserOptions, boolean, boolean, integer)
#24 /srv/mediawiki/php-1.32.0-wmf.19/includes/content/AbstractContent.php(516): WikitextContent->fillParserOutput(Title, integer, ParserOptions, boolean, ParserOutput)
#25 /srv/mediawiki/php-1.32.0-wmf.19/includes/poolcounter/PoolWorkArticleView.php(145): AbstractContent->getParserOutput(Title, integer, ParserOptions)
#26 /srv/mediawiki/php-1.32.0-wmf.19/includes/poolcounter/PoolCounterWork.php(123): PoolWorkArticleView->doWork()
#27 /srv/mediawiki/php-1.32.0-wmf.19/includes/page/Article.php(604): PoolCounterWork->execute()
#28 /srv/mediawiki/php-1.32.0-wmf.19/includes/page/Article.php(1541): Article->view()
#29 /srv/mediawiki/php-1.32.0-wmf.19/includes/actions/RenderAction.php(44): Article->render()
#30 /srv/mediawiki/php-1.32.0-wmf.19/includes/MediaWiki.php(501): RenderAction->show()
#31 /srv/mediawiki/php-1.32.0-wmf.19/includes/MediaWiki.php(294): MediaWiki->performAction(Article, Title)
#32 /srv/mediawiki/php-1.32.0-wmf.19/includes/MediaWiki.php(868): MediaWiki->performRequest()
#33 /srv/mediawiki/php-1.32.0-wmf.19/includes/MediaWiki.php(525): MediaWiki->main()
#34 /srv/mediawiki/php-1.32.0-wmf.19/index.php(42): MediaWiki->run()
#35 /srv/mediawiki/w/index.php(3): include(string)
#36 {main}

Looks like some metadata for an audio file are missing the length attribute:

includes/Score.php
506             if ( $options['generate_audio'] ) {
507                 $length = $metaData[$audioFileName]['length'];
508                 $mimetype = pathinfo( $audioUrl, PATHINFO_EXTENSION ) === 'mp3'
509                     ? 'audio/mpeg'
510                     : 'application/ogg'; // TMH needs application/ogg
511                 $player = new TimedMediaTransformOutput( [
512                     'length' => $length,
513                     'sources' => [
514                         [
515                             'src' => $audioUrl,
516                             'type' => $mimetype
517                         ]
518                     ],
519                     'disablecontrols' => 'options,timedText',
520                     'width' => self::DEFAULT_PLAYER_WIDTH
521                 ] );

Event Timeline

hashar created this task.Sep 5 2018, 12:54 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 5 2018, 12:54 PM
hashar updated the task description. (Show Details)Sep 5 2018, 1:04 PM
Ebe123 claimed this task.Sep 5 2018, 1:28 PM
Ebe123 moved this task from Backlog to Audio on the MediaWiki-extensions-Score board.
Ebe123 added a subscriber: Ebe123.

Where is the score coming from on that page? The metadata file is messed up: https://upload.wikimedia.org/score/q/b/qb4tlxyr3jtipjmnko0hbntou4dcsm4/qb4tlxyr.json and there is no score.

Change 458263 had a related patch set uploaded (by Ebe123; owner: Ebe123):
[mediawiki/extensions/Score@master] Add check for null audio lengths

https://gerrit.wikimedia.org/r/458263

Ebe123 added a comment.Sep 5 2018, 6:32 PM

I knew this was going to happen! People are using the <score tag not for sheet music, but for MIDI->OGG conversion. Created a check for a zero/null value for length to resolve this.

Lovely. :-( Thanks for the fix.

Change 458263 merged by jenkins-bot:
[mediawiki/extensions/Score@master] Add check for null audio lengths

https://gerrit.wikimedia.org/r/458263

Change 458276 had a related patch set uploaded (by Jforrester; owner: Ebe123):
[mediawiki/extensions/Score@wmf/1.32.0-wmf.20] Add check for null audio lengths

https://gerrit.wikimedia.org/r/458276

Change 458276 merged by jenkins-bot:
[mediawiki/extensions/Score@wmf/1.32.0-wmf.20] Add check for null audio lengths

https://gerrit.wikimedia.org/r/458276

Mentioned in SAL (#wikimedia-operations) [2018-09-05T23:22:32Z] <jforrester@deploy1001> Synchronized php-1.32.0-wmf.20/extensions/Score/includes/Score.php: SWAT Fix error on malformed MIDI files T203560 (duration: 01m 04s)

Mentioned in SAL (#wikimedia-operations) [2018-09-05T23:27:13Z] <jforrester@deploy1001> Synchronized php-1.32.0-wmf.20/extensions/Score/includes/Score.php: SWAT Fix error for T203560 (duration: 00m 54s)

Change 458503 had a related patch set uploaded (by Ebe123; owner: Ebe123):
[mediawiki/extensions/Score@master] Add checks for length of generated audio files

https://gerrit.wikimedia.org/r/458503

Change 458503 merged by jenkins-bot:
[mediawiki/extensions/Score@master] Add checks for length of generated audio files

https://gerrit.wikimedia.org/r/458503

Change 458558 had a related patch set uploaded (by Jforrester; owner: Ebe123):
[mediawiki/extensions/Score@wmf/1.32.0-wmf.20] Add checks for length of generated audio files

https://gerrit.wikimedia.org/r/458558

Change 458558 merged by jenkins-bot:
[mediawiki/extensions/Score@wmf/1.32.0-wmf.20] Add checks for length of generated audio files

https://gerrit.wikimedia.org/r/458558

Mentioned in SAL (#wikimedia-operations) [2018-09-06T23:43:10Z] <thcipriani@deploy1001> Synchronized php-1.32.0-wmf.20/extensions/Score/includes/Score.php: SWAT: [[gerrit:458558|Add checks for length of generated audio files]] T203560 (duration: 00m 58s)

Change 458910 had a related patch set uploaded (by Ebe123; owner: Ebe123):
[mediawiki/extensions/Score@master] Check for override_midi in TMH player

https://gerrit.wikimedia.org/r/458910

Krinkle added a subscriber: Krinkle.

Thanks for all the work here. Was just triaging the error logs today and noticed it appears to still exist. Here's the updated stacktrace, in case this is unexpected.

PHP Notice: Undefined index: lk3xwjo1.ogg

#0 /srv/mediawiki/php-1.32.0-wmf.20/extensions/Score/includes/Score.php(513): MWExceptionHandler::handleError(integer, string, string, integer, array, array)
#1 /srv/mediawiki/php-1.32.0-wmf.20/extensions/Score/includes/Score.php(344): Score::generateHTML(Parser, string, array)
#2 /srv/mediawiki/php-1.32.0-wmf.20/includes/parser/Parser.php(3970): Score::render(string, array, Parser, PPTemplateFrame_Hash)
#3 /srv/mediawiki/php-1.32.0-wmf.20/includes/parser/CoreParserFunctions.php(1099): Parser->extensionSubstitution(array, PPTemplateFrame_Hash)
#4 /srv/mediawiki/php-1.32.0-wmf.20/includes/parser/Parser.php(3495): CoreParserFunctions::tagObj(Parser, PPTemplateFrame_Hash, array)
#5 /srv/mediawiki/php-1.32.0-wmf.20/includes/parser/Parser.php(3202): Parser->callParserFunction(PPTemplateFrame_Hash, string, array)
#6 /srv/mediawiki/php-1.32.0-wmf.20/includes/parser/Preprocessor_Hash.php(1114): Parser->braceSubstitution(array, PPTemplateFrame_Hash)
#7 /srv/mediawiki/php-1.32.0-wmf.20/extensions/Scribunto/includes/engines/LuaCommon/LuaCommon.php(889): PPFrame_Hash->expand(PPNode_Hash_Tree)
#8 /srv/mediawiki/php-1.32.0-wmf.20/extensions/Scribunto/includes/engines/LuaCommon/LuaCommon.php(724): Scribunto_LuaEngine->doCachedExpansion(PPTemplateFrame_Hash, PPNode_Hash_Tree, array)
#9 /srv/mediawiki/php-1.32.0-wmf.20/extensions/Scribunto/includes/engines/LuaSandbox/Engine.php(393): Scribunto_LuaEngine->expandTemplate(string, string, array)
#10 [internal function]: Scribunto_LuaSandboxCallback->__call(string, array)
#11 /srv/mediawiki/php-1.32.0-wmf.20/extensions/Scribunto/includes/engines/LuaSandbox/Engine.php(316): LuaSandboxFunction->call(LuaSandboxFunction)
#12 /srv/mediawiki/php-1.32.0-wmf.20/extensions/Scribunto/includes/engines/LuaCommon/LuaCommon.php(295): Scribunto_LuaSandboxInterpreter->callFunction(LuaSandboxFunction, LuaSandboxFunction)
#13 /srv/mediawiki/php-1.32.0-wmf.20/extensions/Scribunto/includes/engines/LuaCommon/LuaCommon.php(967): Scribunto_LuaEngine->executeFunctionChunk(LuaSandboxFunction, PPTemplateFrame_Hash)
#14 /srv/mediawiki/php-1.32.0-wmf.20/extensions/Scribunto/includes/common/Hooks.php(128): Scribunto_LuaModule->invoke(string, PPTemplateFrame_Hash)
#15 /srv/mediawiki/php-1.32.0-wmf.20/includes/parser/Parser.php(3495): ScribuntoHooks::invokeHook(Parser, PPTemplateFrame_Hash, array)
#16 /srv/mediawiki/php-1.32.0-wmf.20/includes/parser/Parser.php(3202): Parser->callParserFunction(PPTemplateFrame_Hash, string, array)
#17 /srv/mediawiki/php-1.32.0-wmf.20/includes/parser/Preprocessor_Hash.php(1114): Parser->braceSubstitution(array, PPTemplateFrame_Hash)
#18 /srv/mediawiki/php-1.32.0-wmf.20/includes/parser/Parser.php(3376): PPFrame_Hash->expand(PPNode_Hash_Tree)
#19 /srv/mediawiki/php-1.32.0-wmf.20/includes/parser/Preprocessor_Hash.php(1114): Parser->braceSubstitution(array, PPFrame_Hash)
#20 /srv/mediawiki/php-1.32.0-wmf.20/includes/parser/Parser.php(3016): PPFrame_Hash->expand(PPNode_Hash_Tree, integer)
#21 /srv/mediawiki/php-1.32.0-wmf.20/includes/parser/Parser.php(1352): Parser->replaceVariables(string)
#22 /srv/mediawiki/php-1.32.0-wmf.20/includes/parser/Parser.php(476): Parser->internalParse(string)
#23 /srv/mediawiki/php-1.32.0-wmf.20/includes/content/WikitextContent.php(341): Parser->parse(string, Title, ParserOptions, boolean, boolean, integer)

No, it was expected; https://gerrit.wikimedia.org/r/458910 fixes the problem, the previous patch fixed half of it.

Krinkle added a subscriber: brion.

Thanks. Tagging Editing-team per mw:Maintainers, so that this is on their radar. In this particular case, looks like it only needs code review, a patch already exists.

Given past history, it seems @brion might also be available to provide Score/TMH knowledge if needed in review.

There isn't anything related to VisualEditor here.

There isn't anything related to VisualEditor here.

It was pointed out to me that Editing-team currently uses the VisualEditor workboard for triaging, including non-VE work. That might change soon, but afaik hasn't happened yet. Sorry about the confusion.

Change 458910 merged by jenkins-bot:
[mediawiki/extensions/Score@master] Check for override_midi in TMH player

https://gerrit.wikimedia.org/r/458910

Change 460938 had a related patch set uploaded (by Sbisson; owner: Ebe123):
[mediawiki/extensions/Score@wmf/1.32.0-wmf.20] Check for override_midi in TMH player

https://gerrit.wikimedia.org/r/460938

Change 460938 merged by jenkins-bot:
[mediawiki/extensions/Score@wmf/1.32.0-wmf.20] Check for override_midi in TMH player

https://gerrit.wikimedia.org/r/460938

Mentioned in SAL (#wikimedia-operations) [2018-09-17T18:34:58Z] <sbisson@deploy1001> Synchronized php-1.32.0-wmf.20/extensions/Score/includes/Score.php: T203560 (duration: 00m 50s)

Ebe123 triaged this task as Normal priority.Sep 17 2018, 6:36 PM
Ebe123 closed this task as Resolved.

Seems to be thoroughly fixed now. T203873 will re-generate audio that is of lesser quality.

Thank you ! :]