#1073 Dictionary >> printOn: failing during inspect with stack overflow when cycles are present

Open
opened 8 years ago by nero · 0 comments

Originally at 2014-08-30T17:27:54Z by Sebastian Heidbrink

I am currently porting some code to Amber and I came across an issue with recursions.

Here is a Little snippet that helps to reproduce the behavior.

testRecursion

| model room1 room2 exit1 exit2 ston object |
(room1 := Dictionary new) at: #name put: 'Room 1'.
(room2 := Dictionary new) at: #name put: 'Room 2'.
(exit1 := Dictionary new)
    at: #name put: 'Exit 1';
    at: #origin put: room1;
    at: #destination put: room2.
(exit2 := Dictionary new)
    at: #name put: 'Exit 2';
    at: #origin put: room2;
    at: #destination put: room1.
room1 at: #exit put: exit1.
room2 at: #exit put: exit2.
model := Array with: room1 with: room2.
model inspect

I am on the pre-0.13 and use the legacy browser.

Sebastian

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Originally at 2014-08-30T17:27:54Z by Sebastian Heidbrink I am currently porting some code to Amber and I came across an issue with recursions. Here is a Little snippet that helps to reproduce the behavior. testRecursion | model room1 room2 exit1 exit2 ston object | (room1 := Dictionary new) at: #name put: 'Room 1'. (room2 := Dictionary new) at: #name put: 'Room 2'. (exit1 := Dictionary new) at: #name put: 'Exit 1'; at: #origin put: room1; at: #destination put: room2. (exit2 := Dictionary new) at: #name put: 'Exit 2'; at: #origin put: room2; at: #destination put: room1. room1 at: #exit put: exit1. room2 at: #exit put: exit2. model := Array with: room1 with: room2. model inspect I am on the pre-0.13 and use the legacy browser. Sebastian <bountysource-plugin> --- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/4134849-dictionary-printon-failing-during-inspect-with-stack-overflow-when-cycles-are-present?utm_campaign=plugin&utm_content=tracker%2F79201&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F79201&utm_medium=issues&utm_source=github). </bountysource-plugin>
Sign in to join this conversation.
No Label
No Milestone
No assignee
1 Participants
Loading...
Cancel
Save
There is no content yet.