<br><br><div class="gmail_quote">On Mon, Jan 30, 2012 at 9:18 PM, S Krish <span dir="ltr">&lt;<a href="mailto:krishnamachari.sudhakar@gmail.com">krishnamachari.sudhakar@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
In general why is there not a catch all for Stack Overflow and infinite loops.</blockquote><div><br></div><div>There is, low space (and user interrupt for flat infinite loops).  But the low space interrupt machinery is easily broken.  It is difficult to test, and an increasingly silly approach on modern machines with huge amounts of memory.  We need to think again.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><br></div><div>Thats very annoying for newbie.. and infact gives a bad feel to using Pharo. The image they are working for say 3-4 hours and the crash just pushes them out of all the code they are working on with.. small as it maybe..</div>

<div><br></div><div>Recover / and other options are fallbacks but invariably newbies have it messed up and are not very clear on how to recover either .. thats a job for the experienced user actually... </div><div><br></div>

<div>This occurs so often from all of the polling code.. and if anyone unknowingly puts in a debug point in the methods that loop infinitely.. and so many of them lurk all around the image..</div><div><br></div><div>Just stop the loop and throw up a debugger if say 100 calls have gone to very same method..? or detect a clear loopback to the same method.. <br>

<br><div class="gmail_quote">On Tue, Jan 31, 2012 at 12:01 AM, Andrew P. Black <span dir="ltr">&lt;<a href="mailto:black@cs.pdx.edu" target="_blank">black@cs.pdx.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Teaching a class of novices, it&#39;s not surprising that someone tried &quot;Collection new&quot;.  What was surprising is that this got the VM is a loop of some kind, with emergency stack dumps and so on.<br>
<br>
Here is my reply:<br>
<br>
<br>
&gt; On 30 Jan 2012, at 01:18 , Xingzhi Harry Pan wrote:<br>
&gt;<br>
&gt;&gt; ...it&#39;s pretty innocent:<br>
&gt;&gt; Collection new<br>
&gt;<br>
&gt;<br>
&gt; OK. I looked at this.  The problem comes when trying to print the collection.  Somehow the VM gets confused when trying to do do: ... I&#39;m not quite clear why.<br>
&gt;<br>
&gt; The quick fix is to change the Collection&gt;&gt;new method to<br>
&gt;<br>
&gt;       self error: &#39;Collection is an abstract class, and cannot be instantiated&#39;<br>
&gt;<br>
&gt; However this will break Heap&gt;&gt;new: , which sends super new.  It ought to send self basicNew instead.<br>
&gt;<br>
&gt; These two changes seem to avoid the problem, but I&#39;m waiting to see ...<br>
&gt;<br>
&gt;       Andrew<br>
<br>
But I don&#39;t understand the root cause.  Printing eventually sends do:, which is self subclassResponsibility.  Why don&#39;t we get a clean failure?<br>
<span><font color="#888888"><br>
        Andrew<br>
<br>
<br>
</font></span></blockquote></div><br></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>best,<div>Eliot</div><br>