SYSTEM WARNING: Creating default object from empty value

SYSTEM WARNING: Creating default object from empty value

Mantis - Squeak
Viewing Issue Advanced Details
7036 ToDo major always 05-09-08 05:36 05-26-08 18:35
closed 3.10  
none 3.10  
0007036: Issue fix for #6805 "Time now return fraction not integer" in 3.10.1
Issue fix for 0006805 "Time now return fraction not integer" in 3.10.1
related to 0006805closed KenCausey Time now seconds returns a fraction. 
related to 0007045closed KenCausey RenderBugz tests revised to avoid extraneous timing issues. 
related to 0000474closed KenCausey [BUG][FIX] accurateDateAndTimeNow-brp 
 MillisecondClockDurationSeconds-M7036-klc.1.cs.gz [^] (7,167 bytes) 05-12-08 20:33
 subsecondClockAndSecondsAsInteger-M7036-klc.1.cs.gz [^] (877 bytes) 05-18-08 20:09

05-09-08 06:14   
This is just one manefestation of the fact that the new code for Time now, in fix 000474 was overwritten indescribinately by fix 7156. We are lucky that anything works
05-09-08 06:34   
Relevant stuff: [^]


05-09-08 06:36   
Keith indicates that maybe 0006805 is not the appropriate way to fix this. Maybe tomorrow I'll be able to add some real detail to this report based on that.
05-09-08 06:41   
Note to self: Chonology is now a sub-category of Kernel, move all Chronology issues to Kernel and delete Chronology category.
05-09-08 21:01   
Done: All existing issues reported under the Chronology category have been recategorized as Kernel and the Chronology category has been deleted. Now on to the actual issue at hand...
05-10-08 00:40   
Hi Keith, Hi Ken,

One good thing to have would be a sunit test that would fail until the fix is applied. then it should pass. And obviously it should fail again if the fix gets overridden again.

That would be how to fix indiscriminant code fixes like 7156.

In curiosity and service, --Jerome Peace
05-10-08 01:42   
In addition to the 'fraction' issue it is also the case that DateAndTime class>>now does not return a time with any greater granularity than a second due to an overwrite of support for fractional seconds in this method. I'm adding a test and fix for this.
05-10-08 01:48   
Note there is a little confusion here, largely due to me. The actual problem caused by the inclusion of 0004669 is that it overwrote an implementation of DateAndTime class>>now that provided sub-second precision. The problem that Duration>>seconds returns a fraction and not an integer arises from elsewhere and I'm trying to track it down.
05-10-08 02:14   
OK, here's the story as I understand it. It turns out that the implementation of Duration>>seconds where the calculation is actually done, as well as the implementation of Time>>seconds has not changed. What has changed is that the clock is now more precise than 1 second where it was not in 3.9 and presumably before. So Duration>>seconds when it added in the nanosecond part was always adding a 0 (because Time>>nanosecond is always 0) to seconds and so you got an integer. But now Time>>nanosecond is non-zero and so more often than not you get a fraction of a second added.

The ANSI protocol specifies nothing regarding the type returned for second (or seconds) in any case other than that is is a number. It seems logical to me that Duration>>seconds be a fraction. Is that also true for Time>>seconds? I don't know, I've emailed Squeak-dev asking for opinons.
05-12-08 18:36   
I issued a query to squeak-dev about whether #seconds and friends should return an Integer or Fraction. I only got a few responses but all said Integer so I suppose that's the way we should go.
05-12-08 20:34   
I have attached my proposed changes yet as the preamble notes I get new heisen-failures on RenderBugz so further changes may be forthcoming.
05-13-08 20:24   
I've convinced myself that the new failure in RenderBugz is unconnected to any of these changes and that it shows up for me is largely happenstance and due to the definition of 'forever' as '> 1 millisecond'. I've contacted Peace to petition for a redefinition as '> 10 milliseconds'.
05-18-08 18:05   
Jerome is separately working on the RenderBugz issue in 0007045 so I think that can be dropped from this conversation.

Otherwise I'm now thinking that it was a mistake for me to include a bunch of line-feed removals and minor formatting changes in this changeset. I seem to remember that there is a utility in the image for the linefeeds issue and I wonder if instead running that shouldn't be done as an update.
05-18-08 18:06   
Oh, I will add a new version of this update to this issue soon. The only difference will be the removal of the methods that are just whitespace/formatting changes and leave just the changes relevant to this issue.
05-18-08 20:10   
Please disregard MillisecondClockDurationSeconds-M7036-klc.1.cs.gz of 5/12/08 and consider subsecondClockAndSecondsAsInteger-M7036-klc.1.cs.gz of 5/18/08 my proposed fix for this issue. Feedback would be appreciated. This will be harvested as an update for 3.10.1 no later than Friday 5/23/08 so please don't delay if you find any issues.
05-23-08 20:54   
Harvested for 3.10.1 as update 7171
05-26-08 18:35   
Fixed in 3.10.1