Page MenuHomePhabricator

Score/TMH PHP fatal on page view in master
Closed, ResolvedPublic

Description

Navigate to http://en.wikipedia.beta.wmflabs.org/wiki/User:Jdforrester_(WMF)/sandbox right now and you get:

Exception encountered, of type "BadMethodCallException"
[Vzrq4gpEEH8AADW-48kAAAAH] /wiki/User:Jdforrester_(WMF)/sandbox BadMethodCallException from line 81 of /srv/mediawiki/php-master/extensions/TimedMediaHandler/handlers/TextHandler/TextHandler.php: Call to a member function isLocal() on a non-object (boolean)
Backtrace:
#0 /srv/mediawiki/php-master/extensions/TimedMediaHandler/TimedMediaTransformOutput.php(330): TextHandler->getTracks()
#1 /srv/mediawiki/php-master/extensions/TimedMediaHandler/TimedMediaTransformOutput.php(144): TimedMediaTransformOutput->getHtmlMediaTagOutput()
#2 /srv/mediawiki/php-master/extensions/Score/Score.body.php(508): TimedMediaTransformOutput->toHtml()
#3 /srv/mediawiki/php-master/extensions/Score/Score.body.php(314): Score::generateHTML(Parser, string, array)
#4 /srv/mediawiki/php-master/includes/parser/Parser.php(3753): Score::render(string, array, Parser, PPFrame_Hash)
#5 /srv/mediawiki/php-master/includes/parser/Preprocessor_Hash.php(1148): Parser->extensionSubstitution(array, PPFrame_Hash)
#6 /srv/mediawiki/php-master/includes/parser/Parser.php(2857): PPFrame_Hash->expand(PPNode_Hash_Tree, integer)
#7 /srv/mediawiki/php-master/includes/parser/Parser.php(1229): Parser->replaceVariables(string)
#8 /srv/mediawiki/php-master/includes/parser/Parser.php(427): Parser->internalParse(string)
#9 /srv/mediawiki/php-master/includes/StubObject.php(105): Parser->parse(string, Title, ParserOptions, boolean, boolean, integer)
#10 /srv/mediawiki/php-master/includes/StubObject.php(129): StubObject->_call(string, array)
#11 /srv/mediawiki/php-master/includes/content/WikitextContent.php(331): StubObject->__call(string, array)
#12 /srv/mediawiki/php-master/includes/content/AbstractContent.php(497): WikitextContent->fillParserOutput(Title, integer, ParserOptions, boolean, ParserOutput)
#13 /srv/mediawiki/php-master/includes/poolcounter/PoolWorkArticleView.php(140): AbstractContent->getParserOutput(Title, integer, ParserOptions)
#14 /srv/mediawiki/php-master/includes/poolcounter/PoolCounterWork.php(123): PoolWorkArticleView->doWork()
#15 /srv/mediawiki/php-master/includes/page/Article.php(666): PoolCounterWork->execute()
#16 /srv/mediawiki/php-master/includes/actions/ViewAction.php(44): Article->view()
#17 /srv/mediawiki/php-master/includes/MediaWiki.php(504): ViewAction->show()
#18 /srv/mediawiki/php-master/includes/MediaWiki.php(288): MediaWiki->performAction(Article, Title)
#19 /srv/mediawiki/php-master/includes/MediaWiki.php(746): MediaWiki->performRequest()
#20 /srv/mediawiki/php-master/includes/MediaWiki.php(520): MediaWiki->main()
#21 /srv/mediawiki/php-master/index.php(43): MediaWiki->run()
#22 /srv/mediawiki/w/index.php(3): include(string)
#23 {main}

Can reproduce with any <score> with vorbis="1" AFAICT.

No code changes in Score in months; the only change this week to TimedMediaHandler is https://gerrit.wikimedia.org/r/#/c/248711/ which doesn't seem germane?

Event Timeline

Restricted Application added subscribers: Luke081515, TerraCodes, Urbanecm, Matanya. · View Herald TranscriptMay 17 2016, 10:00 AM
TheDJ added a comment.EditedMay 17 2016, 12:00 PM

Possibly this..
https://gerrit.wikimedia.org/r/#/c/287406/4/TimedMediaTransformOutput.php,cm

I had not considered that we could run text handler for situations where file is undefined (because non of the other code takes that situation into account either).

But this might be why the original code has that if then else.

Change 289197 had a related patch set uploaded (by TheDJ):
Fix fatal for TimedMediaHandler previews without files.

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

Change 289197 merged by jenkins-bot:
Fix fatal for TimedMediaHandler previews without files.

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

TheDJ closed this task as Resolved.May 17 2016, 6:20 PM
TheDJ claimed this task.
TheDJ moved this task from Doing to Done on the TimedMediaHandler board.
TheDJ removed a project: Multimedia.