<div dir="ltr">Hi Marcel,<div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jan 25, 2018 at 1:04 AM, Marcel Taeumel <span dir="ltr"><<a href="mailto:marcel.taeumel@hpi.de" target="_blank">marcel.taeumel@hpi.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div><div id="gmail-m_1103400450146512480__MailbirdStyleContent" style="font-size:12pt;font-family:calibri;color:rgb(0,0,0)">
                                        Well, I moved the flag inside the deferred call. It works fine for me. :-)<div><br></div><div>See, if it works for you as well.</div></div></div></blockquote><div><br></div><div>It does.  Thank you!  </div><div><br></div><div>BTW, here's how I'm using it:</div><div><br></div><div><div>[:m :opts|</div><div> [StackToRegisterMappingCogit cog: m options: opts] fork.</div><div> AltStackToRegisterMappingCogit cog: m options: opts]</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">  </span>value: TabbedPalette class>>#unload</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">      </span>value: #(ObjectMemory Spur64BitCoMemoryManager</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">                 </span>debugBytecodePointers #(59)).</div></div><div><br></div><div>It stops two nearly identical JIT compilations of a method at a given bytecode, saving me huge amounts of time stepping to a specific point in two separate debuggers.</div><div><br></div><div>The need for editWithLabel: comes in a scan over all the methods in the system where I open the disassembled machine code generated by each JIT, a diff of the disassembly where the two differ, and an explorer on the CompiledMethod.  From that I puzzle out which bytecode caused the difference and then move to my first example to debug.  Contrast this with two simulations of an image where the different results become apparent long after bugs in the code produced by the incomplete refactoring of AltStackToRegisterMappingCogit, and simulation proceeds at a stately pace.</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div><div id="gmail-m_1103400450146512480__MailbirdStyleContent" style="font-size:12pt;font-family:calibri;color:rgb(0,0,0)"><div><a href="http://forum.world.st/The-Trunk-Tools-mt-794-mcz-tp5064330.html" target="_blank" style="font-size:12pt">http://forum.world.st/The-<wbr>Trunk-Tools-mt-794-mcz-<wbr>tp5064330.html</a><br></div><div><a href="http://forum.world.st/The-Trunk-Morphic-mt-1390-mcz-tp5064331.html" target="_blank">http://forum.world.st/The-<wbr>Trunk-Morphic-mt-1390-mcz-<wbr>tp5064331.html</a></div><div><br></div><div>Best,</div><div>Marcel</div><div class="gmail-m_1103400450146512480mb_sig"></div><blockquote class="gmail-m_1103400450146512480history_container" type="cite" style="border-left-style:solid;border-width:1px;margin-top:20px;margin-left:0px;padding-left:10px"><span class="gmail-">
                        <p style="color:rgb(170,170,170);margin-top:10px">Am 25.01.2018 08:57:01 schrieb Marcel Taeumel <<a href="mailto:marcel.taeumel@hpi.de" target="_blank">marcel.taeumel@hpi.de</a>>:</p></span><div><div class="gmail-h5"><div id="gmail-m_1103400450146512480__MailbirdStyleContent" style="font-size:12pt;font-family:calibri;color:rgb(0,0,0)">
                                        
                                        
                                            
                                        
                                        
                                        Hi Eliot,<div><br></div><div>we should not do that. ;-) It is essential to try opening and drawing that debugger first before we flip ErrorRecursion back to false.</div><div><br></div><div>I will look into your scenario. You are right, this should work:</div><div><br></div><div><div style="font-family:tahoma,verdana;font-size:13px;line-height:19.5px">[1 halt] fork.</div><div style="font-family:tahoma,verdana;font-size:13px;line-height:19.5px">Processor yield.</div><div style="font-family:tahoma,verdana;font-size:13px;line-height:19.5px">2 halt.</div></div><div><br></div><div>Best,</div><div>Marcel</div><div class="gmail-m_1103400450146512480mb_sig"></div>
                                        
                                        <blockquote class="gmail-m_1103400450146512480history_container" type="cite" style="border-left-style:solid;border-width:1px;margin-top:20px;margin-left:0px;padding-left:10px;min-width:500px">
                        <p style="color:rgb(170,170,170);margin-top:10px">Am 25.01.2018 01:05:19 schrieb Eliot Miranda <<a href="mailto:eliot.miranda@gmail.com" target="_blank">eliot.miranda@gmail.com</a>>:</p>
<div dir="ltr">Bob,<div><br></div><div>    thank you!!  morphicOpenOn:context:label:<wbr>contents:fullView: is indeed the method in question. So if one moves the ErrorRecursion := false outside of the addDeferredUIMessage: block everything works.  i.e. now the code reads:</div><div><br></div><div><div><span class="gmail-m_1103400450146512480gmail-Apple-tab-span" style="white-space:pre-wrap">              </span>Project current addDeferredUIMessage:</div><div><span class="gmail-m_1103400450146512480gmail-Apple-tab-span" style="white-space:pre-wrap">                  </span>[ debugger := self new</div><div><span class="gmail-m_1103400450146512480gmail-Apple-tab-span" style="white-space:pre-wrap">                         </span>process: process</div><div><span class="gmail-m_1103400450146512480gmail-Apple-tab-span" style="white-space:pre-wrap">                               </span>controller: nil</div><div><span class="gmail-m_1103400450146512480gmail-Apple-tab-span" style="white-space:pre-wrap">                                </span>context: context.</div><div><span class="gmail-m_1103400450146512480gmail-Apple-tab-span" style="white-space:pre-wrap">                      </span>full</div><div><span class="gmail-m_1103400450146512480gmail-Apple-tab-span" style="white-space:pre-wrap">                           </span>ifTrue: [ debugger openFullNoSuspendLabel: title ]</div><div><span class="gmail-m_1103400450146512480gmail-Apple-tab-span" style="white-space:pre-wrap">                             </span>ifFalse:</div><div><span class="gmail-m_1103400450146512480gmail-Apple-tab-span" style="white-space:pre-wrap">                                       </span>[ debugger</div><div><span class="gmail-m_1103400450146512480gmail-Apple-tab-span" style="white-space:pre-wrap">                                             </span>openNotifierContents: contentsStringOrNil</div><div><span class="gmail-m_1103400450146512480gmail-Apple-tab-span" style="white-space:pre-wrap">                                              </span>label: title ].</div><div><span class="gmail-m_1103400450146512480gmail-Apple-tab-span" style="white-space:pre-wrap">                        </span>debugger errorWasInUIProcess: errorWasInUIProcess.</div><div><span class="gmail-m_1103400450146512480gmail-Apple-tab-span" style="white-space:pre-wrap">                     </span>"Try drawing the debugger tool at least once to avoid freeze."</div><div><span class="gmail-m_1103400450146512480gmail-Apple-tab-span" style="white-space:pre-wrap">                       </span>Project current world displayWorldSafely].</div><div><span class="gmail-m_1103400450146512480gmail-Apple-tab-span" style="white-space:pre-wrap">             </span>ErrorRecursion := false ].</div><div><br></div><div>and the old code doesn't work:</div><div><br></div><div><div><span class="gmail-m_1103400450146512480gmail-Apple-tab-span" style="white-space:pre-wrap">               </span>Project current addDeferredUIMessage:</div><div><span class="gmail-m_1103400450146512480gmail-Apple-tab-span" style="white-space:pre-wrap">                  </span>[ debugger := self new</div><div><span class="gmail-m_1103400450146512480gmail-Apple-tab-span" style="white-space:pre-wrap">                         </span>process: process</div><div><span class="gmail-m_1103400450146512480gmail-Apple-tab-span" style="white-space:pre-wrap">                               </span>controller: nil</div><div><span class="gmail-m_1103400450146512480gmail-Apple-tab-span" style="white-space:pre-wrap">                                </span>context: context.</div><div><span class="gmail-m_1103400450146512480gmail-Apple-tab-span" style="white-space:pre-wrap">                      </span>full</div><div><span class="gmail-m_1103400450146512480gmail-Apple-tab-span" style="white-space:pre-wrap">                           </span>ifTrue: [ debugger openFullNoSuspendLabel: title ]</div><div><span class="gmail-m_1103400450146512480gmail-Apple-tab-span" style="white-space:pre-wrap">                             </span>ifFalse:</div><div><span class="gmail-m_1103400450146512480gmail-Apple-tab-span" style="white-space:pre-wrap">                                       </span>[ debugger</div><div><span class="gmail-m_1103400450146512480gmail-Apple-tab-span" style="white-space:pre-wrap">                                             </span>openNotifierContents: contentsStringOrNil</div><div><span class="gmail-m_1103400450146512480gmail-Apple-tab-span" style="white-space:pre-wrap">                                              </span>label: title ].</div><div><span class="gmail-m_1103400450146512480gmail-Apple-tab-span" style="white-space:pre-wrap">                        </span>debugger errorWasInUIProcess: errorWasInUIProcess.</div><div><span class="gmail-m_1103400450146512480gmail-Apple-tab-span" style="white-space:pre-wrap">                     </span>"Try drawing the debugger tool at least once to avoid freeze."</div><div><span class="gmail-m_1103400450146512480gmail-Apple-tab-span" style="white-space:pre-wrap">                       </span>Project current world displayWorldSafely.</div><div><span class="gmail-m_1103400450146512480gmail-Apple-tab-span" style="white-space:pre-wrap">                      </span>ErrorRecursion := false ]].</div></div><div><br></div><div>So there question is, what are the tests for the ErrorGuard and ErrorRecursion?  I need to run these before committing the fix above.</div><div><br></div><div>Bob, way to go!  Thank you.</div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jan 24, 2018 at 3:52 PM, Bob Arning <span dir="ltr"><<a href="mailto:arning315@comcast.net" target="_blank">arning315@comcast.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex;min-width:500px">
  
    
  
  <div bgcolor="#FFFFFF">
    <p><span style="font-family:Georgia">I tried this in 5.1 and it worked</span></p>
    <p><span style="font-family:Georgia">Debugger class>><br>
      </span></p>
    <p><span style="font-family:Georgia">morphicOpenOn: process context: context
        label: title contents: contentsStringOrNil fullView: full<br>
            "Open a notifier in response to an error, halt, or notify. A
        notifier view just shows a short view of the sender stack and
        provides a menu that lets the user open a full debugger."<br>
        <br>
            | errorWasInUIProcess debugger |<br>
            ErrorRecursion ifTrue: [<br>
                "self assert: process == Project current uiProcess --
        DOCUMENTATION ONLY"<br>
                ErrorRecursion := false.<br>
                "^ Project current handleFatalDrawingError: title"].   
        <============commented this out<br>
        ...<br>
      </span><br>
    </p><div><div class="gmail-m_1103400450146512480gmail-h5">
    <br>
    <div class="gmail-m_1103400450146512480gmail-m_-5988897607938864499moz-cite-prefix">On 1/24/18 6:31 PM, Eliot Miranda
      wrote:<br>
    </div>
    <blockquote type="cite" style="min-width:500px">
      <div dir="ltr">Hi All,
        <div><br>
        </div>
        <div>    I'm comparing two close copies of a class in attempting
          a complex refactoring, comparing the original code with the
          close copy.  In doing this I need to open up two debuggers to
          step through the two computations simultaneously.  If I try it
          this way, where the two JITs break at a particular bytecode:</div>
        <div><br>
        </div>
        <div>
          <div>[:m :opts|</div>
          <div> [StackToRegisterMappingCogit cog: m options: opts] fork.</div>
          <div> Processor yield.</div>
          <div> AltStackToRegisterMappingCogi<wbr>t cog: m options: opts]</div>
          <div><span class="gmail-m_1103400450146512480gmail-m_-5988897607938864499gmail-Apple-tab-span" style="white-space:pre-wrap">  </span>value:
            TabbedPalette class>>#unload</div>
          <div><span class="gmail-m_1103400450146512480gmail-m_-5988897607938864499gmail-Apple-tab-span" style="white-space:pre-wrap">  </span>value:
            #(ObjectMemory Spur64BitCoMemoryManager</div>
          <div><span class="gmail-m_1103400450146512480gmail-m_-5988897607938864499gmail-Apple-tab-span" style="white-space:pre-wrap">                  </span>debugBytecodePointers
            #(59)</div>
          <div><span class="gmail-m_1103400450146512480gmail-m_-5988897607938864499gmail-Apple-tab-span" style="white-space:pre-wrap">                  </span>compilationTrace
            0).</div>
        </div>
        <div><br>
        </div>
        <div>I get an emergency evaluator :-(, and if I type restart I
          only ever get one debugger.  What's the right way to do this?</div>
        <div><br>
        </div>
        <div>To boil down the example I need this to work:</div>
        <div><br>
        </div>
        <div>    [1 halt] fork.</div>
        <div>    Processor yield.</div>
        <div>    2 halt</div>
        <div><br>
        </div>
        <div>i.e. I want to be able to get two debuggers, one open on 1
          halt, and the other on 2 halt.<br>
          <div class="gmail-m_1103400450146512480gmail-m_-5988897607938864499gmail_signature">
            <div dir="ltr">
              <div><span style="font-size:10pt;border-collapse:separate">
                  <div>_,,,^..^,,,_<br>
                  </div>
                  <div>best, Eliot</div>
                </span></div>
            </div>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="gmail-m_1103400450146512480gmail-m_-5988897607938864499mimeAttachmentHeader"></fieldset>
      <br>
      <pre></pre>
    </blockquote>
    <br>
  </div></div></div>

<br><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail-m_1103400450146512480gmail_signature"><div dir="ltr"><div><span style="font-size:10pt;border-collapse:separate"><div>_,,,^..^,,,_<br></div><div>best, Eliot</div></span></div></div></div>
</div></div></div>

                        </blockquote></div>
                        </div></div></blockquote>
                                        </div></div><br><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><span style="font-size:small;border-collapse:separate"><div>_,,,^..^,,,_<br></div><div>best, Eliot</div></span></div></div></div>
</div></div>