Yes, I have had that problem in the past. But I do not recall the last
time I did.
And I don't remember if any time that I had an unresponsive UI that it
was due to an infinite loop as described here as opposed to some other
CPU intensive and possibly memory increasing bug.
My example here is
>
> I can execute foreverTrue in a Playground and when nothing returns in an
> appropriate amount of time. I can stop the execution
Assuming the UI is responsive enough to receive the stop command… which (at
least in my experience) is more often false than true.
In principle any environment
While working on a project I made a mistake in some code. A common
mistake in most languages, a less common one in Smalltalk or Pharo.
Something similar to the below.
foreverTrue
| index end |
[ index < end ] whileTrue: [
"Do something clever.
But forget to increment index."
].
^