| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
| |||
| |||
| 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. |
|
#2
| |||
| |||
| 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 |
![]() |
| Thread Tools | |
| Display Modes | |
In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.