mrhanlon / less-than-slash

Atom.io package for closing open tags when `</` is typed, like in Sublime Text 3.
MIT License
23 stars 6 forks source link

/ error #18

Closed mattd4d closed 9 years ago

mattd4d commented 9 years ago

Yesterday and Today I am receiving an error when typing /. When it happened yesterday, I restarted Atom and it seemed to have fixed it. Unfortunately today, restarting Atom isn't fixing the issue.

Atom Version: 1.0.19 System: Mac OS X 10.10.5 Thrown From: less-than-slash package, v0.10.0

Stack Trace

Uncaught RangeError: Maximum call stack size exceeded

At /Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:772

RangeError: Maximum call stack size exceeded
    at String.match (native)
    at Object.module.exports.parseXMLTag (/Users/mattdugan/.atom/packages/less-than-slash/lib/less-than-slash.coffee:151:18)
    at Object.module.exports.parseNextTag (/Users/mattdugan/.atom/packages/less-than-slash/lib/less-than-slash.coffee:105:18)
    at Object.module.exports.handleNextTag (/Users/mattdugan/.atom/packages/less-than-slash/lib/less-than-slash.coffee:75:15)
    at Object.module.exports.findUnclosedTags (/Users/mattdugan/.atom/packages/less-than-slash/lib/less-than-slash.coffee:63:17)
    at Object.module.exports.findUnclosedTags (/Users/mattdugan/.atom/packages/less-than-slash/lib/less-than-slash.coffee:71:19)
    at Object.module.exports.findUnclosedTags (/Users/mattdugan/.atom/packages/less-than-slash/lib/less-than-slash.coffee:64:17)
    at Object.module.exports.findUnclosedTags (/Users/mattdugan/.atom/packages/less-than-slash/lib/less-than-slash.coffee:71:19)
    at Object.module.exports.findUnclosedTags (/Users/mattdugan/.atom/packages/less-than-slash/lib/less-than-slash.coffee:64:17)
    at Object.module.exports.findUnclosedTags (/Users/mattdugan/.atom/packages/less-than-slash/lib/less-than-slash.coffee:71:19)

Commands

     -3:16.3.0 find-and-replace:show (atom-text-editor.editor.is-focused)
  5x -3:15.2.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -2:21 core:select-all (atom-text-editor.editor.is-focused)
     -2:20.5.0 core:paste (atom-text-editor.editor.is-focused)
     -1:01.9.0 find-and-replace:show (atom-text-editor.editor.is-focused)
  2x -1:00.9.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -0:55 editor:duplicate-lines (atom-text-editor.editor.is-focused)
     -0:30.8.0 find-and-replace:show (atom-text-editor.editor.is-focused)
  2x -0:29.7.0 core:confirm (atom-text-editor.editor.mini.is-focused)
  4x -0:26.2.0 core:select-right (atom-text-editor.editor.is-focused)
     -0:24.4.0 core:copy (atom-text-editor.editor.is-focused)
     -0:21.4.0 find-and-replace:show (atom-text-editor.editor.is-focused)
  2x -0:19.9.0 core:confirm (atom-text-editor.editor.mini.is-focused)
  2x -0:15.2.0 core:paste (atom-text-editor.editor.is-focused)
  4x -0:10.1.0 core:backspace (atom-text-editor.editor.is-focused)
     -0:05.5.0 editor:newline (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "disabledPackages": [
      "wrap-guide"
    ],
    "themes": [
      "seti-ui",
      "one-dark-syntax"
    ]
  },
  "less-than-slash": {}
}

Installed Packages

# User
color-picker, v2.0.13
less-than-slash, v0.10.0
pigments, v0.18.1
seti-ui, v0.8.0
white-cursor, v0.6.0

# Dev
No dev packages
MarcPorciuncula commented 9 years ago

What kind of file were you working on? We're there any tags present?

On Thu, Oct 29, 2015 at 1:19 AM, Matt Dugan notifications@github.com wrote:

Yesterday and Today I am receiving an error when typing /. When it happened yesterday, I restarted Atom and it seemed to have fixed it. Unfortunately today, restarting Atom isn't fixing the issue. Atom Version: 1.0.19 System: Mac OS X 10.10.5 Thrown From: less-than-slash package, v0.10.0

