Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

REPL goes into an endless loop while displaying mutually referencing items #3066

Closed
amitmurthy opened this issue May 9, 2013 · 4 comments · Fixed by JuliaLang/IJulia.jl#553

Comments

@amitmurthy
Copy link
Contributor

type A
    text
    child
    parent

    A() = new("", nothing, nothing)
end

a = A()
a.text="1"
a.child = A()
a.child.text="1.1"
a.child.parent = a

show endlessly tries to display both the child and parent.

Ran into this situation while I was modelling an XML document as a tree structure and I had a parent reference for unwinding the stack while parsing the XML document.

I'll find a workaround for my current use case, but it will be good to enhance show to keep track of objects already displayed and not display them again.

@quinnj
Copy link
Member

quinnj commented May 9, 2013

I think this has actually been around since issue #25.

@toivoh
Copy link
Contributor

toivoh commented May 9, 2013

See also #1139. I'd also like to see this fixed, but it's not quite clear which is the best way to do it. Just getting rid of the infinite loop would be a start, of course.

@mauro3
Copy link
Contributor

mauro3 commented Jan 26, 2014

This may be related, however the stackoverflow occurs without doing any displaying:

a=Dict();
a[a]=5;
a[a]=6; # stack overflow

Note this works with ObjectIdDict (but the displaying still crashes julia)

@quinnj
Copy link
Member

quinnj commented Jun 10, 2014

Closed by #3831.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants