ultisnips
ultisnips copied to clipboard
RecursionError: maximum recursion depth exceeded in comparison
Sorry in advance, but I am unable to reproduce this issue, it seems to happen at random maybe a couple of times per day. I have tried to find a way to reproduce it the last couple of weeks, but I can't. It's annoying me so much I need to post it, in case you have an easy solution.
Sometimes my editor freezes for a long time before I get this error (like minutes), other times I get it instantly after filling out a snippet.
The last couple of times the error happened, it was while filling in a Rust LSP-provided snippet inside of a custom Ultisnips snippet, i.e.:
assert_eq!(
unique_paths(3, 7),
28,
);
assert_eq!
above is a custom Ultisnips snippet, where I expanded the unique_paths
snippet from the LSP in the first position. I got the error when pressing <Esc>
to leave the snippet context.
The error is:
An error occured. This is either a bug in UltiSnips or a bug in a
snippet definition. If you think this is a bug, please report it to
https://github.com/SirVer/ultisnips/issues/new
Please read and follow:
https://github.com/SirVer/ultisnips/blob/master/CONTRIBUTING.md#reproducing-bugs
Following is the full stack trace:
Traceback (most recent call last):
File "/home/tomas/.local/share/nvim/lazy/ultisnips/pythonx/UltiSnips/err_to_scratch_buffer.py", line 47, in wrapper
return func(self, *args, **kwds)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/tomas/.local/share/nvim/lazy/ultisnips/pythonx/UltiSnips/snippet_manager.py", line 415, in _cursor_moved
self._active_snippets[0].replay_user_edits(es, self._ctab)
File "/home/tomas/.local/share/nvim/lazy/ultisnips/pythonx/UltiSnips/text_objects/snippet_instance.py", line 70, in replay_user_edits
self._do_edit(cmd, ctab)
File "/home/tomas/.local/share/nvim/lazy/ultisnips/pythonx/UltiSnips/text_objects/base.py", line 274, in _do_edit
self._do_edit(child)
File "/home/tomas/.local/share/nvim/lazy/ultisnips/pythonx/UltiSnips/text_objects/base.py", line 274, in _do_edit
self._do_edit(child)
File "/home/tomas/.local/share/nvim/lazy/ultisnips/pythonx/UltiSnips/text_objects/base.py", line 274, in _do_edit
self._do_edit(child)
[Previous line repeated 958 more times]
File "/home/tomas/.local/share/nvim/lazy/ultisnips/pythonx/UltiSnips/text_objects/base.py", line 246, in _do_edit
child._do_edit(cmd, ctab)
File "/home/tomas/.local/share/nvim/lazy/ultisnips/pythonx/UltiSnips/text_objects/base.py", line 290, in _do_edit
self._child_has_moved(idx, pivot, delta)
File "/home/tomas/.local/share/nvim/lazy/ultisnips/pythonx/UltiSnips/text_objects/base.py", line 304, in _child_has_moved
child._move(pivot, diff)
File "/home/tomas/.local/share/nvim/lazy/ultisnips/pythonx/UltiSnips/text_objects/base.py", line 296, in _move
child._move(pivot, diff)
File "/home/tomas/.local/share/nvim/lazy/ultisnips/pythonx/UltiSnips/text_objects/base.py", line 293, in _move
TextObject._move(self, pivot, diff)
File "/home/tomas/.local/share/nvim/lazy/ultisnips/pythonx/UltiSnips/text_objects/base.py", line 67, in _move
self._start.move(pivot, diff)
File "/home/tomas/.local/share/nvim/lazy/ultisnips/pythonx/UltiSnips/position.py", line 23, in move
if self < pivot:
^^^^^^^^^^^^
File "/home/tomas/.local/share/nvim/lazy/ultisnips/pythonx/UltiSnips/position.py", line 62, in __lt__
return (self.line, self.col) < (other.line, other.col)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RecursionError: maximum recursion depth exceeded in comparison
Has anybody else had this same issue? Is there something obvious causing it?
- Operating System: Arch Linux
- Vim Version: NVIM v0.9.1
- UltiSnips Version: 24bca5c
- Python inside Vim: 3.11.3
- Docker repo/vimrc: :disappointed: