Inspector goes into infinite loop

This is a discussion on Inspector goes into infinite loop within the Smalltalk forums in Programming Languages category; I have meet this bug when I demonstrated Smalltalk agile magic to my numb C++ programmer friends ;-) So, in the fresh Comminity Edition image try to Ctrl-D this in Workspace: Object allInstances. You'll see something like this: #(an Object an Object an Object an Object an Object an Object). If you try to inspect this array you will inspect an infinite loop of the Inspector Second object of this array causes this behavior. I.e. Object allInstances second <Ctrl-I> will crash Inspector too. This object used in RetryCookie class variable in the ExceptionHandlerAbstract class. Other Objects instances inspects successfully. I ...

Go Back   Application Development Forum > Programming Languages > Smalltalk

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 08-01-2008, 12:28 AM
alex_wh@mail.ru
Guest
 
Default Inspector goes into infinite loop

I have meet this bug when I demonstrated Smalltalk agile magic to my
numb C++ programmer friends ;-)

So, in the fresh Comminity Edition image try to Ctrl-D this in
Workspace:
Object allInstances.
You'll see something like this: #(an Object an Object an Object an
Object an Object an Object). If you try to inspect this array you will
inspect an infinite loop of the Inspector
Second object of this array causes this behavior.
I.e. Object allInstances second <Ctrl-I> will crash Inspector too.

This object used in RetryCookie class variable in the
ExceptionHandlerAbstract class.

Other Objects instances inspects successfully. I thing this is a bug
of the Inspector.
Reply With Quote
  #2  
Old 08-01-2008, 08:55 AM
John Brant
Guest
 
Default Re: Inspector goes into infinite loop

alex_wh@mail.ru wrote:

> This object used in RetryCookie class variable in the
> ExceptionHandlerAbstract class.
>
> Other Objects instances inspects successfully. I thing this is a bug
> of the Inspector.


I wouldn't call it a bug in the inspector. For example, try the
following (evaluate in ExceptionHandlerAbstract class):
[RetryCookie] on: Error do: [:ex | ]
You'll get an infinite loop without the inspector. The problem is that
the exception handling code uses the RetryCookie object to determine if
it should retry evaluating the block. For example, if you have code like:
| i |
i := 0.
[10 / i] on: Error do: [:ex | i := i + 1. ex retry]
When the #retry is executed, it returns the RetryCookie back to the
exception handler so that the exception handler knows to retry the [10 /
i] block again. Therefore, if you return the RetryCookie as the value of
the block, you'll cause the exception handler to keep retrying the block.


John Brant
Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 11:34 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.