<div dir="ltr">Ok, well not sure what is going on <div><br></div><div><span style="font-size:13px">ioProcessEvents-&gt; </span><br></div><div><span style="font-size:13px"><br></span></div><div><p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="color:rgb(79,129,135)">sqInt</span><span style=""> ioProcessEvents(</span><span style="color:rgb(187,44,162)">void</span><span style="">) {</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="">    </span><span style="color:rgb(49,89,93)">aioPoll</span><span style="">(</span><span style="color:rgb(39,42,216)">0</span><span style="">);</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(79,129,135)"><span style="color:rgb(0,0,0)">    </span><span style="color:rgb(187,44,162)">if</span><span style="color:rgb(0,0,0)">(</span><span style="">ioProcessEventsHandler</span><span style="color:rgb(0,0,0)">)</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(79,129,135)"><span style="color:rgb(0,0,0)">        </span><span style="">ioProcessEventsHandler</span><span style="color:rgb(0,0,0)">();  //84</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="">    </span><span style="color:rgb(187,44,162)">return</span><span style=""> </span><span style="color:rgb(39,42,216)">0</span><span style="">;</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="">}</span></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style=""><br></span></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="">where </span><span style="color:rgb(79,129,135)">ioProcessEventsHandler is this </span></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style=""><br></span></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="color:rgb(187,44,162)">void</span><span style=""> nativeIoProcessEvents(</span><span style="color:rgb(187,44,162)">void</span><span style="">) {</span></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;min-height:13px"><span style=""></span><br></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,132,0)"><span style="color:rgb(0,0,0)"><span class="" style="white-space:pre">        </span></span><span style="">//API Documented</span></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;min-height:13px"><span style=""><span class="" style="white-space:pre">                </span></span></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="">    </span><span style="color:rgb(187,44,162)">if</span><span style=""> ([[NSThread currentThread] isCancelled]) {</span></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="">        gQuitNowRightNow = </span><span style="color:rgb(187,44,162)">YES</span><span style="">;</span></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,132,0)"><span style="color:rgb(0,0,0)">        ioExit();  </span><span style="">//This might not return, might call exittoshell</span></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="">    }</span></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;min-height:13px"><span style=""></span><br></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style=""><span class="" style="white-space:pre">        </span></span><span style="color:rgb(187,44,162)">if</span><span style=""> ([getMainWindowDelegate() forceUpdateFlush]) {</span></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style=""><span class="" style="white-space:pre">                </span>[getMainWindowDelegate() ioForceDisplayUpdate];</span></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style=""><span class="" style="white-space:pre">        </span>}</span></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;min-height:13px"><span style=""></span><br></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style=""><span class="" style="white-space:pre">        </span></span><span style="color:rgb(187,44,162)">if</span><span style=""> (interpreterProxy-&gt;methodPrimitiveIndex() == </span><span style="color:rgb(39,42,216)">0</span><span style="">) {</span></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style=""><span class="" style="white-space:pre">                </span>[gDelegateApp.squeakApplication pumpRunLoopEventSendAndSignal:</span><span style="color:rgb(187,44,162)">YES</span><span style="">];</span></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="">    } </span><span style="color:rgb(187,44,162)">else</span><span style=""> {</span></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style=""><span class="" style="white-space:pre">                </span>[gDelegateApp.squeakApplication pumpRunLoop];</span></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style=""><span class="" style="white-space:pre">        </span>}</span></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;min-height:13px"><span style=""><span class="" style="white-space:pre">        </span></span></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style=""><span class="" style="white-space:pre">        </span></span><span style="color:rgb(187,44,162)">if</span><span style=""> (gQuitNowRightNow) {</span></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,132,0)"><span style="color:rgb(0,0,0)"><span class="" style="white-space:pre">                </span>ioExit();  </span><span style="">//This might not return, might call exittoshell</span></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style=""><span class="" style="white-space:pre">        </span>}</span></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo">





















</p><p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="">}</span></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style=""><br></span></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style=""><br></span></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="">But then we end up over in </span></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style=""><br></span></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,132,0)"><span style="">/*<span class="" style="white-space:pre">        </span>The stackPointer is below the stackLimit. This is either because of a</span></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,132,0)"><span style=""><span class="" style="white-space:pre">        </span>stack overflow or the setting of stackLimit to indicate a possible</span></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,132,0)"><span style=""><span class="" style="white-space:pre">        </span>interrupt. Check for interrupts and stackOverflow and deal with each</span></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,132,0)"><span style=""><span class="" style="white-space:pre">        </span>appropriately. Answer if a context switch occurred. */</span></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;min-height:13px"><span style=""></span><br></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo">




