Page MenuHomePhabricator

PagedTiffHandler: Invalid message parameter
Closed, ResolvedPublic

Description

http://p.defau.lt/?JJBsKNNyIiaSPovUyKTXKw

2012-10-23 15:00:07 mw25 commonswiki: [4e470b44] /wiki/File:Weiss_-_Biographie_universelle_ou_dictionnaire_historique,_tome_2.tif?page=173 Exception from line 621 of /usr/local/apache/common-local/php-1.21wmf2/includes/Message.php: Invalid message parameter
#0 /usr/local/apache/common-local/php-1.21wmf2/includes/Message.php(595): Message->extractParam(Array)
#1 /usr/local/apache/common-local/php-1.21wmf2/includes/Message.php(451): Message->replaceParameters('$1 ?? $2 pixels...', 'before')
#2 /usr/local/apache/common-local/php-1.21wmf2/includes/Message.php(493): Message->toString()
#3 /usr/local/apache/common-local/php-1.21wmf2/extensions/PagedTiffHandler/PagedTiffHandler_body.php(516): Message->parse()
#4 /usr/local/apache/common-local/php-1.21wmf2/includes/filerepo/file/File.php(1745): PagedTiffHandler->getLongDesc(Object(LocalFile))
#5 /usr/local/apache/common-local/php-1.21wmf2/includes/ImagePage.php(330): File->getLongDesc()
#6 /usr/local/apache/common-local/php-1.21wmf2/includes/ImagePage.php(149): ImagePage->openShowImage()
#7 /usr/local/apache/common-local/php-1.21wmf2/includes/actions/ViewAction.php(37): ImagePage->view()
#8 /usr/local/apache/common-local/php-1.21wmf2/includes/Wiki.php(428): ViewAction->show()
#9 /usr/local/apache/common-local/php-1.21wmf2/includes/Wiki.php(305): MediaWiki->performAction(Object(ImagePage))
#10 /usr/local/apache/common-local/php-1.21wmf2/includes/Wiki.php(554): MediaWiki->performRequest()
#11 /usr/local/apache/common-local/php-1.21wmf2/includes/Wiki.php(447): MediaWiki->main()
#12 /usr/local/apache/common-local/php-1.21wmf2/index.php(59): MediaWiki->run()
#13 /usr/local/apache/common-local/live-1.5/index.php(3): require('/usr/local/apac...')
#14 {main}


Version: unspecified
Severity: normal
URL: http://test.wikipedia.org/wiki/File:Weiss_-_Biographie_universelle_ou_dictionnaire_historique,_tome_2.tif?page=173

Details

Reference
bz41305

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 1:09 AM
bzimport set Reference to bz41305.
bzimport added a subscriber: Unknown Object (MLST).

Niklas made gerrit 29594 which adds more informative debugging into to Message and Database class.

I submitted gerrit 29593 which refactors the code a bit and checks for all message parameters if they're not an array (otherwise throws exception in the class itself, logging which parameter was an array).

After deploying the patches sets from comment 2, added URL to reproduce and this backtrace:

Invalid message parameter: a:1:{s:3:"num";N;}

Backtrace:

#0 /home/wikipedia/common/php-1.21wmf2/includes/Message.php(595): Message->extractParam(Array)
#1 /home/wikipedia/common/php-1.21wmf2/includes/Message.php(451): Message->replaceParameters('$1 ?? $2 pixels...', 'before')
#2 /home/wikipedia/common/php-1.21wmf2/includes/Message.php(493): Message->toString()
#3 /home/wikipedia/common/php-1.21wmf2/extensions/PagedTiffHandler/PagedTiffHandler_body.php(516): Message->parse()
#4 /home/wikipedia/common/php-1.21wmf2/includes/filerepo/file/File.php(1745): PagedTiffHandler->getLongDesc(Object(ForeignDBFile))
#5 /home/wikipedia/common/php-1.21wmf2/includes/ImagePage.php(330): File->getLongDesc()

2012-10-23 16:30:45 srv201 commonswiki: [6ac008dd] /wiki/File:Petitot_-_Collection_compl%C3%A8te_des_m%C3%A9moires_relatifs_%C3%A0_l%E2%80%99histoire_de_France,_tome_16.tif?page=97 Exception from line 621 of /usr/local/apache/common-local/php-1.21wmf2/includes/Message.php: Invalid message parameter: a:1:{s:3:"num";N;}
#0 /usr/local/apache/common-local/php-1.21wmf2/includes/Message.php(595): Message->extractParam(Array)
#1 /usr/local/apache/common-local/php-1.21wmf2/includes/Message.php(451): Message->replaceParameters('$1 ?? $2 pixels...', 'before')
#2 /usr/local/apache/common-local/php-1.21wmf2/includes/Message.php(493): Message->toString()
#3 /usr/local/apache/common-local/php-1.21wmf2/extensions/PagedTiffHandler/PagedTiffHandler_body.php(516): Message->parse()
#4 /usr/local/apache/common-local/php-1.21wmf2/includes/filerepo/file/File.php(1745): PagedTiffHandler->getLongDesc(Object(LocalFile))
#5 /usr/local/apache/common-local/php-1.21wmf2/includes/ImagePage.php(330): File->getLongDesc()
#6 /usr/local/apache/common-local/php-1.21wmf2/includes/ImagePage.php(149): ImagePage->openShowImage()
#7 /usr/local/apache/common-local/php-1.21wmf2/includes/actions/ViewAction.php(37): ImagePage->view()
#8 /usr/local/apache/common-local/php-1.21wmf2/includes/Wiki.php(428): ViewAction->show()
#9 /usr/local/apache/common-local/php-1.21wmf2/includes/Wiki.php(305): MediaWiki->performAction(Object(ImagePage))
#10 /usr/local/apache/common-local/php-1.21wmf2/includes/Wiki.php(554): MediaWiki->performRequest()
#11 /usr/local/apache/common-local/php-1.21wmf2/includes/Wiki.php(447): MediaWiki->main()
#12 /usr/local/apache/common-local/php-1.21wmf2/index.php(59): MediaWiki->run()
#13 /usr/local/apache/common-local/live-1.5/index.php(3): require('/usr/local/apac...')
#14 {main}

Gerrit 29605 eventually fixed the fatal. I think we fixed a symptom and not the root cause this time. There's an issue with metadata values a bit deeper. My interest in this issue has ended with getting the fatal fixed, though.

Gilles raised the priority of this task from Medium to Unbreak Now!.Dec 4 2014, 10:25 AM
Gilles added a project: Multimedia.
Gilles moved this task from Untriaged to Done on the Multimedia board.
Gilles lowered the priority of this task from Unbreak Now! to Medium.Dec 4 2014, 11:22 AM