{"action":"created","issue":{"url":"https://api.github.com/repos/abe33/atom-pigments/issues/61","labels_url":"https://api.github.com/repos/abe33/atom-pigments/issues/61/labels{/name}","comments_url":"https://api.github.com/repos/abe33/atom-pigments/issues/61/comments","events_url":"https://api.github.com/repos/abe33/atom-pigments/issues/61/events","html_url":"https://github.com/abe33/atom-pigments/issues/61","id":97163915,"number":61,"title":"helper process with 100% cpu when specific construct in file","user":{"login":"despairblue","id":927609,"avatar_url":"https://avatars.githubusercontent.com/u/927609?v=3","gravatar_id":"","url":"https://api.github.com/users/despairblue","html_url":"https://github.com/despairblue","followers_url":"https://api.github.com/users/despairblue/followers","following_url":"https://api.github.com/users/despairblue/following{/other_user}","gists_url":"https://api.github.com/users/despairblue/gists{/gist_id}","starred_url":"https://api.github.com/users/despairblue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/despairblue/subscriptions","organizations_url":"https://api.github.com/users/despairblue/orgs","repos_url":"https://api.github.com/users/despairblue/repos","events_url":"https://api.github.com/users/despairblue/events{/privacy}","received_events_url":"https://api.github.com/users/despairblue/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-07-24T22:52:18Z","updated_at":"2015-07-27T08:32:32Z","closed_at":null,"body":"Just to be sure I started with a completely fresh `.atom` folder and only installed `pigments`.\r\n\r\nRepro Steps:\r\n\r\n1. open a new file\r\n2. enter: `difference(a,)()` into it, or anything that contains that sequence\r\n3. save it and find that in your process list:\r\n```\r\ndespair+ 15175  100  8.1 1500948 643384 pts/5  Rl   00:40   0:42 /usr/share/atom/atom --eval require('/usr/share/atom/resources/app.asar/node_modules/coffee-cash/lib/coffee-cash.js').setCacheDirectory('/home/despairblue/.atom/compile-cache/coffee'); require('/usr/share/atom/resources/app.asar/node_modules/coffee-cash/lib/coffee-cash.js').register(); require('/usr/share/atom/resources/app.asar/node_modules/coffeestack/index.js').setCacheDirectory('/home/despairblue/.atom/compile-cache/coffee/source-maps'); require('/usr/share/atom/resources/app.asar/src/task-bootstrap.js');\r\n```\r\n\r\nThe process gets killed when it allocates to much memory:\r\n```\r\nError: FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - process out of memory\r\n\r\n    at Socket.<anonymous> (/usr/share/atom/resources/app.asar/src/task.js:94)\r\n    at emitOne (events.js:77)\r\n    at Socket.emit (events.js:166)\r\n    at readableAddChunk (_stream_readable.js:146)\r\n    at Socket.Readable.push (_stream_readable.js:109)\r\n    at Pipe.onread (net.js:517)\r\n```\r\n\r\nThe annoying part is that the process is restarted whenever the file is edited.\r\n\r\nI suppose the above construct throws the parsing logic in an infinite loop."},"comment":{"url":"https://api.github.com/repos/abe33/atom-pigments/issues/comments/125126015","html_url":"https://github.com/abe33/atom-pigments/issues/61#issuecomment-125126015","issue_url":"https://api.github.com/repos/abe33/atom-pigments/issues/61","id":125126015,"user":{"login":"abe33","id":247140,"avatar_url":"https://avatars.githubusercontent.com/u/247140?v=3","gravatar_id":"","url":"https://api.github.com/users/abe33","html_url":"https://github.com/abe33","followers_url":"https://api.github.com/users/abe33/followers","following_url":"https://api.github.com/users/abe33/following{/other_user}","gists_url":"https://api.github.com/users/abe33/gists{/gist_id}","starred_url":"https://api.github.com/users/abe33/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abe33/subscriptions","organizations_url":"https://api.github.com/users/abe33/orgs","repos_url":"https://api.github.com/users/abe33/repos","events_url":"https://api.github.com/users/abe33/events{/privacy}","received_events_url":"https://api.github.com/users/abe33/received_events","type":"User","site_admin":false},"created_at":"2015-07-27T08:32:32Z","updated_at":"2015-07-27T08:32:32Z","body":"Hi @despairblue, thanks for having a look at that, I think the main issue is with `findClosingIndex`, I'll try to find a proper fix for this case with a test that don't crash the runner. "}}