Page MenuHomePhabricator

GraphViz and MscGen Graphics produce errors and do not render properly when page saved
Closed, ResolvedPublic

Description

Intention:
Creating a graphic with the GraphViz extension. Visualization.

Steps to Reproduce:

  1. c/p graphviz graph into mediawiki site
<mscgen caption='Message sequence chart for example no. 4'>
msc {
  a,b,c;

  a->b  [label="ab()"];
  b->c  [label="bc(TRUE)"];
  c=>c  [label="process(1)"];
  c=>c  [label="process(2)"];
  ...;
  c=>c  [label="process(n)"];
  c=>c  [label="process(END)"];
  a<<=c [label="callback()"];
  ---   [label="If more to run", ID="*"];
  a->a  [label="next()"];
  a->c  [label="ac()"];
  b<-c  [label="cb(TRUE)"];
  b->b  [label="stalled(...)"];
  a<-b  [label="ab() = FALSE"];
}
</mscgen>
  1. then save the page

Actual Results:

[b0268cc7] /w/rurakprod/index.php?title=TestSeite4&action=submit Exception from line 77 of /var/www/w/rurakprod/includes/parser/StripState.php: Invalid marker: UNIQce56658f4d73e6e7-mscgen-00000000-QINU

Backtrace:

#0 /var/www/w/rurakprod/includes/parser/StripState.php(66): StripState->addItem(string, string, string)
#1 /var/www/w/rurakprod/includes/parser/Parser.php(4062): StripState->addGeneral(string, string)
#2 /var/www/w/rurakprod/includes/parser/Preprocessor_DOM.php(1178): Parser->extensionSubstitution(array, PPFrame_DOM)
#3 /var/www/w/rurakprod/includes/parser/Parser.php(3153): PPFrame_DOM->expand(PPNode_DOM, integer)
#4 /var/www/w/rurakprod/includes/parser/Parser.php(4640): Parser->replaceVariables(string)
#5 /var/www/w/rurakprod/includes/parser/Parser.php(4597): Parser->pstPass2(string, User)
#6 [internal function]: Parser->preSaveTransform(string, Title, User, ParserOptions)
#7 /var/www/w/rurakprod/includes/StubObject.php(99): call_user_func_array(array, array)
#8 /var/www/w/rurakprod/includes/StubObject.php(119): StubObject->_call(string, array)
#9 /var/www/w/rurakprod/includes/content/WikitextContent.php(145): StubObject->__call(string, array)
#10 /var/www/w/rurakprod/includes/content/WikitextContent.php(145): StubObject->preSaveTransform(string, Title, User, ParserOptions)
#11 /var/www/w/rurakprod/includes/WikiPage.php(2087): WikitextContent->preSaveTransform(Title, User, ParserOptions)
#12 /var/www/w/rurakprod/includes/WikiPage.php(1761): WikiPage->prepareContentForEdit(WikitextContent, NULL, User, string)
#13 [internal function]: WikiPage->doEditContent(WikitextContent, string, integer, boolean, NULL, string)
#14 /var/www/w/rurakprod/includes/Article.php(2024): call_user_func_array(array, array)
#15 /var/www/w/rurakprod/includes/EditPage.php(1812): Article->__call(string, array)
#16 /var/www/w/rurakprod/includes/EditPage.php(1812): Article->doEditContent(WikitextContent, string, integer, boolean, NULL, string)
#17 /var/www/w/rurakprod/includes/EditPage.php(1237): EditPage->internalAttemptSave(array, boolean)
#18 /var/www/w/rurakprod/includes/EditPage.php(427): EditPage->attemptSave()
#19 /var/www/w/rurakprod/includes/actions/EditAction.php(50): EditPage->edit()
#20 /var/www/w/rurakprod/includes/actions/EditAction.php(74): EditAction->show()
#21 /var/www/w/rurakprod/includes/Wiki.php(428): SubmitAction->show()
#22 /var/www/w/rurakprod/includes/Wiki.php(292): MediaWiki->performAction(Article, Title)
#23 /var/www/w/rurakprod/includes/Wiki.php(588): MediaWiki->performRequest()
#24 /var/www/w/rurakprod/includes/Wiki.php(447): MediaWiki->main()
#25 /var/www/w/rurakprod/index.php(46): MediaWiki->run()
#26 {main}

Reproducible: Always


Version: REL1_23-branch
Severity: major
OS: Linux
Platform: Other

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 3:53 AM
bzimport set Reference to bz73073.

<graphviz caption='Graph for example no. 3 (contains Wiki-Links)' alt='phylogenetic tree' format='png'>
digraph example3 {

node [shape=plaintext];
Mollusca [URL="[[w:Mollusca]]"];
Neomeniomorpha [URL="[[w:Neomeniomorpha]]"];
X1 [shape=point,label=""];
Caudofoveata [URL="[[w:Caudofoveata]]"];
Testaria [URL="[[w:Testaria]]"];
Polyplacophora [URL="[[w:Polyplacophora]]"];
Conchifera [URL="[[w:Conchifera]]"];
Tryblidiida [URL="[[w:Tryblidiida]]"];
Ganglioneura [URL="[[w:Ganglioneura]]"];
Bivalvia [URL="[[w:Bivalvia]]"];
X2 [shape=point,label=""];
X3 [shape=point,label=""];
Scaphopoda [URL="[[w:Scaphopoda]]"];
Cephalopoda [URL="[[w:Cephalopoda]]"];
Gastropoda [URL="[[w:Gastropoda]]"];
Mollusca->X1->Testaria->Conchifera->Ganglioneura->X2->Gastropoda
Mollusca->Neomeniomorpha
X1->Caudofoveata
Testaria->Polyplacophora
Conchifera->Tryblidiida
Ganglioneura ->Bivalvia
X2->X3->Cephalopoda
X3->Scaphopoda

}
</graphviz>

produces:

[3b7b305e] /w/rurakprod/index.php?title=TestSeite4&action=submit Exception from line 77 of /var/www/w/rurakprod/includes/parser/StripState.php: Invalid marker: UNIQ3b979957875f41aa-graphviz-00000000-QINU

Backtrace:

#0 /var/www/w/rurakprod/includes/parser/StripState.php(66): StripState->addItem(string, string, string)
#1 /var/www/w/rurakprod/includes/parser/Parser.php(4062): StripState->addGeneral(string, string)
#2 /var/www/w/rurakprod/includes/parser/Preprocessor_DOM.php(1178): Parser->extensionSubstitution(array, PPFrame_DOM)
#3 /var/www/w/rurakprod/includes/parser/Parser.php(3153): PPFrame_DOM->expand(PPNode_DOM, integer)
#4 /var/www/w/rurakprod/includes/parser/Parser.php(4640): Parser->replaceVariables(string)
#5 /var/www/w/rurakprod/includes/parser/Parser.php(4597): Parser->pstPass2(string, User)
#6 [internal function]: Parser->preSaveTransform(string, Title, User, ParserOptions)
#7 /var/www/w/rurakprod/includes/StubObject.php(99): call_user_func_array(array, array)
#8 /var/www/w/rurakprod/includes/StubObject.php(119): StubObject->_call(string, array)
#9 /var/www/w/rurakprod/includes/content/WikitextContent.php(145): StubObject->call(string, array)
#10 /var/www/w/rurakprod/includes/content/WikitextContent.php(145): StubObject->preSaveTransform(string, Title, User, ParserOptions)
#11 /var/www/w/rurakprod/includes/WikiPage.php(2087): WikitextContent->preSaveTransform(Title, User, ParserOptions)
#12 /var/www/w/rurakprod/includes/WikiPage.php(1761): WikiPage->prepareContentForEdit(WikitextContent, NULL, User, string)
#13 [internal function]: WikiPage->doEditContent(WikitextContent, string, integer, boolean, NULL, string)
#14 /var/www/w/rurakprod/includes/Article.php(2024): call_user_func_array(array, array)
#15 /var/www/w/rurakprod/includes/EditPage.php(1812): Article->
call(string, array)
#16 /var/www/w/rurakprod/includes/EditPage.php(1812): Article->doEditContent(WikitextContent, string, integer, boolean, NULL, string)
#17 /var/www/w/rurakprod/includes/EditPage.php(1237): EditPage->internalAttemptSave(array, boolean)
#18 /var/www/w/rurakprod/includes/EditPage.php(427): EditPage->attemptSave()
#19 /var/www/w/rurakprod/includes/actions/EditAction.php(50): EditPage->edit()
#20 /var/www/w/rurakprod/includes/actions/EditAction.php(74): EditAction->show()
#21 /var/www/w/rurakprod/includes/Wiki.php(428): SubmitAction->show()
#22 /var/www/w/rurakprod/includes/Wiki.php(292): MediaWiki->performAction(Article, Title)
#23 /var/www/w/rurakprod/includes/Wiki.php(588): MediaWiki->performRequest()
#24 /var/www/w/rurakprod/includes/Wiki.php(447): MediaWiki->main()
#25 /var/www/w/rurakprod/index.php(46): MediaWiki->run()
#26 {main}

Hi, I have not been able to reproduce this problem. My platform is:
GraphViz 1.5.0
MW 1.23.6
Ubuntu 14.04
PHP 5.5.9-1ubuntu4.4
MySQL 5.5.40-0ubuntu0.14.04.1

Please provide a debug log as described here:
https://www.mediawiki.org/wiki/Manual:How_to_debug#Setting_up_a_debug_log_file

Thanks!

My working environment
MW 1.23.6
Debian GNU/Linux 7.7 (wheezy)
PHP Version => 5.4.34-0+deb7u1
mysql Ver 14.14 Distrib 5.5.40, for debian-linux-gnu (x86_64) using readline 6.2

Hi, here are the steps I did to setup a debug log on my system:
sudo mkdir /var/log/mediawiki
sudo chown www-data /var/log/mediawiki
gedit ~/public_html/mediawiki/w23_6/LocalSettings.php

$wgDebugLogFile = "/var/log/mediawiki/debug-wiki23_6.log";

After you've confirmed that logging is working, it is nice to delete the log prior to recreating the problem so that it doesn't contain extraneous info. After the recreate, it is also nice to copy the log to a separate file so to be attached here.

Let me know if you have trouble obtaining a debug log of the problem on your system.

Thanks,
Keith

Created attachment 17111
Log file of MediaWiki with GraphViz extension

I attempted to use create the four examples from the GraphViz extension page.

Attached:

In the log I noticed that Semantic MediaWiki was installed. I installed it on my system and I am now able to recreate the problem.

The StripState.php: Invalid marker exception is caused by a recursive call to Parser::parse. The documentation for Parser::parse says, "Do not call this function recursively."

Here is a bit of code I added at the beginning of Parser::parse to detect recursion:
$callers = array_slice( debug_backtrace(), 1 );
foreach( $callers as $caller ) {

if ( $caller['function'] == __FUNCTION__ && isset( $caller['class'] ) && $caller['class'] == __CLASS__ ) {
  throw new MWException( __METHOD__ . ": detected recursion");
}

}

This yields a stack trace showing how the illegal recursion came about:

[fda8b10b] /wiki/Main_Page Exception from line 366 of /home/welterkj/public_html/mediawiki/w23/includes/parser/Parser.php: Parser::parse: detected recursion

Backtrace:

#0 /home/welterkj/public_html/mediawiki/w23/includes/content/WikitextContent.php(322): Parser->parse(string, Title, ParserOptions, boolean, boolean, NULL)
#1 /home/welterkj/public_html/mediawiki/w23/includes/WikiPage.php(2091): WikitextContent->getParserOutput(Title, NULL, ParserOptions)
#2 /home/welterkj/public_html/mediawiki/w23/extensions/SemanticMediaWiki/includes/src/MediaWiki/EditInfoProvider.php(88): WikiPage->prepareContentForEdit(WikitextContent, NULL, User, string)
#3 /home/welterkj/public_html/mediawiki/w23/extensions/SemanticMediaWiki/includes/src/MediaWiki/EditInfoProvider.php(66): SMW\MediaWiki\EditInfoProvider->prepareContentForEdit()
#4 /home/welterkj/public_html/mediawiki/w23/extensions/SemanticMediaWiki/includes/src/MediaWiki/Hooks/NewRevisionFromEditComplete.php(81): SMW\MediaWiki\EditInfoProvider->fetchEditInfo()
#5 /home/welterkj/public_html/mediawiki/w23/extensions/SemanticMediaWiki/includes/src/MediaWiki/Hooks/NewRevisionFromEditComplete.php(76): SMW\MediaWiki\Hooks\NewRevisionFromEditComplete->getParserOutputFromEditInfo()
#6 /home/welterkj/public_html/mediawiki/w23/extensions/SemanticMediaWiki/includes/Setup.php(392): SMW\MediaWiki\Hooks\NewRevisionFromEditComplete->process()
#7 [internal function]: SMW\Setup->SMW\{closure}(WikiFilePage, Revision, integer, User)
#8 /home/welterkj/public_html/mediawiki/w23/includes/Hooks.php(206): call_user_func_array(Closure, array)
#9 /home/welterkj/public_html/mediawiki/w23/includes/GlobalFunctions.php(4004): Hooks::run(string, array, NULL)
#10 /home/welterkj/public_html/mediawiki/w23/includes/filerepo/file/LocalFile.php(1393): wfRunHooks(string, array)
#11 /home/welterkj/public_html/mediawiki/w23/includes/filerepo/file/LocalFile.php(1174): LocalFile->recordUpload2(string, string, string, array, boolean, User)
#12 /home/welterkj/public_html/mediawiki/w23/includes/upload/UploadBase.php(694): LocalFile->upload(string, string, string, integer, NULL, boolean, User)
#13 /home/welterkj/public_html/mediawiki/w23/extensions/GraphViz/UploadLocalFile.php(238): UploadBase->performUpload(string, string, boolean, User)
#14 /home/welterkj/public_html/mediawiki/w23/extensions/GraphViz/GraphViz_body.php(1156): UploadLocalFile::upload(string, string, User, string, string, boolean, boolean)
#15 /home/welterkj/public_html/mediawiki/w23/extensions/GraphViz/GraphViz_body.php(756): GraphViz::render(string, array, Parser, PPFrame_DOM)
#16 [internal function]: GraphViz::graphvizParserHook(string, array, Parser, PPFrame_DOM)
#17 /home/welterkj/public_html/mediawiki/w23/includes/parser/Parser.php(4028): call_user_func_array(array, array)
#18 /home/welterkj/public_html/mediawiki/w23/includes/parser/Preprocessor_DOM.php(1178): Parser->extensionSubstitution(array, PPFrame_DOM)
#19 /home/welterkj/public_html/mediawiki/w23/includes/parser/Parser.php(3162): PPFrame_DOM->expand(PPNode_DOM, integer)
#20 /home/welterkj/public_html/mediawiki/w23/includes/parser/Parser.php(1225): Parser->replaceVariables(string)
#21 /home/welterkj/public_html/mediawiki/w23/includes/parser/Parser.php(404): Parser->internalParse(string)
#22 /home/welterkj/public_html/mediawiki/w23/includes/content/WikitextContent.php(322): Parser->parse(string, Title, ParserOptions, boolean, boolean, integer)
#23 /home/welterkj/public_html/mediawiki/w23/includes/WikiPage.php(3614): WikitextContent->getParserOutput(Title, integer, ParserOptions)
#24 /home/welterkj/public_html/mediawiki/w23/includes/poolcounter/PoolCounterWork.php(112): PoolWorkArticleView->doWork()
#25 /home/welterkj/public_html/mediawiki/w23/includes/Article.php(710): PoolCounterWork->execute()
#26 /home/welterkj/public_html/mediawiki/w23/includes/actions/ViewAction.php(44): Article->view()
#27 /home/welterkj/public_html/mediawiki/w23/includes/Wiki.php(428): ViewAction->show()
#28 /home/welterkj/public_html/mediawiki/w23/includes/Wiki.php(292): MediaWiki->performAction(Article, Title)
#29 /home/welterkj/public_html/mediawiki/w23/includes/Wiki.php(588): MediaWiki->performRequest()
#30 /home/welterkj/public_html/mediawiki/w23/includes/Wiki.php(447): MediaWiki->main()
#31 /home/welterkj/public_html/mediawiki/w23/index.php(46): MediaWiki->run()
#32 {main}