</p><p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,132,0)"><span style="color:rgb(0,0,0)"><span class="" style="white-space:pre">        </span></span><span style="">/* StackInterpreter&gt;&gt;#handleStackOverflowOrEventAllowContextSwitch: */</span></p></div><div><span style=""><br></span></div><div><span style="">&amp;</span></div><div><span style=""><br></span></div><div><p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,132,0)"><span style="">/*<span class="" style="white-space:pre">        </span>If contextSwitchIfNotNil is nil we can&#39;t context switch.</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,132,0)"><span style=""><span class="" style="white-space:pre">        </span>contextSwitchIfNotNil is set to nil by</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,132,0)"><span style=""><span class="" style="white-space:pre">        </span>- the special primitiveClosureValueNoContextSwitch entry-point in block</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,132,0)"><span style=""><span class="" style="white-space:pre">        </span>dispatch - the stack check in methods with primitive 198.</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,132,0)"><span style=""><span class="" style="white-space:pre">        </span>In a normal method contextSwitchIfNotNil will be the method (see e.g.</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,132,0)"><span style=""><span class="" style="white-space:pre">        </span>SimpleStackBasedCogit&gt;&gt;compileFrameBuild). In a block it will be the</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,132,0)"><span style=""><span class="" style="white-space:pre">        </span>closure (see e.g. SimpleStackBasedCogit&gt;&gt;compileMethodBody). */</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;min-height:13px"><span style=""></span><br></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,132,0)"><span style="color:rgb(0,0,0)"><span class="" style="white-space:pre">        </span></span><span style="">/* CoInterpreter&gt;&gt;#ceStackOverflow: */</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(187,44,162)"><br></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style=""><br></span></p></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, May 19, 2016 at 4:39 PM, Eliot Miranda <span dir="ltr">&lt;<a href="mailto:eliot.miranda@gmail.com" target="_blank">eliot.miranda@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div>Process:         Squeak [2023]</div><div>Path:            /Users/USER/*/CocoaFast.app/Contents/MacOS/Squeak</div><div>Identifier:      org.squeak.Squeak$(VM_MONIKER)</div><div>Version:         5.0.3721 (5.0.3721)</div><div>Code Type:       X86 (Native)</div><div>Parent Process:  launchd [186]</div><div>Responsible:     Squeak [2023]</div><div>User ID:         594</div><div><br></div><div>Date/Time:       2016-05-19 16:37:13.900 -0700</div><div>OS Version:      Mac OS X 10.9.5 (13F1808)</div><div>Report Version:  11</div><div>Anonymous UUID:  F54BABC9-4764-81AE-0375-EA1A9A4A38C2</div><div><br></div><div><br></div><div>Crashed Thread:  0  Dispatch queue: com.apple.main-thread</div><div><br></div><div>Exception Type:  EXC_BAD_ACCESS (SIGBUS)</div><div>Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000000000000</div><div><br></div><div>VM Regions Near 0:</div><div>--&gt; __PAGEZERO             0000000000000000-0000000000001000 [    4K] ---/--- SM=NUL  /Users/USER/*/CocoaFast.app/Contents/MacOS/Squeak</div><div>    VM_ALLOCATE            0000000000001000-00000000000cf000 [  824K] ---/--- SM=NUL  </div><div><br></div><div>Thread 0 Crashed:: Dispatch queue: com.apple.main-thread</div><div>0   com.apple.CoreFoundation      <span style="white-space:pre-wrap">        </span>0x9821a95d CFRunLoopRunSpecific + 253</div><div>1   com.apple.CoreFoundation      <span style="white-space:pre-wrap">        </span>0x9821a84b CFRunLoopRunInMode + 123</div><div>2   com.apple.Foundation          <span style="white-space:pre-wrap">        </span>0x91c48559 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 277</div><div>3   org.squeak.Squeak$(VM_MONIKER)<span style="white-space:pre-wrap">        </span>0x00145f70 -[sqSqueakMainApplication(events) pumpRunLoop] + 99 (sqSqueakMainApplication+events.m:69)</div><div>4   org.squeak.Squeak$(VM_MONIKER)<span style="white-space:pre-wrap">        </span>0x0013beb8 -[sqSqueakOSXApplication(events) pumpRunLoop] + 50 (sqSqueakOSXApplication+events.m:127)</div><div>5   org.squeak.Squeak$(VM_MONIKER)<span style="white-space:pre-wrap">        </span>0x00143c56 nativeIoProcessEvents + 208 (sqSqueakEventsAPI.m:70)</div><div>6   org.squeak.Squeak$(VM_MONIKER)<span style="white-space:pre-wrap">        </span>0x00143caa ioProcessEvents + 35 (sqSqueakEventsAPI.m:84)</div><div>7   org.squeak.Squeak$(VM_MONIKER)<span style="white-space:pre-wrap">        </span>0x000dc82a checkForEventsMayContextSwitch + 884 (gcc3x-cointerp.c:61595)</div><div>8   org.squeak.Squeak$(VM_MONIKER)<span style="white-space:pre-wrap">        </span>0x000dbaec handleStackOverflowOrEventAllowContextSwitch + 33 (gcc3x-cointerp.c:64780)</div><div>9   org.squeak.Squeak$(VM_MONIKER)<span style="white-space:pre-wrap">        </span>0x000dfb2e ceStackOverflow + 108 (gcc3x-cointerp.c:11701)</div><div>10  ???                           <span style="white-space:pre-wrap">        </span>0x055262c6 0 + 89285318</div><div><br></div><div><div dir="ltr"><div><span style="font-size:small;border-collapse:separate"><div>_,,,^..^,,,_<br></div><div>best, Eliot</div></span></div></div></div>
</div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr">===========================================================================<br>John M. McIntosh. Corporate Smalltalk Consulting Ltd <a href="https://www.linkedin.com/in/smalltalk" target="_blank">https://www.linkedin.com/in/smalltalk</a><br>===========================================================================<br></div></div></div></div>
</div></div>