[squeak-dev] Exception handling bug; NameLookupFailure>defaultAction

tim Rowledge tim at rowledge.org
Tue Jan 1 20:14:14 UTC 2019

> On 2018-12-31, at 9:28 PM, Frank Shearar <frank.shearar at gmail.com> wrote:
> https://tech.labs.oliverwyman.com/blog/2011/01/04/try-again-with-exceptions/
> described the fun I had with that method nearly exactly 8 years ago!

An alarmingly familiar feeling. It's almost as if bugs never actually get solved. Weirdest one I can recall is when working for Interval Research I had to fix some Squeak VM thing to do with file handling; it seemed ever so familiar and I dug out notebooks and discovered that exactly 10 years (to the week) before I had been fixing the same problem in the same primitive but in a totally different VM.

Just for fun and masochism, I tried another couple of tests this morning. If you add the UIUC not-site with
	| aa | 
	self flag: #ViolateNonReferenceToOtherClasses.
	aa := ServerDirectory new.
	aa server: 'st.cs.uiuc.edu'.    "host"
	aa user: 'anonymous'.
	aa password: 'yourEmail at school.edu'.
	aa directory: '/Smalltalk/Squeak/Goodies'.
	aa url: ''.    "<- this is optional.  Only used when *writing* update files."
	ServerDirectory addServer: aa named: 'UIUCArchive'.  "<- known by this name in Squeak"
and then open a filelist & select the UIUCArchive directory, 'give up' opens a notifier, which looks more like it. 

Except... try debugging by clicking on a item in the stack listing or the 'debug' button - it's back to the never ending loop. That was a bit of a surprise. Even more of a surprise was that somehow after going around a few times it crashed the VM with no log and even more surprisingly restarting the image to attempt replication went back to seeming to work 'properly' ie opening a debugger.

Clearly what ought to happen is a dNU in Exception>retry because of the unset handlerContext. I *think* a possible solution would be to set the handlerContext to 'thisContext' in UndefinedObject>handleSignal: and it *seems* to work for me so far. This is definitely *not* something I'm going to stick in trunk without serious input.
UndefinedObject>handleSignal: exception
	"When no more handler (on:do:) context left in sender chain this gets called.  Return from signal with default action."
	exception privHandlerContext: thisContext.
	^ exception resumeUnchecked: exception defaultAction

tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
How many of you believe in telekinesis? Raise my hands....

More information about the Squeak-dev mailing list