atom-minimap / minimap-selection

Display the buffer's selections on the minimap

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Uncaught RangeError: Maximum call stack size exceeded

olmokramer opened this issue · comments

Reproduction

  1. Open a large file, about 300 lines seems to do it for me
  2. Trigger the core:undo command, e.g. by pressing ctrl-z
  3. Atom freezes and throws multiple Uncaught RangeError: Maximum call stack size exceeded

System
Atom v1.2.0-dev-0145ae3
Debian 9

Stack
It was about 10000 lines long, so here's a small part: http://pastebin.com/Q2jSeP0q

Same error in Mac when I tried to select many lines with Alt + Mouse selection

image

Sorry guys, I completely missed that issue.

I'm on 1.2.0-dev-5a4f79c and it looks I'm not able to reproduce that with the two scenarios you provided. Do you see any other information I could use to reproduce that?

@olmokramer Looking at the log, it seems the editor was in a state without any selections. There's createLastSelectionIfNeeded in the stack, but if it entered in addSelectionForBufferRange that means there was no selections (https://github.com/atom/atom/blob/master/src/text-editor.coffee#L2267-L2269). I'm not really sure how an editor can end up in this state because the constructor is supposed to create one if there's none (https://github.com/atom/atom/blob/master/src/text-editor.coffee#L103-L107) except when suppressCursorCreation is true, but it seems this parameters is never used (https://github.com/atom/atom/search?utf8=%E2%9C%93&q=suppressCursorCreation). But actually it doesn't matter much because I can check the selections array length before calling getSelections.

@joseluisq Your context seems a bit different, does your stack takes the same route as @olmokramer's one?

@abe33 In exactly I don't know but my issue Atom notification button redirects me to this issue place. It's true, this error refers to infinite loop retated to some selection problem.

@abe33 No worries :) I'll check this weekend if the update did what it was supposed to do. Thanks for the quick fix!