[squeak-dev] Re: MVC debugging

David T. Lewis lewis at mail.msen.com
Fri Sep 10 11:48:04 UTC 2010


On Thu, Sep 09, 2010 at 11:51:32PM -0400, Florin Mateoc wrote:
>  On 9/9/2010 9:11 PM, David T. Lewis wrote:
> > On Wed, Sep 08, 2010 at 02:49:21AM -0400, Florin Mateoc wrote:
> >>  On 9/8/2010 1:54 AM, Andreas Raab wrote:
> >>> On 9/7/2010 7:57 PM, David T. Lewis wrote:
> >>>> I can't reproduce this. Are you able to get a debugger to open under
> >>>> MVC at this point?
> >>> Yes. I would have posted this earlier but I had an unexpected dinner and don't feel quite capable of doing this now
> >>> (hick!).
> >>>
> >>>> Specifically, I changed Debugger class>>openOn:context:label:contents:fullView:
> >>>> to call #searchForActiveControllerNoTerminate, where #searchForActiveControllerNoTerminate
> >>>> is a copy of #searchForActiveController with the #terminateActive removed.
> >>>> I'm not seeing any difference in behavior, so I must be missing a step
> >>>> in the recipe.
> >>> All right, I'm attaching the changes I have so far unreviewed. With these changes I've been able to debug just fine
> >>> except from the case of handling a user interrupt which doesn't quite work yet. If you want to try this out, give it a
> >>> shot, if not, I'll try to make headway tomorrow night. Right now I need some sleep :-)
> >>>
> >>> Cheers,
> >>>   - Andreas
> >>>
> >>>
> >>>
> >> I also did a little debugging, and I now think that the two main issues are:
> >> 1 the code to open the debugger is inside WorldState addDeferredUiMessage: [], even for MVC, which will probably never
> >> get executed
> >> 2 MVCTooBuilder was supposed to openNoTerminate (not open, which terminates the previous UI process) when called from
> >> the debugger code
> >
> > With regards to #2 (MVCToolBuilder should use #openNoTerminate), aha! You have
> > added the #open1:label: methods that call #openNoTerminate in the case of MVC.
> > The #openNoTerminate method has been in the image since at least 1997, but it's
> > unreferenced in Squeak now. In Squeak 3.8 and earlier it was called by several
> > methods, including Debugger>>openFullNoSuspendLabel:.
> >
> > This does seem to be something that went missing due to some incomplete MVC
> > ToolBuilder implementation (no surprise, but I think you are the first person
> > to correctly spot it).
> >
> > The #open1:label: methods in your change set implement the calls to #openNoTerminate,
> > although I think it might be cleaner to add ToolBuilder>>open:label:terminateActive:
> > as this avoids the need to provide Morphic or other ToolBuilder implementations.
> > I put an implementation of this for review in the inbox (ToolBuilder-Kernel-dtl.37
> > and ToolBuilder-MVC-dtl.21).
> >
> > Andreas, when you get a chance can you have a look at these in the inbox and say
> > if they should be included in ToolBuilder? Thanks.
> >
> > Dave
> >
> >
> 
> I think that your changes are pretty non-controversial, certainly open1... is not a good selector :)
> 
> But I would have hoped that the community would play a little with these changes before they get cleaned up and
> integrated (Hopefully that's what Andreas is doing ;) )
> There are many possible scenarios (multiple projects, morphic and mvc combinations, switching back and forth (with the
> debugger up) - I did get some walkback when switching back to morphic but did not investigate - , hitting errors during
> debugging, debugging with no windows (screen only) versus with windows, exceptions from ui and from non-ui).

Well, we still have some work to do to get ControlManager>>interruptName:preemptedProcess:
working right. Background is at http://bugs.squeak.org/view.php?id=1041
but the basic idea is that all four of the following should be interruptable:

   "[true] whileTrue"
   "[[true] whileTrue] forkAt: Processor userSchedulingPriority + 1"
   "Smalltalk createStackOverflow"
   "[Smalltalk createStackOverflow] forkAt: Processor userSchedulingPriority + 1"

I spent some time trying to get this working last night, but have not yet
come up with a solution. The basic idea is if the low space interrupt watcher
process has called #interruptName:preemptedProcess: passing it theInterruptedProcess,
then we want the debugger to open on theInterruptedProcess rather than on
activeControllerProcess. This is a bit tricky to debug for obvious reasons ;)

Dave

> 
> I also noticed a different mvc bug. The inspector has an explore menu option in mvc, but if you click on it, it invokes
> morphic code - I don't know if the explorer is morphic-only and the menu should just be removed or if it's a different
> issue. Maybe there are some other such cleanup opportunities
> 
> Florin



More information about the Squeak-dev mailing list