Debugger hiccups

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
18 messages Options
Reply | Threaded
Open this post in threaded view
|

Debugger hiccups

Balázs Kósi-2
Hi,

Today I came across two nuisances in the debugger:

The first one is, that if you try to evaluate code in a debugger started from another debugger, you'll get an MNU: MessageAsTempNode>>beMethodArg.

The other one is a tad more dangerous, so don't try it in an image dear to you: If you try to debug one of the following expressions: "nil", "-1", "0", "1" and "2" your image hangs. After interrupting it you get infinite debuggers with the message: "subscript is out of bounds: 2". The stack shows just one line: MethodContext(Object)>>error:

I did not investigate any further yet.

Cheers, Balázs


Reply | Threaded
Open this post in threaded view
|

Re: Debugger hiccups

David T. Lewis
On Sat, Oct 04, 2014 at 04:30:35PM +0200, Bal??zs K??si wrote:

> Hi,
>
> Today I came across two nuisances in the debugger:
>
> The first one is, that if you try to evaluate code in a debugger started
> from another debugger, you'll get an MNU: MessageAsTempNode>>beMethodArg.
>
> The other one is a tad more dangerous, so don't try it in an image dear to
> you: If you try to debug one of the following expressions: "nil", "-1",
> "0", "1" and "2" your image hangs. After interrupting it you get infinite
> debuggers with the message: "subscript is out of bounds: 2". The stack
> shows just one line: MethodContext(Object)>>error:
>
> I did not investigate any further yet.
>
> Cheers, Bal??zs

The second issue appears to be an infinite recursion in the fallback
code for ContetPart>object:basicAt:

Here is part of the stack trace for an image stuck in this condition:

        65024980 ContextPart>object:basicAt:
        65024572 ContextPart>object:basicAt:
        65024164 ContextPart>object:basicAt:
        65023756 ContextPart>object:basicAt:
        65023348 ContextPart>object:basicAt:
        65006892 ContextPart>object:basicAt:
        65006800 ContextPart>object:instVarAt:
        65006708 ContextPart>pushReceiverVariable:
        65006616 InstructionStream>interpretNextV3ClosuresInstructionFor:
        65006524 EncoderForV3PlusClosures class>interpretNextInstructionFor:in:
        65006432 InstructionStream>interpretNextInstructionFor:
        65006340 ContextPart>step
        64823312 ContextPart>stepToSendOrReturn
        64823220 Process>stepToSendOrReturn
        64823128 BlockClosure>ensure:
        64823036 Process>evaluate:onBehalfOf:
        64822944 Process>stepToSendOrReturn
        64822852 Debugger>send
        64665472 TextEditor>debug:receiver:in:
        64665380 TextEditor>debugIt
        64665288 PluggableTextMorph>debugIt
        64665152 TextMorph>handleEdit:
        64664936 PluggableTextMorph>handleEdit:
        64664844 PluggableTextMorph>debugIt

Dave


Reply | Threaded
Open this post in threaded view
|

Re: Debugger hiccups

Chris Muller-3
In reply to this post by Balázs Kósi-2
On Sat, Oct 4, 2014 at 9:30 AM, Balázs Kósi <[hidden email]> wrote:
> Hi,
>
> Today I came across two nuisances in the debugger:
>
> The first one is, that if you try to evaluate code in a debugger started
> from another debugger, you'll get an MNU: MessageAsTempNode>>beMethodArg.

That's strange, I do that a lot and it works fine for me.

> The other one is a tad more dangerous, so don't try it in an image dear to
> you: If you try to debug one of the following expressions: "nil", "-1", "0",
> "1" and "2" your image hangs. After interrupting it you get infinite
> debuggers with the message: "subscript is out of bounds: 2". The stack shows
> just one line: MethodContext(Object)>>error:
>
> I did not investigate any further yet.
>
> Cheers, Balázs
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Debugger hiccups

Balázs Kósi-2


On Mon, Oct 6, 2014 at 7:48 PM, Chris Muller <[hidden email]> wrote:
On Sat, Oct 4, 2014 at 9:30 AM, Balázs Kósi <[hidden email]> wrote:
> Hi,
 
>
> Today I came across two nuisances in the debugger:
>
> The first one is, that if you try to evaluate code in a debugger started
> from another debugger, you'll get an MNU: MessageAsTempNode>>beMethodArg.

That's strange, I do that a lot and it works fine for me.

It's rather easy to reproduce:
 1) debug an expression. eg. 3 + 4
 2) from the debugger start another debugger from the code pane or from the pane on the bottom right (with the local variables in scope), but not from the bottom left pane (with the instance in scope as self)
 3) try to evaluate any code in the code pane or in the bottom right pane, and you get a debugger.

Cheers, Balazs


Reply | Threaded
Open this post in threaded view
|

Re: Debugger hiccups

Chris Muller-3
I just tried those exact instructions in trunk image and it worked.  I
tried the expression, 'hello' asUppercase in both the code pane and
the lower-right pane, selected "debug" from teh context menu.  It
worked for me.

On Mon, Oct 6, 2014 at 1:21 PM, Balázs Kósi <[hidden email]> wrote:

>
>
> On Mon, Oct 6, 2014 at 7:48 PM, Chris Muller <[hidden email]> wrote:
>>
>> On Sat, Oct 4, 2014 at 9:30 AM, Balázs Kósi <[hidden email]> wrote:
>> > Hi,
>>
>> >
>> > Today I came across two nuisances in the debugger:
>> >
>> > The first one is, that if you try to evaluate code in a debugger started
>> > from another debugger, you'll get an MNU:
>> > MessageAsTempNode>>beMethodArg.
>>
>> That's strange, I do that a lot and it works fine for me.
>>
> It's rather easy to reproduce:
>  1) debug an expression. eg. 3 + 4
>  2) from the debugger start another debugger from the code pane or from the
> pane on the bottom right (with the local variables in scope), but not from
> the bottom left pane (with the instance in scope as self)
>  3) try to evaluate any code in the code pane or in the bottom right pane,
> and you get a debugger.
>
> Cheers, Balazs
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Debugger hiccups

Eliot Miranda-2
Hi Cris,

On Mon, Oct 6, 2014 at 11:37 AM, Chris Muller <[hidden email]> wrote:
I just tried those exact instructions in trunk image and it worked.  I
tried the expression, 'hello' asUppercase in both the code pane and
the lower-right pane, selected "debug" from teh context menu.  It
worked for me.

you need to go one step further.

1. debug 3.4.
2. in code pane of debugger #1 debug 4+5
3. in code pane of debugger #2 debug 5+6, boom.
 

On Mon, Oct 6, 2014 at 1:21 PM, Balázs Kósi <[hidden email]> wrote:
>
>
> On Mon, Oct 6, 2014 at 7:48 PM, Chris Muller <[hidden email]> wrote:
>>
>> On Sat, Oct 4, 2014 at 9:30 AM, Balázs Kósi <[hidden email]> wrote:
>> > Hi,
>>
>> >
>> > Today I came across two nuisances in the debugger:
>> >
>> > The first one is, that if you try to evaluate code in a debugger started
>> > from another debugger, you'll get an MNU:
>> > MessageAsTempNode>>beMethodArg.
>>
>> That's strange, I do that a lot and it works fine for me.
>>
> It's rather easy to reproduce:
>  1) debug an expression. eg. 3 + 4
>  2) from the debugger start another debugger from the code pane or from the
> pane on the bottom right (with the local variables in scope), but not from
> the bottom left pane (with the instance in scope as self)
>  3) try to evaluate any code in the code pane or in the bottom right pane,
> and you get a debugger.
>
> Cheers, Balazs
>
>
>




--
best,
Eliot


Reply | Threaded
Open this post in threaded view
|

Re: Debugger hiccups

Eliot Miranda-2
In reply to this post by Chris Muller-3
Hi Chris,

   oops...

On Mon, Oct 6, 2014 at 11:37 AM, Chris Muller <[hidden email]> wrote:
I just tried those exact instructions in trunk image and it worked.  I
tried the expression, 'hello' asUppercase in both the code pane and
the lower-right pane, selected "debug" from teh context menu.  It
worked for me.



you need to go one step further.

1. debug 3+4
2. in code pane of debugger #1 debug 4+5
3. in code pane of debugger #2 debug 5+6, boom.
 

On Mon, Oct 6, 2014 at 1:21 PM, Balázs Kósi <[hidden email]> wrote:
>
>
> On Mon, Oct 6, 2014 at 7:48 PM, Chris Muller <[hidden email]> wrote:
>>
>> On Sat, Oct 4, 2014 at 9:30 AM, Balázs Kósi <[hidden email]> wrote:
>> > Hi,
>>
>> >
>> > Today I came across two nuisances in the debugger:
>> >
>> > The first one is, that if you try to evaluate code in a debugger started
>> > from another debugger, you'll get an MNU:
>> > MessageAsTempNode>>beMethodArg.
>>
>> That's strange, I do that a lot and it works fine for me.
>>
> It's rather easy to reproduce:
>  1) debug an expression. eg. 3 + 4
>  2) from the debugger start another debugger from the code pane or from the
> pane on the bottom right (with the local variables in scope), but not from
> the bottom left pane (with the instance in scope as self)
>  3) try to evaluate any code in the code pane or in the bottom right pane,
> and you get a debugger.
>
> Cheers, Balazs
>
>
>




--
best,
Eliot


Reply | Threaded
Open this post in threaded view
|

Re: Debugger hiccups

Chris Muller-4
In reply to this post by Eliot Miranda-2
Ah, okay, yes.  Boom.

On Mon, Oct 6, 2014 at 1:38 PM, Eliot Miranda <[hidden email]> wrote:

> Hi Cris,
>
> On Mon, Oct 6, 2014 at 11:37 AM, Chris Muller <[hidden email]> wrote:
>>
>> I just tried those exact instructions in trunk image and it worked.  I
>> tried the expression, 'hello' asUppercase in both the code pane and
>> the lower-right pane, selected "debug" from teh context menu.  It
>> worked for me.
>
>
> you need to go one step further.
>
> 1. debug 3.4.
> 2. in code pane of debugger #1 debug 4+5
> 3. in code pane of debugger #2 debug 5+6, boom.
>
>>
>>
>> On Mon, Oct 6, 2014 at 1:21 PM, Balázs Kósi <[hidden email]> wrote:
>> >
>> >
>> > On Mon, Oct 6, 2014 at 7:48 PM, Chris Muller <[hidden email]>
>> > wrote:
>> >>
>> >> On Sat, Oct 4, 2014 at 9:30 AM, Balázs Kósi <[hidden email]>
>> >> wrote:
>> >> > Hi,
>> >>
>> >> >
>> >> > Today I came across two nuisances in the debugger:
>> >> >
>> >> > The first one is, that if you try to evaluate code in a debugger
>> >> > started
>> >> > from another debugger, you'll get an MNU:
>> >> > MessageAsTempNode>>beMethodArg.
>> >>
>> >> That's strange, I do that a lot and it works fine for me.
>> >>
>> > It's rather easy to reproduce:
>> >  1) debug an expression. eg. 3 + 4
>> >  2) from the debugger start another debugger from the code pane or from
>> > the
>> > pane on the bottom right (with the local variables in scope), but not
>> > from
>> > the bottom left pane (with the instance in scope as self)
>> >  3) try to evaluate any code in the code pane or in the bottom right
>> > pane,
>> > and you get a debugger.
>> >
>> > Cheers, Balazs
>> >
>> >
>> >
>>
>
>
>
> --
> best,
> Eliot

Reply | Threaded
Open this post in threaded view
|

Re: Debugger hiccups

Eliot Miranda-2
In reply to this post by Balázs Kósi-2


On Sat, Oct 4, 2014 at 7:30 AM, Balázs Kósi <[hidden email]> wrote:
Hi,

Today I came across two nuisances in the debugger:

The first one is, that if you try to evaluate code in a debugger started from another debugger, you'll get an MNU: MessageAsTempNode>>beMethodArg.

The other one is a tad more dangerous, so don't try it in an image dear to you: If you try to debug one of the following expressions: "nil", "-1", "0", "1" and "2" your image hangs. After interrupting it you get infinite debuggers with the message: "subscript is out of bounds: 2". The stack shows just one line: MethodContext(Object)>>error:

I did not investigate any further yet.

Cheers, Balázs

both issues fixed. 

-- 
best,
Eliot


Reply | Threaded
Open this post in threaded view
|

Re: Debugger hiccups

Balázs Kósi-2
Thanks Eliot for fixing this!

I've updated my image and now anything I try to debug results in the popup: 'Nothing to debug; expression is optimized', so I removed the code creating the popup, and can confirm that the first issue is gone.

