pharo
pharo copied to clipboard
Solving Printing infinite loop and crashing image in Printing of Array with self Array in it
The problem was that when we are trying to print an Array the image crash and it was that it entering in an infinite loop so now is refering to the printing as the same way than OrderedCollection
Thanks for opening this pull request! Now continious integration (CI) will build Pharo with your change and run all tests. This might fail due to many reasons! Please check if your PR breaks the build or makes tests fail. Feel free to add comments to the PR. After this, before your PR can be merged it needs one or more reviews. Do not hesitate to ask people (on the Mailinglist or Discord) to help! When the CI shows no problems and there are positive reviews, your PR will be merged.
But this only checks a very simple case (one level deep). You can create self-referring structures that are much deeper before they cycle. No ?
I agree with @svenvc. This is not a correct solution. We need to be able to detect loops no matter how deep they are.
Actually, we need to fix the printOn: method in Collection to handle loops and that should fix Array printOn: too.
fixed by merging https://github.com/pharo-project/pharo/pull/11916