Sublime Forum

Syntax highlighting problem with 3113: "Apparent recursion within a with_prototype action: 25000 context sanity limit hit"

#21

Is there a fix for this besides removing the syntax highlighting packages?

0 Likes

#22

The PHP syntax includes HTML.sublime-syntax for chunks of HTML inside of a function or other block. Unfortunately you overrode the HTML syntax to include PHP, thus creating an include loop. Preventing/detecting such recursion is complicated, hence the sanity check error message.

You saw the problem manifested in other syntaxes since they include HTML, thus inheriting the include loop.

For anyone seeing lots of test failures, it means you’ve overridden a default syntax with something that can not handle the edge cases presented in the test file, or uses different scopes.

The implementation of the various syntaxes can be changed, however tweaks will need to be implemented in such a way that various tests still pass. It may be possible to remove the with_prototype in PHP.

I’m actually on vacation for a while since we just welcomed a new addition to our family. I’ll definitely be working on syntaxes again once I’m back.

4 Likes

Stable Build 3114 breaks PHP and Markdwon plugin syntax
#23

Congratulations on the new family member @wbond :slight_smile:

2 Likes

#24

Could we perhaps get an improved error message for these somehow? Most of them are related to some HTML.sublime-synax override or alternative that someone or some plugin placed in the Packages folder, but it’s kinda hard to spot which one gets included when this message is displayed since it only lists the most outer syntax file. Maybe provide the syntax files of the first n steps, preferrably also the context name?

And congratulations on your family addition.

2 Likes

#25

@FichteFoll, i’m not sure if this helps. but when i open the console I see the following error. A bit different from the above:

Error loading scope:source.coffee: Unable to find syntax file for scope source.coffee in Packages/ShellScript/Shell-Unix-Generic.sublime-syntax
error: Error loading syntax file “Packages/ShellScript/Shell-Unix-Generic.sublime-syntax”: Apparent recursion within a with_prototype action: 25000 context sanity limit hit

0 Likes

#26

is there a way to just revert back to version 3103? I’m not using dev builds, just a production pleb user here, and 3114 has broken my html syntax highlighting.

error: Error loading syntax file "Packages/HTML/HTMLx.tmLanguage": Apparent recursion within a with_prototype action: 25000 context sanity limit hit

I’m not able to figure this out. I’ve tried deleting files, tried looking for what file is calling the HTMLx file, i just want to revert back to what was working at this point.

0 Likes

#27

Yes, you can use the installer for 3103. See my post here:

1 Like

#28

Was this ever fixed?

I’m using build 3169 and am getting this on markdown files both with the default Markdown plugin and the “Markdown Extended” plugin and also with “MarkdownHightlighting” plugin. Nothing works.

EDIT: fixed the issue, details here

1 Like

Cannot load Markdown files: "Apparent recursion within a with_prototype action: 25000 context sanity limit hit"
#29

The Naomi package is known to hit the sanity limit on recent builds. Do you use it?

This sanity limit should just avoid infinite loops caused by too complex syntax definitions.

0 Likes