Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0007036 [Squeak] ToDo major always 05-09-08 05:36 05-26-08 18:35
Reporter KenCausey View Status public  
Assigned To KenCausey
Priority immediate Resolution fixed  
Status closed   Product Version 3.10
Summary 0007036: Issue fix for #6805 "Time now return fraction not integer" in 3.10.1
Description Issue fix for 0006805 "Time now return fraction not integer" in 3.10.1
Additional Information
Attached Files  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

- Relationships

SYSTEM WARNING: Creating default object from empty value

SYSTEM WARNING: Creating default object from empty value

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 

- Notes
(0012058 - 167 - 167 - 167 - 167 - 167 - 167)
Keith_Hodges
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
 
(0012059 - 94 - 130 - 296 - 441 - 441 - 441)
KenCausey
05-09-08 06:34

Relevant stuff:

http://ftp.squeak.org/updates/7156fasterDayOfYear-brp.1.cs [^]

0000464

0004669
 
(0012060 - 155 - 155 - 155 - 242 - 242 - 242)
KenCausey
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.
 
(0012061 - 125 - 125 - 125 - 125 - 125 - 125)
KenCausey
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.
 
(0012065 - 183 - 183 - 183 - 183 - 183 - 183)
KenCausey
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...
 
(0012066 - 306 - 342 - 342 - 342 - 342 - 342)
wiz
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
 
(0012070 - 256 - 262 - 262 - 262 - 262 - 262)
KenCausey
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.
 
(0012071 - 340 - 352 - 352 - 421 - 421 - 421)
KenCausey
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.
 
(0012073 - 875 - 929 - 929 - 929 - 929 - 929)
KenCausey
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.
 
(0012083 - 194 - 194 - 194 - 194 - 194 - 194)
KenCausey
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.
 
(0012084 - 140 - 140 - 140 - 140 - 140 - 140)
KenCausey
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.
 
(0012091 - 285 - 291 - 291 - 291 - 291 - 291)
KenCausey
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'.
 
(0012106 - 414 - 426 - 426 - 536 - 536 - 536)
KenCausey
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.
 
(0012107 - 214 - 214 - 214 - 214 - 214 - 214)
KenCausey
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.
 
(0012117 - 340 - 340 - 340 - 340 - 340 - 340)
KenCausey
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.
 
(0012147 - 35 - 35 - 35 - 35 - 35 - 35)
KenCausey
05-23-08 20:54

Harvested for 3.10.1 as update 7171
 
(0012176 - 15 - 15 - 15 - 15 - 15 - 15)
KenCausey
05-26-08 18:35

Fixed in 3.10.1
 

- Issue History
Date Modified Username Field Change
05-09-08 05:36 KenCausey New Issue
05-09-08 05:36 KenCausey Status new => assigned
05-09-08 05:36 KenCausey Assigned To  => RalphJohnson
05-09-08 06:14 Keith_Hodges Note Added: 0012058
05-09-08 06:34 KenCausey Note Added: 0012059
05-09-08 06:36 KenCausey Note Added: 0012060
05-09-08 06:41 KenCausey Note Added: 0012061
05-09-08 21:01 KenCausey Note Added: 0012065
05-10-08 00:40 wiz Note Added: 0012066
05-10-08 01:42 KenCausey Note Added: 0012070
05-10-08 01:48 KenCausey Note Added: 0012071
05-10-08 02:14 KenCausey Note Added: 0012073
05-12-08 17:39 KenCausey Assigned To RalphJohnson => KenCausey
05-12-08 18:36 KenCausey Note Added: 0012083
05-12-08 20:33 KenCausey File Added: MillisecondClockDurationSeconds-M7036-klc.1.cs.gz
05-12-08 20:34 KenCausey Note Added: 0012084
05-12-08 20:34 KenCausey Relationship added related to 0006805
05-13-08 20:24 KenCausey Note Added: 0012091
05-18-08 18:03 KenCausey Relationship added related to 0007045
05-18-08 18:05 KenCausey Note Added: 0012106
05-18-08 18:06 KenCausey Note Added: 0012107
05-18-08 20:09 KenCausey File Added: subsecondClockAndSecondsAsInteger-M7036-klc.1.cs.gz
05-18-08 20:10 KenCausey Note Added: 0012117
05-18-08 20:10 KenCausey Status assigned => feedback
05-19-08 16:37 KenCausey Relationship added related to 0000474
05-23-08 20:54 KenCausey Status feedback => resolved
05-23-08 20:54 KenCausey Fixed in Version  => 3.10
05-23-08 20:54 KenCausey Resolution open => fixed
05-23-08 20:54 KenCausey Note Added: 0012147
05-26-08 18:35 KenCausey Status resolved => closed
05-26-08 18:35 KenCausey Note Added: 0012176


Mantis 1.0.8[^]
Copyright © 2000 - 2007 Mantis Group
125 total queries executed.
73 unique queries executed.
Powered by Mantis Bugtracker