Stack Trace

Uncaught RangeError: Maximum call stack size exceeded

At /Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:772
RangeError: Maximum call stack size exceeded
    at String.match (native)
    at Object.module.exports.parseXMLTag (/Users/mattdugan/.atom/packages/less-than-slash/lib/less-than-slash.coffee:151:18)
    at Object.module.exports.parseNextTag (/Users/mattdugan/.atom/packages/less-than-slash/lib/less-than-slash.coffee:105:18)
    at Object.module.exports.handleNextTag (/Users/mattdugan/.atom/packages/less-than-slash/lib/less-than-slash.coffee:75:15)
    at Object.module.exports.findUnclosedTags (/Users/mattdugan/.atom/packages/less-than-slash/lib/less-than-slash.coffee:63:17)
    at Object.module.exports.findUnclosedTags (/Users/mattdugan/.atom/packages/less-than-slash/lib/less-than-slash.coffee:71:19)
    at Object.module.exports.findUnclosedTags (/Users/mattdugan/.atom/packages/less-than-slash/lib/less-than-slash.coffee:64:17)
    at Object.module.exports.findUnclosedTags (/Users/mattdugan/.atom/packages/less-than-slash/lib/less-than-slash.coffee:71:19)
    at Object.module.exports.findUnclosedTags (/Users/mattdugan/.atom/packages/less-than-slash/lib/less-than-slash.coffee:64:17)
    at Object.module.exports.findUnclosedTags (/Users/mattdugan/.atom/packages/less-than-slash/lib/less-than-slash.coffee:71:19)

Commands

     -3:16.3.0 find-and-replace:show (atom-text-editor.editor.is-focused)
  5x -3:15.2.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -2:21 core:select-all (atom-text-editor.editor.is-focused)
     -2:20.5.0 core:paste (atom-text-editor.editor.is-focused)
     -1:01.9.0 find-and-replace:show (atom-text-editor.editor.is-focused)
  2x -1:00.9.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -0:55 editor:duplicate-lines (atom-text-editor.editor.is-focused)
     -0:30.8.0 find-and-replace:show (atom-text-editor.editor.is-focused)
  2x -0:29.7.0 core:confirm (atom-text-editor.editor.mini.is-focused)
  4x -0:26.2.0 core:select-right (atom-text-editor.editor.is-focused)
     -0:24.4.0 core:copy (atom-text-editor.editor.is-focused)
     -0:21.4.0 find-and-replace:show (atom-text-editor.editor.is-focused)
  2x -0:19.9.0 core:confirm (atom-text-editor.editor.mini.is-focused)
  2x -0:15.2.0 core:paste (atom-text-editor.editor.is-focused)
  4x -0:10.1.0 core:backspace (atom-text-editor.editor.is-focused)
     -0:05.5.0 editor:newline (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "disabledPackages": [
      "wrap-guide"
    ],
    "themes": [
      "seti-ui",
      "one-dark-syntax"
    ]
  },
  "less-than-slash": {}
}

Installed Packages

# User
color-picker, v2.0.13
less-than-slash, v0.10.0
pigments, v0.18.1
seti-ui, v0.8.0
white-cursor, v0.6.0
# Dev
No dev packages

Reply to this email directly or view it on GitHub: https://github.com/mrhanlon/less-than-slash/issues/18

mattd4d commented 9 years ago

XML and it only happens on lines 2780+. It happens with any tag. I don't have any issues editing the document in sublime.

MarcPorciuncula commented 9 years ago

Oh, the recursion is definitely the problem. Large amounts of work + recursion = call stack limit exceeded.

I guess I'll just have to revert it to a while loop instead, should be able to get a fix out tonight.

On Thu, Oct 29, 2015 at 7:36 AM, Matt Dugan notifications@github.com wrote:

XML and it only happens on lines 2780+. It happens with any tag. I don't have any issues editing the document in sublime.

Reply to this email directly or view it on GitHub: https://github.com/mrhanlon/less-than-slash/issues/18#issuecomment-151983159

mattd4d commented 9 years ago

Great! Love the package btw :+1: