rafamel/subtle-brackets

Stack overflow on large files

inosik opened this issue · 6 comments

When I try to open a (relatively) large file (fsharp.js of Ionide) with subtle-brackets enabled, something breaks in the editor and it stops responding to almost all input events, I can't even type no more. I think that breaks the extension host or something, because all extensions stop working.

RangeError: Maximum call stack size exceeded
	at Object.lineAt (~\scoop\apps\vscode\1.22.2\resources\app\out\vs\workbench\node\extensionHostProcess.js:447:788)
	at Runner.parseUntilComplement (~\.vscode\extensions\rafamel.subtle-brackets-2.1.1\out\src\runner.js:192:36)
	at Runner.parseUntilComplement (~\.vscode\extensions\rafamel.subtle-brackets-2.1.1\out\src\runner.js:193:21)
	at Runner.parseUntilComplement (~\.vscode\extensions\rafamel.subtle-brackets-2.1.1\out\src\runner.js:193:21)
	at Runner.parseUntilComplement (~\.vscode\extensions\rafamel.subtle-brackets-2.1.1\out\src\runner.js:193:21)
	...
e.$onExtensionRuntimeError @ mainThreadExtensionService.ts:44
e._doInvokeHandler @ rpcProtocol.ts:174
e._invokeHandler @ rpcProtocol.ts:159
e._receiveRequest @ rpcProtocol.ts:108
e._receiveOneMessage @ rpcProtocol.ts:90
(anonymous) @ rpcProtocol.ts:33
(anonymous) @ rpcProtocol.ts:213
e.fire @ event.ts:140
(anonymous) @ ipc.net.ts:81
emitOne @ events.js:96
emit @ events.js:191
readableAddChunk @ _stream_readable.js:178
Readable.push @ _stream_readable.js:136
onread @ net.js:560

Hi Ilja, I'm working on this and a few more improvements to the extension. I'll let you know when there's an update.

Thanks for reporting it!
Rafa.

Hi Ilja, some updates. I've now done a full rewrite of the extension, and it should deal with these cases gracefully. So far, all features present on the previous version have been reimplemented, though there are still some changes to be made until the next release - it'll probably be ready around mid may. In the meantime, it'd be great if you could build the develop branch to test it out yourself and let me know :)

Rafa.

The latest develop branch works like a charm on the file mentioned above 👍

@rafamel Hi. Will be update available?

@Zx-EvM I've been busy as hell with classes these days. I had an almost ready to launch version last time I reviewed this, so now that I've got some free time on my hands, it should be ready asap. Sorry for the delay guys. I plan of having it done by the weekend ;)

@Zx-EvM This should now be solved w/ the v3 release.