I am using MW 1.24. I am using this wikitext:
<sgallery>
IMG_20140510_133239.jpg
IMG_20140510_133227.jpg
IMG_20140510_133225.jpg
IMG_20140510_133223.jpg
</sgallery>
Results:
[86f71766] /wiki/Project:Sandbox Exception from line 77 of /home/stauffenbergssh/theshatteredpan.org/w/includes/parser/StripState.php: Invalid marker: UNIQ3e909c67eef36a9c-sgallery-00000000-QINU
Backtrace:
#0 /home/stauffenbergssh/theshatteredpan.org/w/includes/parser/StripState.php(66): StripState->addItem(string, string, string)
#1 /home/stauffenbergssh/theshatteredpan.org/w/includes/parser/Parser.php(4068): StripState->addGeneral(string, string)
#2 /home/stauffenbergssh/theshatteredpan.org/w/includes/parser/Preprocessor_DOM.php(1181): Parser->extensionSubstitution(array, PPFrame_DOM)
#3 /home/stauffenbergssh/theshatteredpan.org/w/includes/parser/Parser.php(3159): PPFrame_DOM->expand(PPNode_DOM, integer)
#4 /home/stauffenbergssh/theshatteredpan.org/w/includes/parser/Parser.php(1222): Parser->replaceVariables(string)
#5 /home/stauffenbergssh/theshatteredpan.org/w/includes/parser/Parser.php(395): Parser->internalParse(string)
#6 /home/stauffenbergssh/theshatteredpan.org/w/includes/content/WikitextContent.php(335): Parser->parse(string, Title, ParserOptions, boolean, boolean, integer)
#7 /home/stauffenbergssh/theshatteredpan.org/w/includes/WikiPage.php(3613): WikitextContent->getParserOutput(Title, integer, ParserOptions)
#8 /home/stauffenbergssh/theshatteredpan.org/w/includes/poolcounter/PoolCounterWork.php(116): PoolWorkArticleView->doWork()
#9 /home/stauffenbergssh/theshatteredpan.org/w/includes/Article.php(698): PoolCounterWork->execute()
#10 /home/stauffenbergssh/theshatteredpan.org/w/includes/actions/ViewAction.php(44): Article->view()
#11 /home/stauffenbergssh/theshatteredpan.org/w/includes/Wiki.php(428): ViewAction->show()
#12 /home/stauffenbergssh/theshatteredpan.org/w/includes/Wiki.php(292): MediaWiki->performAction(Article, Title)
#13 /home/stauffenbergssh/theshatteredpan.org/w/includes/Wiki.php(596): MediaWiki->performRequest()
#14 /home/stauffenbergssh/theshatteredpan.org/w/includes/Wiki.php(448): MediaWiki->main()
#15 /home/stauffenbergssh/theshatteredpan.org/w/index.php(46): MediaWiki->run()
#16 {main}
It reminds me of this bug. Perhaps SmoothGallery stopped working with a certain version of MediaWiki, as MathJax did.