[BUG][FIX] Long Delay crashes Morphic image

David T. Lewis lewis at mail.msen.com
Tue Feb 1 04:14:16 UTC 2005


If an attempt to schedule a Delay fails, cancel the Delay and schedule
and error notification (Morphic only). This corrects a problem in which
an invalid Delay results in a locked image when running in Morphic.

An invalid Delay can be created by specifying a delay duration that
overflows the size of a SmallInteger. For example, the following will
crash a Morphic image if this change set has not been applied:

  | bigDelay |
  bigDelay := Delay forMilliseconds: SmallInteger maxVal + 1.
  bigDelay inspect.
  [bigDelay wait.
    Transcript show: 'I have been waiting a long time for this'; cr] fork.
  (Delay forSeconds: 1) wait.
  Smalltalk garbageCollect

This change set corrects the system crash problem reported as #854 on
Mantis (Subject: [BUG][VM] long Delay schedules a deferred image crash).

It does not resolve the remaining problem that Delays of duration longer
than about 12 days cannot be scheduled on Squeak.

Dave

-------------- next part --------------
A non-text attachment was scrubbed...
Name: DelayCrashFix-dtl.cs.gz
Type: application/x-gunzip
Size: 1067 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20050131/f7a9ac4b/DelayCrashFix-dtl.cs.bin


More information about the Squeak-dev mailing list