(unknown charset) Re: Oberon V4 under Windows XP
----boundary-LibPST-iamunique-281174777_-_-
Content-type: text/plain
Thanks for the information, Aubrey. I looked at the modifications
to Files.Mod, and see that you fixed the problem by applying
ABS to GetTickCount().
One question: The Files module is prelinked with the
Oberon bootfile for Windows and a different version won't be
loaded just by being placed in a directory in the Oberon path.
I had to create a new bootfile to use a new version of Files.
Am I missing something here?
Here is my analysis of the problem:
PROCEDURE GetTempName (VAR name: ARRAY OF CHAR);
VAR n, i: LONGINT;
BEGIN
INC(tempno); n := tempno; COPY("Oberon.Tmp.0000000000", name); i :=
20;
WHILE n # 0 DO
name[i] := CHR(n MOD 10 + ORD("0")); n := n DIV 10; DEC(i)
END
END GetTempName;
tempno is initialized by a call to GetTickCount, which is
described by Microsoft as follows:
"The elapsed time is stored as a DWORD value. Therefore, the time will
wrap around to zero if the system is run continuously for 49.7 days."
Apparently this is an unsigned integer, so if it is large it will
be a negative signed integer. If n begins with a negative value,
the statement n := n DIV 10 will eventually give n a value -1 which
repeats indefinitly and n will never be 0. -1 MOD 10 is 9, which is
exactly the behavior I see, because name has 9s in the higher positions
when the trap occurs. Over a period of 49 days I would expect
GetTempName
to fail about half the time, assuming the system is not restarted.
Now, I would expect this behaviour on any Windows system, not just XP.
Possibly it is very rare for any Windows system before XP to run
continuously for more than 25 days?
By the way, I first saw this problem a few years ago but didn't persue
it enough to resolve the problem then.
----boundary-LibPST-iamunique-281174777_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTFcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ0Ke1xmMlxmbmlsXGZjaGFy
c2V0MiBTeW1ib2w7fQ0Ke1xmM1xmbW9kZXJuXGZjaGFyc2V0MCBDb3VyaWVyIE5ldzt9fQ0Ke1xj
b2xvc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