[BUG][FIX] Long Delay crashes Morphic image ( [cd][er][su][et][sm] Recommend including )

David T. Lewis lewis at mail.msen.com
Sun Feb 6 18:07:15 UTC 2005


On Sun, Feb 06, 2005 at 12:16:20PM -0500, tomkoenig at mindspring.com wrote:
> 
> Tested and inspected in 3.9a #6550.  W/o fix, manual test provided locks
> up the image as described; w/ fix image is not locked.  Changes one
> method and adds another.  Existing DelayTest still passes. Recommend
> including.

Hi Tom,
Thanks for reviewing this.

> Any bug/fix that freezes the image deserves a sunit test.  However, I
> was unable to convert David's manual test to a well behaved test.  Any
> pointers welcome. Here's as far as I got:
> DelayTest>>testDelayFailure
> 	 | bigDelay |
> 	  self should:
> 		 	[  bigDelay := Delay forMilliseconds: SmallInteger maxVal + 1.
> 	  		   [bigDelay wait] fork.
> 	  		   (Delay forSeconds: 1) wait.
> 			   Smalltalk garbageCollect
> 			]
> 		   raise: Error.

I could not think of a way to make a unit test, either. The actual
failure occurs in the context of a process other than that of the sUnit
test, and in this case it happens at some seemingly random time triggered
by the garbage collection. This being Smalltalk I'm sure there is some
way to do it (change the default error handler, etc), but I couldn't
think of anything simple.

Dave




More information about the Squeak-dev mailing list