Hi Everybody, I'm measuring timing jitter on my Smalltalk program. Every 1/2 hour or so I get a divide by zero error. See the Smalltalk printout, the offending line, #117, and the 1 second timing jitter data below.
1) I don't think the (direct) cause of the divide by zero error is from line 117. 2) Could the 1000+ microSecond jump in deviation (red below) be due to garbage collection? 3) 3.2.91 running on a 6 year old Macbook Air is close (ignore 1000 uSec jump) to being suitable for high speed machine control. Frankly, I'm surprised! 4) Is there a way errors such as this on can be trapped? Just letting everyone know about the divide by zeo error. My program is just for fun if anybody wants a copy of it. Comments welcome! Gary Object: 1 error: The program attempted to divide a number by zero ZeroDivide(Exception)>>signal (ExcHandling.st:254) SmallInteger(Number)>>zeroDivide (SysExcept.st:1386) Fraction>>setNumerator:setDenominator: (Fraction.st:485) Fraction class>>numerator:denominator: (Fraction.st:66) Fraction>>- (Fraction.st:151) FloatD(Float)>>printOn:special: (Float.st:535) FloatD(Float)>>printOn: (Float.st:436) FloatD(Object)>>printString (Object.st:546) FloatD(Object)>>printNl (Object.st:582) optimized [] in RunStop>>init (polaris1a.st:117) [] in Process>>onBlock:at:suspend: (Process.st:394) BlockClosure>>on:do: (BlkClosure.st:196) [] in Process>>onBlock:at:suspend: (Process.st:395) BlockClosure>>ensure: (BlkClosure.st:271) [] in Process>>onBlock:at:suspend: (Process.st:373) [] in BlockClosure>>asContext: (BlkClosure.st:182) BlockContext class>>fromClosure:parent: (BlkContext.st:68) *Offending line, #117* oldTime := Time nanosecondClock . *Deviation from 1 Sec marker, microSeconds:* 32.7289 76.6629 58.759 20.789 66.858 20.0159 53.874 1423.52899999999 -189.252 -52.014 110.686 92.5799 26.289855149499 47.2049 62.557