The key points from the prior back trace are:

  1. The GraphViz extension uploaded a file (a graph image) from the context of a Parser::parse call.
  2. The upload triggered the NewRevisionFromEditComplete hook.
  3. The Semantic MediaWiki extension NewRevisionFromEditComplete hook eventually called Parser::parse (indirectly) which causes the reported Invalid Marker exception.

Change 174487 had a related patch set uploaded by Welterkj:
Prevent recursive call to Parser::parse (see bug 73073).

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

I added the code to my GraphViz-File and it did not work.

[b536be47] /w/rurakprod/index.php?title=TestSeite_g&action=submit Exception from line 77 of /var/www/w/rurakprod/includes/parser/StripState.php: Invalid marker: UNIQc8016766c0a52610-graphviz-00000000-QINU

Backtrace:

#0 /var/www/w/rurakprod/includes/parser/StripState.php(66): StripState->addItem(string, string, string)
#1 /var/www/w/rurakprod/includes/parser/Parser.php(4062): StripState->addGeneral(string, string)
#2 /var/www/w/rurakprod/includes/parser/Preprocessor_DOM.php(1178): Parser->extensionSubstitution(array, PPFrame_DOM)
#3 /var/www/w/rurakprod/includes/parser/Parser.php(3153): PPFrame_DOM->expand(PPNode_DOM, integer)
#4 /var/www/w/rurakprod/includes/parser/Parser.php(4640): Parser->replaceVariables(string)
#5 /var/www/w/rurakprod/includes/parser/Parser.php(4597): Parser->pstPass2(string, User)
#6 [internal function]: Parser->preSaveTransform(string, Title, User, ParserOptions)
#7 /var/www/w/rurakprod/includes/StubObject.php(99): call_user_func_array(array, array)
#8 /var/www/w/rurakprod/includes/StubObject.php(119): StubObject->_call(string, array)
#9 /var/www/w/rurakprod/includes/content/WikitextContent.php(145): StubObject->call(string, array)
#10 /var/www/w/rurakprod/includes/content/WikitextContent.php(145): StubObject->preSaveTransform(string, Title, User, ParserOptions)
#11 /var/www/w/rurakprod/includes/WikiPage.php(2087): WikitextContent->preSaveTransform(Title, User, ParserOptions)
#12 /var/www/w/rurakprod/includes/WikiPage.php(1761): WikiPage->prepareContentForEdit(WikitextContent, NULL, User, string)
#13 [internal function]: WikiPage->doEditContent(WikitextContent, string, integer, boolean, NULL, string)
#14 /var/www/w/rurakprod/includes/Article.php(2024): call_user_func_array(array, array)
#15 /var/www/w/rurakprod/includes/EditPage.php(1812): Article->
call(string, array)
#16 /var/www/w/rurakprod/includes/EditPage.php(1812): Article->doEditContent(WikitextContent, string, integer, boolean, NULL, string)
#17 /var/www/w/rurakprod/includes/EditPage.php(1237): EditPage->internalAttemptSave(array, boolean)
#18 /var/www/w/rurakprod/includes/EditPage.php(427): EditPage->attemptSave()
#19 /var/www/w/rurakprod/includes/actions/EditAction.php(50): EditPage->edit()
#20 /var/www/w/rurakprod/includes/actions/EditAction.php(74): EditAction->show()
#21 /var/www/w/rurakprod/includes/Wiki.php(428): SubmitAction->show()
#22 /var/www/w/rurakprod/includes/Wiki.php(292): MediaWiki->performAction(Article, Title)
#23 /var/www/w/rurakprod/includes/Wiki.php(588): MediaWiki->performRequest()
#24 /var/www/w/rurakprod/includes/Wiki.php(447): MediaWiki->main()
#25 /var/www/w/rurakprod/index.php(46): MediaWiki->run()
#26 {main}

If you don't mind, please add the diagnostic code I gave Nov. 14 to Parser.php in your mediawiki includes/parser directory (repeated here).

Add the following at the beginning of Parser::parse to detect recursion:
$callers = array_slice( debug_backtrace(), 1 );
foreach( $callers as $caller ) {

if ( $caller['function'] == __FUNCTION__ && isset( $caller['class'] ) && $caller['class'] == __CLASS__ ) {
  throw new MWException( __METHOD__ . ": detected recursion");
}

}

The resulting backtrace should show why the problem still happens on your system after the fix is applied.

Strange ... I reloaded the file that you had editted and added the stuff to the Parser function and now it works ... sorry for the additional fuzz ...

I inquired on semediawiki-devel@lists.sourceforge.net about the consequences of disabling SMW hooks during the GraphViz upload. Here is the reply:

"If you disable NewRevisionFromEditComplete or any other SMW related hook then it will suppress annotation parsing and should not much matter for your GraphViz images. If predefined properties or user defined properties can not be annotated then those pages can also not be used for any query."

I'm satisfied that disabling the SMW hooks when GraphViz does an upload will have no bad consequences because GraphViz does not supply any page text on this code path. A user could edit the file page after the upload is complete and supply page text/annotations if desired.

I don't love the fix I currently have out for review. It disables all hooks while GraphViz is uploading a file. This solution brings the phrases "sledgehammer method" and "band-aid solution" to mind. However, I think it is safe enough for the time being to unblock GraphViz users that are eager for a fix while I investigate alternatives.

There is only one hook on the upload code path (NewRevisionfromEditComplete) and SMW is the only extension that currently uses it. While disabling this hook has no impact on SMW as described in my previous comment, new extensions could use the hook in the future and be impacted (or additional hooks could be added on the upload code path).

The approach I prefer would be to make SMW call Parser::recursiveTagsParse instead of Parser:parse. This is not directly a SMW issue though. Here is more info from the semediawiki-devel list:

"Just to clarify, NewRevisionFromEditComplete does not have (or for that matter makes) access to the Parser directly and relies on the information provided by WikitextContent::prepareContentForEdit object. Whether WikitextContent::prepareContentForEdit returns an editinfo object from a cached instance or runs Parser:parse is out of the scope and control of the NewRevisionFromEditComplete hook."

So, ideally, WikitextContent::prepareContentForEdit should call Parser::recursiveTagsParse instead of Parser:parse. I don't know yet if that is possible. If it is possible, the core fix will take longer to deliver than a GraphViz-only solution since it is not under my control.

I created task T76651 to track my request to fix this issue in the core.

Whether or not that task goes anywhere, I intend to move forward with the fix for this bug (T75073) since MW versions prior to the core fix (if done) will need it anyway.

fbstj set Security to None.
fbstj updated the task description. (Show Details)

Fix available in dev-master:

composer require mediawiki/graph-viz 'dev-master'

@Temptuousinsolence, if you haven't already, could you install the fix via composer and confirm that it works? If so, I will release the version and close this task. Thanks!

Hm ... the mscgen appears to work, but the graph-viz thing does not apear to work and I do not know why and this is actually the case. I still get recursive parse errors.

I try it with some other mediawiki installations and see whether I am able to reproduce the error there as well. I remember distictly that I had set up a properly running version in the last year, but I cannot recall where I have left it. Maybe it had been one of the virtual machines. I will get back to you on this issue.

I had changed an entry in the composer.json and ran an update routine.

edit1:
OK ... I tried the examples form the GV MediaWiki site and they do appear to work, but those on the flickr page throw errors.

edit2:
Well ... could it be that it is the MediaWiki 1.25alpha (3e97c56) creates the errors? The GV-extension appears to run fine with MediaWiki 1.23.8 (3d6956a) and with MediaWiki 1.24.1 (4688972).

On the MW installation where you still see errors, please confirm that version 1.5.1 appears for GraphViz on the Special:Version page. Also, did you restart your web server after updating the extension? If not, a PHP accelerator like APC might have yielded an old version of the extension.

It is 1.5.1 on the Special Pages on all three MW installations. I have several MW installations on the server and MediaWiki 1.23.8 (3d6956a) and with MediaWiki 1.24.1 (4688972) run fine with GraphViz ...

I recreated the problem on MW 1.25alpha. Here is the backtrace:

[e6021531] /wdev/index.php?title=Main_Page&action=submit MWException from line 6451 of /home/welterkj/public_html/mediawiki/git/core/includes/parser/Parser.php: Parser state cleared while parsing. Did you call Parser::parse recursively?

Backtrace:

#0 /home/welterkj/public_html/mediawiki/git/core/includes/parser/Parser.php(4858): Parser->lock()
#1 /home/welterkj/public_html/mediawiki/git/core/includes/content/WikitextContent.php(146): Parser->preSaveTransform(string, Title, User, ParserOptions)
#2 /home/welterkj/public_html/mediawiki/git/core/includes/page/WikiPage.php(2123): WikitextContent->preSaveTransform(Title, User, ParserOptions)
#3 /home/welterkj/public_html/mediawiki/git/core/includes/page/WikiPage.php(1786): WikiPage->prepareContentForEdit(WikitextContent, NULL, User, NULL)
#4 /home/welterkj/public_html/mediawiki/git/core/includes/filerepo/file/LocalFile.php(1458): WikiPage->doEditContent(WikitextContent, string, integer, boolean, User)
#5 /home/welterkj/public_html/mediawiki/git/core/includes/filerepo/file/LocalFile.php(1184): LocalFile->recordUpload2(string, string, string, array, boolean, User)
#6 /home/welterkj/public_html/mediawiki/git/core/includes/upload/UploadBase.php(748): LocalFile->upload(string, string, string, integer, NULL, boolean, User)
#7 /home/welterkj/public_html/mediawiki/git/core/extensions/GraphViz/UploadLocalFile.php(238): UploadBase->performUpload(string, string, boolean, User)
#8 /home/welterkj/public_html/mediawiki/git/core/extensions/GraphViz/GraphViz_body.php(1194): UploadLocalFile::upload(string, string, User, string, string, boolean, boolean)
#9 /home/welterkj/public_html/mediawiki/git/core/extensions/GraphViz/GraphViz_body.php(390): GraphViz::render(string, array, Parser, boolean, boolean)
#10 /home/welterkj/public_html/mediawiki/git/core/extensions/GraphViz/GraphViz_body.php(295): GraphViz::createDummyImageFilePage(Parser, string)
#11 /home/welterkj/public_html/mediawiki/git/core/extensions/GraphViz/GraphViz_body.php(412): GraphViz::initDummyFilePages(Parser)
#12 [internal function]: GraphViz::onParserInit(Parser)
#13 /home/welterkj/public_html/mediawiki/git/core/includes/Hooks.php(208): call_user_func_array(string, array)
#14 /home/welterkj/public_html/mediawiki/git/core/includes/parser/Parser.php(304): Hooks::run(string, array)
#15 /home/welterkj/public_html/mediawiki/git/core/includes/parser/Parser.php(316): Parser->firstCallInit()
#16 /home/welterkj/public_html/mediawiki/git/core/includes/parser/Parser.php(5106): Parser->clearState()
#17 /home/welterkj/public_html/mediawiki/git/core/includes/parser/Parser.php(5912): Parser->startParse(Title, ParserOptions, integer, boolean)
#18 /home/welterkj/public_html/mediawiki/git/core/includes/parser/Parser.php(6050): Parser->extractSections(string, string, string, string)
#19 [internal function]: Parser->replaceSection(string, string, string)
#20 /home/welterkj/public_html/mediawiki/git/core/includes/StubObject.php(105): call_user_func_array(array, array)
#21 /home/welterkj/public_html/mediawiki/git/core/includes/StubObject.php(129): StubObject->_call(string, array)
#22 /home/welterkj/public_html/mediawiki/git/core/includes/content/WikitextContent.php(105): StubObject->call(string, array)
#23 /home/welterkj/public_html/mediawiki/git/core/includes/content/WikitextContent.php(105): StubObject->replaceSection(string, string, string)
#24 /home/welterkj/public_html/mediawiki/git/core/includes/page/WikiPage.php(1584): WikitextContent->replaceSection(string, WikitextContent, string)
#25 /home/welterkj/public_html/mediawiki/git/core/includes/page/WikiPage.php(1529): WikiPage->replaceSectionAtRev(string, WikitextContent, string, NULL)
#26 [internal function]: WikiPage->replaceSectionContent(string, WikitextContent, string)
#27 /home/welterkj/public_html/mediawiki/git/core/includes/page/Article.php(2015): call_user_func_array(array, array)
#28 /home/welterkj/public_html/mediawiki/git/core/includes/EditPage.php(1836): Article->
call(string, array)
#29 /home/welterkj/public_html/mediawiki/git/core/includes/EditPage.php(1836): Article->replaceSectionContent(string, WikitextContent, string)
#30 /home/welterkj/public_html/mediawiki/git/core/includes/EditPage.php(1310): EditPage->internalAttemptSave(boolean, boolean)
#31 /home/welterkj/public_html/mediawiki/git/core/includes/EditPage.php(543): EditPage->attemptSave()
#32 /home/welterkj/public_html/mediawiki/git/core/includes/actions/EditAction.php(56): EditPage->edit()
#33 /home/welterkj/public_html/mediawiki/git/core/includes/actions/SubmitAction.php(40): EditAction->show()
#34 /home/welterkj/public_html/mediawiki/git/core/includes/MediaWiki.php(414): SubmitAction->show()
#35 /home/welterkj/public_html/mediawiki/git/core/includes/MediaWiki.php(282): MediaWiki->performAction(Article, Title)
#36 /home/welterkj/public_html/mediawiki/git/core/includes/MediaWiki.php(584): MediaWiki->performRequest()
#37 /home/welterkj/public_html/mediawiki/git/core/includes/MediaWiki.php(435): MediaWiki->main()
#38 /home/welterkj/public_html/mediawiki/git/core/index.php(46): MediaWiki->run()
#39 {main}

