Crash trying to open Debugger

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

Crash trying to open Debugger

Bill Dargel
[Warning - don't try this in an image without saving first]
To crash your 5.1.4 image, set the Debugger preferences for
"showWalkbacks" to false. And then evaluate the following:

    (ResourceIdentifier class: Presenter name: 'Default view')
loadWithContext: DeafObject current.

Looking in the errors log file we see that it caused the following
exception:
    Unhandled exception - an InvalidExternalCall('Invalid arg 9: Cannot
coerce a DeafObject to handle')

But in trying to open the debugger it generates:
    Unhandled exception - an Error('Primitive
View>>primHookWindowCreate: failed (1)')

Which tries to open a debugger, which causes another failure, etc.,
etc., etc. :-(

Yeah, yeah, I know. I shouldn't be trying to load a resource into a
DeafObject, but it really wasn't that hard to get into that situation
(accidentally doing some updates to a window that had been closed). It
sure would be nice if the image didn't crash as a result.

I find it interesting that by showing the walkback first, that there's
some sort of separation that insulates the debugger that subsequently
opens from having a problem. But while writing and running tests, it's
really nice to have the shortcut of going directly into the debugger.

Any ideas for a fix?

-Bill

-------------------------------------------
Bill Dargel            [hidden email]
Shoshana Technologies
100 West Joy Road, Ann Arbor, MI 48105  USA


Reply | Threaded
Open this post in threaded view
|

Re: Crash trying to open Debugger

Blair McGlashan
"Bill Dargel" <[hidden email]> wrote in message
news:[hidden email]...

> [Warning - don't try this in an image without saving first]
> To crash your 5.1.4 image, set the Debugger preferences for
> "showWalkbacks" to false. And then evaluate the following:
>
>     (ResourceIdentifier class: Presenter name: 'Default view')
> loadWithContext: DeafObject current.
>
> Looking in the errors log file we see that it caused the following
> exception:
>     Unhandled exception - an InvalidExternalCall('Invalid arg 9: Cannot
> coerce a DeafObject to handle')
>
> But in trying to open the debugger it generates:
>     Unhandled exception - an Error('Primitive
> View>>primHookWindowCreate: failed (1)')
>
> Which tries to open a debugger, which causes another failure, etc.,
> etc., etc. :-(
>
> Yeah, yeah, I know. I shouldn't be trying to load a resource into a
> DeafObject, but it really wasn't that hard to get into that situation
> (accidentally doing some updates to a window that had been closed). It
> sure would be nice if the image didn't crash as a result.
>
> I find it interesting that by showing the walkback first, that there's
> some sort of separation that insulates the debugger that subsequently
> opens from having a problem. But while writing and running tests, it's
> really nice to have the shortcut of going directly into the debugger.
>
> Any ideas for a fix?

Yes:

1) Create a new subclass of ShellView, call it DebuggerShell.
2) Drag & drop (copy) the #primHookWindowCreate: method from WalkbackDialog
into DebuggerShell.
3) Edit the 'Default view' (or the 'Classic view' if you use it) of the
Debugger using the ViewComposer, and mutate the shell into a DebuggerShell.

Now try your test expression. Works for me (although I would still recommend
against running with #showWalkbacks=false).

Regards

Blair


Reply | Threaded
Open this post in threaded view
|

Re: Crash trying to open Debugger

Bill Dargel
Blair McGlashan wrote:
> 1) Create a new subclass of ShellView, call it DebuggerShell.
> 2) Drag & drop (copy) the #primHookWindowCreate: method from WalkbackDialog
> into DebuggerShell.
> 3) Edit the 'Default view' (or the 'Classic view' if you use it) of the
> Debugger using the ViewComposer, and mutate the shell into a DebuggerShell.

Thanks Blair.

This change seems to be just what was needed.

BTW, I scripted the mutate so that I could incorporate it into the
automatic build of my working image:

| vc |
vc := (ViewComposer show: 'Default view')
        openOn: (ResourceIdentifier class: Debugger name: 'Default view');
        yourself.
vc mutateTo: DebuggerShellView.
vc fileSave.
vc exit.

>
> Now try your test expression. Works for me (although I would still recommend
> against running with #showWalkbacks=false).

Hmm. Care to elaborate on your recommendation of showing the walkbacks?

Thanks,
-Bill

-------------------------------------------
Bill Dargel            [hidden email]
Shoshana Technologies
100 West Joy Road, Ann Arbor, MI 48105  USA


Reply | Threaded
Open this post in threaded view
|

Re: Crash trying to open Debugger

Blair McGlashan
"Bill Dargel" <[hidden email]> wrote in message
news:[hidden email]...
> Blair McGlashan wrote:
>> (... I would still recommend
> > against running with #showWalkbacks=false).
>
> Hmm. Care to elaborate on your recommendation of showing the walkbacks?
>

http://groups.google.com/groups?hl=en&lr=lang_en&ie=UTF-8&oe=UTF-8&selm=s0uT5.7929%24ea7.156595%40news2-win.server.ntlworld.com

(or search Google groups for 'self halt in queryCommand')

Regards

Blair