Balazs


Reply | Threaded
Open this post in threaded view
|

Re: Debugger hiccups

Eliot Miranda-2


On Mon, Oct 6, 2014 at 2:43 PM, Balázs Kósi <[hidden email]> wrote:
Thanks Eliot for fixing this!

I've updated my image and now anything I try to debug results in the popup: 'Nothing to debug; expression is optimized', so I removed the code creating the popup, and can confirm that the first issue is gone.

Doh!  I forgot to test that debug it still works, and of course broke it.  OK, there's a new fix in place now.  I do apologize.
 

Balazs






--
best,
Eliot


Reply | Threaded
Open this post in threaded view
|

Re: Debugger hiccups

Eliot Miranda-2


On Mon, Oct 6, 2014 at 3:43 PM, Eliot Miranda <[hidden email]> wrote:


On Mon, Oct 6, 2014 at 2:43 PM, Balázs Kósi <[hidden email]> wrote:
Thanks Eliot for fixing this!

I've updated my image and now anything I try to debug results in the popup: 'Nothing to debug; expression is optimized', so I removed the code creating the popup, and can confirm that the first issue is gone.

Doh!  I forgot to test that debug it still works, and of course broke it.  OK, there's a new fix in place now.  I do apologize.


Ugh, I'm having a bad day.  I just committed something that exhibited the old symptom.  Sorry.  Give me a few to get this right.
 
 

Balazs






--
best,
Eliot



--
best,
Eliot


Reply | Threaded
Open this post in threaded view
|

Re: Debugger hiccups

David T. Lewis
On Mon, Oct 06, 2014 at 03:44:52PM -0700, Eliot Miranda wrote:

> On Mon, Oct 6, 2014 at 3:43 PM, Eliot Miranda <[hidden email]> wrote:
> >
> > On Mon, Oct 6, 2014 at 2:43 PM, Bal??zs K??si <[hidden email]> wrote:
> >
> >> Thanks Eliot for fixing this!
> >>
> >> I've updated my image and now anything I try to debug results in the
> >> popup: 'Nothing to debug; expression is optimized', so I removed the code
> >> creating the popup, and can confirm that the first issue is gone.
> >
> > Doh!  I forgot to test that debug it still works, and of course broke it.
> > OK, there's a new fix in place now.  I do apologize.
>
> Ugh, I'm having a bad day.  I just committed something that exhibited the
> old symptom.  Sorry.  Give me a few to get this right.

Eliot,

You on a bad day would be way better than me on a good day, and I'm probably
not the only one who would say that. Thanks very much for addressing these
issues, and thanks for keeping the MVC side updated too :-)

Dave


Reply | Threaded
Open this post in threaded view
|

Re: Debugger hiccups

Eliot Miranda-2


On Mon, Oct 6, 2014 at 3:58 PM, David T. Lewis <[hidden email]> wrote:
On Mon, Oct 06, 2014 at 03:44:52PM -0700, Eliot Miranda wrote:
> On Mon, Oct 6, 2014 at 3:43 PM, Eliot Miranda <[hidden email]> wrote:
> >
> > On Mon, Oct 6, 2014 at 2:43 PM, Bal??zs K??si <[hidden email]> wrote:
> >
> >> Thanks Eliot for fixing this!
> >>
> >> I've updated my image and now anything I try to debug results in the
> >> popup: 'Nothing to debug; expression is optimized', so I removed the code
> >> creating the popup, and can confirm that the first issue is gone.
> >
> > Doh!  I forgot to test that debug it still works, and of course broke it.
> > OK, there's a new fix in place now.  I do apologize.
>
> Ugh, I'm having a bad day.  I just committed something that exhibited the
> old symptom.  Sorry.  Give me a few to get this right.

Eliot,

You on a bad day would be way better than me on a good day, and I'm probably
not the only one who would say that. Thanks very much for addressing these
issues, and thanks for keeping the MVC side updated too :-)

thanks for the kind words.  I wish I was that good ;-).  But fingers crossed there's a proper fix there now.  If it's easy please test the MVC changes; TIA.
-- 
best,
Eliot


Reply | Threaded
Open this post in threaded view
|

Re: Debugger hiccups

