scriptcs icon indicating copy to clipboard operation
scriptcs copied to clipboard

ScriptCS REPL crashes with StackOverflowException

Open hemme opened this issue 12 years ago • 3 comments

This bunch of lines make Chocolatey-zed ScriptCS (v. 0.8.1) crash. Nightly build v.0.9.0.alpha is immune. This looks like an issue of the output system (probably self-references?).

| > #r "System.Windows.Forms" | > var f = new System.Windows.Forms.Form(); | > f

hemme avatar Dec 08 '13 14:12 hemme

Thanks for reporting this.

This looks like the issue related to the JSON serializer we were using which did not prevent cycles. We recently committed to use JSON.NET which does use cycle management. Did you try out the dev branch?

glennblock avatar Dec 09 '13 06:12 glennblock

Yes, this is definitely a SS.Text issue and is fixed with the #525 PR (and thus not reproducible in the dev branch/nigtlies). The JSON.Net serializer is set to ignore cycles (that's why you're seing #528, I think that is less intrusive. We can try to force the serialization by setting ReferenceLoopHandling.Serialize, but I'm not sure about the implications.

khellang avatar Dec 09 '13 07:12 khellang

Yeah this works on the dev branch.

filipw avatar Dec 09 '13 08:12 filipw