question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Circular reference creates Stack Overflow

See original GitHub issue

Given

public class Foo
{
    public Bar myBar { get; set; }
}

public class Bar
{
    public Foo myFoo { get; set; }
}

TypeGen crashes with stack overflow

Process is terminated due to StackOverflowException.

Giving the type with, eg, [TsType("Foo", "./foo")] works fine.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
jburzynskicommented, Feb 25, 2017

1.5.2 1.5.3 is out - it includes bugfix to this issue plus some other smaller changes.

As previously, I’ll keep this thread open for some time.

0reactions
jburzynskicommented, Feb 23, 2017

Thanks; based on your example I was able to replicate this error. It occurs in a different scenario than the one I fixed.

I should be able to fix it in the next release - I’ll chuck in some minor improvements as well, so the next version should be out in a couple of days.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why are circular references considered harmful? [closed]
Circular dependencies between classes are not necessarily harmful. Indeed, in some cases they are desirable.
Read more >
code quality - What's wrong with circular references?
Circular object references can crash naïve recursive algorithms (such as serializers, visitors and pretty-printers) with stack overflows.
Read more >
Circular reference causes stack overflow · Issue #6
As discussed in pitermarx/NCalc-Edge#14, when using circular references, the Evaluate method leads to a StackOverflowException (which is not ...
Read more >
JPA ManyToMany with Eclipselink & GSON circular ...
I have an issue with a manytomany bi-directional JPA relationship that is causing a stack overflow error. when the server is restarted (if ......
Read more >
Circular references in JSONSerializer and StackOverflow ...
Circular references causes StackOverflow Exceptions the same as calling a never ending recursive function which crashes all Apps. The ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found