Don't crash when printing a recursive structure#2882
Don't crash when printing a recursive structure#2882thexa4 wants to merge 5 commits intoKSP-KOS:developfrom
Conversation
|
@thexa4 I just tested this and still got the stack overflow with this example program: That crashed KSP instantly, with this: |
|
Ah, sorry, it seems I only tested the single depth recursion. Will fix. |
|
While looking at #2894 I noticed that this incorrectly marks all strings as recursive. Fix is in progress. |
|
I'm trying to test the PR, see if it resolves my issue. It does not.
|
|
Thanks for testing it, I'll try to reproduce and fix it somewhere this week / next weekend. |
|
Thank you for working on the patch. I looked at the diff, that's pretty much what I would've tried but have no experience with C#. With the insight I've gained from you I was able to make my code work, after eliminating all attempts to print and run haskey on my 'object'. Thanks again and let me know if there's more I can do to help. |
|
Closed in favor of #2910 |
Fixes #1598
Will now print
"...recurse..."for theselfvalue instead of crashing KSP. Other serializers will end with an exception instead of a crash.