Sublime Forum

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

#1

Since the previous thread is over a year old, and it’s been many releases, I’m starting this new thread, hope that’s OK.

With the latest Sublime 3.1, and a fresh cleared. Here’s the output of Ctrl-`

startup, version: 3170 osx x64 channel: stable
executable: /Applications/Sublime Text.app/Contents/MacOS/Sublime Text
working dir: /
packages path: /Users/user/Library/Application Support/Sublime Text 3/Packages
state path: /Users/user/Library/Application Support/Sublime Text 3/Local
zip path: /Applications/Sublime Text.app/Contents/MacOS/Packages
zip path: /Users/user/Library/Application Support/Sublime Text 3/Installed Packages
ignored_packages: ["FileIcons", "JavaScript", "MarkdownHighlighting", "Vintage"]
pre session restore time: 0.529063
using gpu buffer for window
using gpu buffer for window
using gpu buffer for window
using gpu buffer for window
using gpu buffer for window
startup time: 0.962331
error: Error loading syntax file "Packages/Markdown/Markdown.sublime-syntax": Apparent recursion within a with_prototype action: 25000 context sanity limit hit
scan: symlink to /Users/user/project/frontend/simple/assets/images has been seen before, superseding (using inode) previous path: /Users/user/project/frontend/_static/images inode: 1906500
scan: /Users/user/project/node_modules/electron/dist/Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/Current has been seen before, skipping (using inode) previous path: /Users/user/project/node_modules/electron/dist/Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A inode: 3199290
scan: /Users/user/project/node_modules/electron/dist/Electron.app/Contents/Frameworks/Mantle.framework/Versions/Current has been seen before, skipping (using inode) previous path: /Users/user/project/node_modules/electron/dist/Electron.app/Contents/Frameworks/Mantle.framework/Versions/A inode: 3199435
scan: /Users/user/project/node_modules/electron/dist/Electron.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/Current has been seen before, skipping (using inode) previous path: /Users/user/project/node_modules/electron/dist/Electron.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A inode: 3199460
scan: /Users/user/project/node_modules/electron/dist/Electron.app/Contents/Frameworks/Squirrel.framework/Versions/Current has been seen before, skipping (using inode) previous path: /Users/user/project/node_modules/electron/dist/Electron.app/Contents/Frameworks/Squirrel.framework/Versions/A inode: 3199527
scan: symlink to /Users/user/project/node_modules/electron/dist/Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries has been seen before, superseding (using inode) previous path: /Users/user/project/node_modules/electron/dist/Electron.app/Contents/Frameworks/Electron Framework.framework/Libraries inode: 3199292
scan: symlink to /Users/user/project/node_modules/electron/dist/Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources has been seen before, superseding (using inode) previous path: /Users/user/project/node_modules/electron/dist/Electron.app/Contents/Frameworks/Electron Framework.framework/Resources inode: 3199295
scan: symlink to /Users/user/project/node_modules/electron/dist/Electron.app/Contents/Frameworks/Mantle.framework/Versions/A/Modules has been seen before, superseding (using inode) previous path: /Users/user/project/node_modules/electron/dist/Electron.app/Contents/Frameworks/Mantle.framework/Modules inode: 3199449
scan: symlink to /Users/user/project/node_modules/electron/dist/Electron.app/Contents/Frameworks/Mantle.framework/Versions/A/Headers has been seen before, superseding (using inode) previous path: /Users/user/project/node_modules/electron/dist/Electron.app/Contents/Frameworks/Mantle.framework/Headers inode: 3199436
scan: symlink to /Users/user/project/node_modules/electron/dist/Electron.app/Contents/Frameworks/Mantle.framework/Versions/A/Resources has been seen before, superseding (using inode) previous path: /Users/user/project/node_modules/electron/dist/Electron.app/Contents/Frameworks/Mantle.framework/Resources inode: 3199451
scan: symlink to /Users/user/project/node_modules/electron/dist/Electron.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Modules has been seen before, superseding (using inode) previous path: /Users/user/project/node_modules/electron/dist/Electron.app/Contents/Frameworks/ReactiveCocoa.framework/Modules inode: 3199515
scan: symlink to /Users/user/project/node_modules/electron/dist/Electron.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Resources has been seen before, superseding (using inode) previous path: /Users/user/project/node_modules/electron/dist/Electron.app/Contents/Frameworks/ReactiveCocoa.framework/Resources inode: 3199518
scan: symlink to /Users/user/project/node_modules/electron/dist/Electron.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers has been seen before, superseding (using inode) previous path: /Users/user/project/node_modules/electron/dist/Electron.app/Contents/Frameworks/ReactiveCocoa.framework/Headers inode: 3199461
scan: symlink to /Users/user/project/node_modules/electron/dist/Electron.app/Contents/Frameworks/Squirrel.framework/Versions/A/Modules has been seen before, superseding (using inode) previous path: /Users/user/project/node_modules/electron/dist/Electron.app/Contents/Frameworks/Squirrel.framework/Modules inode: 3199535
scan: symlink to /Users/user/project/node_modules/electron/dist/Electron.app/Contents/Frameworks/Squirrel.framework/Versions/A/Headers has been seen before, superseding (using inode) previous path: /Users/user/project/node_modules/electron/dist/Electron.app/Contents/Frameworks/Squirrel.framework/Headers inode: 3199528
scan: symlink to /Users/user/project/node_modules/electron/dist/Electron.app/Contents/Frameworks/Squirrel.framework/Versions/A/Resources has been seen before, superseding (using inode) previous path: /Users/user/project/node_modules/electron/dist/Electron.app/Contents/Frameworks/Squirrel.framework/Resources inode: 3199537
environment variables loaded using: /usr/local/bin/zsh -l
reloading plugin Default.arithmetic
reloading plugin Default.auto_indent_tag
reloading plugin Default.block
reloading plugin Default.colors
reloading plugin Default.comment
reloading plugin Default.convert_color_scheme
reloading plugin Default.convert_syntax
reloading plugin Default.copy_path
reloading plugin Default.delete_word
reloading plugin Default.detect_indentation
reloading plugin Default.duplicate_line
reloading plugin Default.echo
reloading plugin Default.exec
reloading plugin Default.fold
reloading plugin Default.font
reloading plugin Default.goto_line
reloading plugin Default.history_list
reloading plugin Default.indentation
reloading plugin Default.install_package_control
reloading plugin Default.kill_ring
reloading plugin Default.mark
reloading plugin Default.new_templates
reloading plugin Default.open_context_url
reloading plugin Default.open_in_browser
reloading plugin Default.pane
reloading plugin Default.paragraph
reloading plugin Default.paste_from_history
reloading plugin Default.profile
reloading plugin Default.quick_panel
reloading plugin Default.rename
reloading plugin Default.run_syntax_tests
reloading plugin Default.save_on_focus_lost
reloading plugin Default.scroll
reloading plugin Default.set_unsaved_view_name
reloading plugin Default.settings
reloading plugin Default.show_scope_name
reloading plugin Default.side_bar
reloading plugin Default.sort
reloading plugin Default.swap_line
reloading plugin Default.switch_file
reloading plugin Default.symbol
reloading plugin Default.transform
reloading plugin Default.transpose
reloading plugin Default.trim_trailing_white_space
reloading plugin Default.ui
reloading plugin CSS.css_completions
reloading plugin Diff.diff
reloading plugin HTML.encode_html_entities
reloading plugin HTML.html_completions
reloading plugin ShellScript.ShellScript
reloading plugin Calculate.calculate
reloading plugin Colorsublime.colorsublime-plugin
reloading plugin Comments Aware Enter.comments_aware_enter
reloading plugin FileDiffs.file_diffs
reloading plugin FlowType.FlowType
reloading plugin JavaScript Ultimate.install
reloading plugin MoveText.move_text
reloading plugin Package Control.1_reloader
reloading plugin Package Control.2_bootstrap
reloading plugin Package Control.Package Control
reloading plugin Parinfer.parinfer
reloading plugin Parinfer.sublime-parinfer
reloading plugin Wrap Plus.wrap_plus
plugins loaded
Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 283, in on_api_ready
    m.plugin_loaded()
  File "/Users/user/Library/Application Support/Sublime Text 3/Installed Packages/JavaScript Ultimate.sublime-package/install.py", line 12, in plugin_loaded
    from package_control import events
ImportError: No module named 'package_control'
reloading plugin 0_package_control_loader.00-package_control
Package Control: Skipping automatic upgrade, last run at 2018-05-08 18:16:38, next run at 2018-05-08 19:16:38 or after
0 Likes

#2

This is most likely caused by a third-party syntax that pushes the default Markdown syntax directly or indirectly (the error message is a bit misleading here) and eventually creates an infinite with_prototype loop.

Follow https://www.sublimetext.com/docs/3/revert.html to confirm this and then try disabling packages until you find out which one caused it.

0 Likes

#3

Thanks @FichteFoll!

As I had just done that, I decided instead to do list the installed packages and disable them until the problem disappeared, and enable the ones that I needed while the problem kept being gone.

This is my ignored packages setting now:

	"ignored_packages":
	[
		"Colorsublime",
		"Colorsublime - Themes",
		"FileIcons",
		"MarkdownHighlighting",
		"Vintage"
	],

So I’m guessing that either Colorsublime or Colorsublime - Themes is responsible. It could be MarkdownHightlighting but I don’t think so because I had tried disabling that before and it didn’t do anything.

Thanks again! I’ll mark this as solved for now then.

0 Likes

#4

MarkdownHighlighting is unlikely since you had that ignored before as well, but the fact that you had the default JavaScript package ignored could pose an issue under certain configurations. Colorsublime and Colorsublime - Themes are the only other options left, which also seems weird since afaik they are only about color schemes (where the latter is the repository that the former downloads them to) and shouldn’t even have any syntax definitions.

0 Likes

#5

That’s what it was!

I disabled it because ST3’s built-in JavaScript syntax doesn’t handle the latest JavaScript syntax, and the JavaScript Ultimate package recommends disabling the built-in package.

As soon as I disable the built-in JavaScript package I get the error. Enabling it makes it go away.

It would be great if the built-in JavaScript syntax package handled the latest JS syntax.

1 Like

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

Could you elaborate on what exactly the JavaScript syntax doesn’t highlight that you consider standard? @ThomSmith has been pretty on-the-top regarding implementing the latest “accepted” features into the syntax definition. There are a couple changes in 3.1 even.

For more esotheric features, you should take a look at https://packagecontrol.io/packages/JSCustom.

0 Likes

#7

I think the core syntax has complete Stage 3 support. If anything is missing from that, please file a bug report.

JS Custom supports a couple more experimental features, and I would happily implement any standards-track proposals and probably most nonstandard proposals. I’m currently working on infrastructure stuff in preparation for a major version release, including a comprehensive set of syntax tests, so the stable branch is actually lagging a bit behind the core syntax in some places.

The “JavaScript Ultimate” syntax certainly looks pretty comprehensive on its face — it’s nearly 23,000 lines and over 800 KB — but I don’t see any tests, so it’s hard to comment on the accuracy of the highlighting. But I do notice that it’s missing some standard scopes, including most of the usual punctuation scopes and meta scopes. The readme touts its regexp highlighting, but apparently it only works with their custom color scheme; ironically, the core JavaScript syntax makes all of the touted distinctions using the standard color schemes.

I will give it props for parsing expressions correctly (though it doesn’t go on to highlight them correctly). This is a lot harder than it looks in JavaScript.

1 Like

#8

Roger, it turned out to be an issue with Flowtype support: https://github.com/sublimehq/Packages/issues/1547

0 Likes

#9

Wow, thanks! That’s perfect! I just edited the default settings to enable flow_types, here’s my settings now for that plugin:

{
  "defaults": {
    "comma_operator": false,
    "custom_tagged_literals": false,
    "es_decorators": true,
    "flow_types": false,
    "jsx": false,
  },

  "configurations": {
    "Default": {
      "file_extensions": [ "js" ],
      "flow_types": true,
    },
    "React": {
        "file_extensions": [ "jsx" ],
        "flow_types": true,
        "jsx": true,
    }
  },

  "auto_build": true,
  "jsx_close_tag": true
}

Seems to work better than JavaScript Ultimate too. :slight_smile:

1 Like

#10

I have also encountered the with_prototype 25000 recursion error from markdown. It started fairly recently. I do not have JavaScript ultimate. I do have the JS es6 next, which has worked well for several years. Sadly, the es6 syntax also appears to be related to the markdown recursion error. Disabled es6 resolves the error. Any other JS package appears to trigger it. I attempted to download JSCustom, as the default JS syntax was very subtle, but different from es6 next syntax. Installing JSCustom also ran into error with ThomSmith server returning 502 error code.

I will have to continue to suffer with the markdown error for now. The syntax coloring aligned for JSCustom to emulate es6 next while also allowing markdown, default package, will have to wait for another day.

0 Likes

#11

The whole thing is on GitHub; there aren’t any extra servers involved. Did you install via Package Control?

0 Likes

#12

Yes, installed attempt was earlier via package control. I didn’t read the error response closely, only saw the username. Makes more sense if that was from github.

0 Likes

#13

I am also getting this error… Quite annoying.

0 Likes

#14

This is the direct result of a third-party package. It just so happens to be that one of the third-party packages you have installed has a syntax definition that is structured in such a way that it results in syntax definitions rapidly expanding in size until they hit the pre-defined error check condition.

The best course of action is to use the syntax definitions that come with Sublime Text and report and issues you seem with them. These are tested with new releases and have a whole community of contributors who work on fixing and improving them on a regular basis.

2 Likes

#15

Suggestions on troubleshooting this issue?

0 Likes

#16

CSS3 was identified as a culprit several times recently. The author is aware of the issue and seems to be working on a fix.

0 Likes

#17

@wbond, thank you for the third party syntax error tip…

Turns out that I was receiving that pop-up error because there is a syntax error in the third party extension “Java​Script​Next - ES6 Syntax.”

I removed Java​Script​Next - ES6 Syntax and now I do not receive any errors. :slight_smile:

0 Likes