David T. Lewis
On Mon, Oct 06, 2014 at 04:47:14PM -0700, Eliot Miranda wrote:

> On Mon, Oct 6, 2014 at 3:58 PM, David T. Lewis <[hidden email]> wrote:
>
> > On Mon, Oct 06, 2014 at 03:44:52PM -0700, Eliot Miranda wrote:
> > > On Mon, Oct 6, 2014 at 3:43 PM, Eliot Miranda <[hidden email]>
> > wrote:
> > > >
> > > > On Mon, Oct 6, 2014 at 2:43 PM, Bal??zs K??si <[hidden email]>
> > wrote:
> > > >
> > > >> Thanks Eliot for fixing this!
> > > >>
> > > >> I've updated my image and now anything I try to debug results in the
> > > >> popup: 'Nothing to debug; expression is optimized', so I removed the
> > code
> > > >> creating the popup, and can confirm that the first issue is gone.
> > > >
> > > > Doh!  I forgot to test that debug it still works, and of course broke
> > it.
> > > > OK, there's a new fix in place now.  I do apologize.
> > >
> > > Ugh, I'm having a bad day.  I just committed something that exhibited the
> > > old symptom.  Sorry.  Give me a few to get this right.
> >
> > Eliot,
> >
> > You on a bad day would be way better than me on a good day, and I'm
> > probably
> > not the only one who would say that. Thanks very much for addressing these
> > issues, and thanks for keeping the MVC side updated too :-)
> >
>
> thanks for the kind words.  I wish I was that good ;-).  But fingers
> crossed there's a proper fix there now.  If it's easy please test the MVC
> changes; TIA.

There is some kind of glitch with "debug it" in MVC, although I don't know
if it is related to the recent updates. I'll try to figure out the issue
and give some feedback, though possibly not tonight.

Dave

Reply | Threaded
Open this post in threaded view
|

Re: Debugger hiccups

Florin Mateoc-4
In reply to this post by Eliot Miranda-2
Hi Eliot,

Seeing that the commit is called "fix debugging of optimized expressions", I remembered  that I had recently stumbled upon a debugger annoyance related to an optimized expression.
I checked and unfortunately it is still there, so if you fell inspired :)

One easy way to see it is to debug CompiledMethod>>#= , comparing a compiled method to itself.
In the to:do: loop, at every iteration, the debugger highlights the early exit "^false", even though it does not actually execute it.

Cheers,
Florin



 
On 10/6/2014 7:47 PM, Eliot Miranda wrote:


On Mon, Oct 6, 2014 at 3:58 PM, David T. Lewis <[hidden email]> wrote:
On Mon, Oct 06, 2014 at 03:44:52PM -0700, Eliot Miranda wrote:
> On Mon, Oct 6, 2014 at 3:43 PM, Eliot Miranda <[hidden email]> wrote:
> >
> > On Mon, Oct 6, 2014 at 2:43 PM, Bal??zs K??si <[hidden email]> wrote:
> >
> >> Thanks Eliot for fixing this!
> >>
> >> I've updated my image and now anything I try to debug results in the
> >> popup: 'Nothing to debug; expression is optimized', so I removed the code
> >> creating the popup, and can confirm that the first issue is gone.
> >
> > Doh!  I forgot to test that debug it still works, and of course broke it.
> > OK, there's a new fix in place now.  I do apologize.
>
> Ugh, I'm having a bad day.  I just committed something that exhibited the
> old symptom.  Sorry.  Give me a few to get this right.

Eliot,

You on a bad day would be way better than me on a good day, and I'm probably
not the only one who would say that. Thanks very much for addressing these
issues, and thanks for keeping the MVC side updated too :-)

thanks for the kind words.  I wish I was that good ;-).  But fingers crossed there's a proper fix there now.  If it's easy please test the MVC changes; TIA.
-- 
best,
Eliot



    



Reply | Threaded
Open this post in threaded view
|

Re: Debugger hiccups

Balázs Kósi-2
Thanks Eliot for fixing this, and for all your effort making Squeak the wonderful place it is!

Balazs


Reply | Threaded
Open this post in threaded view
|

Re: Debugger hiccups

Stéphane Rollandin
In reply to this post by David T. Lewis
> Eliot,
>
> You on a bad day would be way better than me on a good day, and I'm probably
> not the only one who would say that.

Indeed.

Stef