Change 185026 had a related patch set uploaded (by Welterkj):
Prevent recursive call to Parser::parse (see bug T75073). Bug: T75073

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

Patch-For-Review

Change 185026 merged by Welterkj:
Prevent recursive call to Parser::parse (see bug T75073). Bug: T75073

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

I merged a fix for the problem that occurs at MW 1.25alpha. Thanks for reporting this. Please delete your extensions/Graphviz directory, re-install via composer (composer require mediawiki/graph-viz 'dev-master') and confirm that the issue is resolved for you.

Flickr GraphViz

Catchable fatal error: Argument 1 passed to GraphViz::initDummyFilePages() must be an instance of Parser, instance of StubObject given, 
called in /var/www/w/yyy/extensions/GraphViz/GraphViz_body.php on line 641 
and defined in /var/www/w/yyy/extensions/GraphViz/GraphViz_body.php on line 278

I should note that this error crashes my MW environment. Whenever I try to save a site, I receive this error, which renders the entire wiki quite useless. For the moment I have removed the ImageMap and the GraphViz extension

Change 185324 had a related patch set uploaded (by Welterkj):
Unstub wgParser in initDummyFilePages().

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

Patch-For-Review

Change 185324 merged by Welterkj:
Unstub wgParser in initDummyFilePages().

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

Hi, I merged a change for the unstub issue. Please try the fix again (same procedure as T75073#977379).

Yes, fixed and runs smoothly now. Have tested it:
MediaWiki 1.23.8 (3d6956a) and with MediaWiki 1.24.1 (4688972) and also 1.25alpha (76cc896) run fine with GraphViz ...

Would be interesting to see whether this version of GraphViz works with the process graph extension of Semantic Results Format.