It seems that the ms argument to the after command has a limit. If it
is sufficiently large, it locks up the script and you can't do anything until you cancel the after command.
Further checking seems to point at "2037" or thereabouts as the critical time point. Any ms argument that puts it past that point causes the
error. But there is no info on this in the docs so perhaps it is
something else altogether.
% after [expr 14*365*24*60*60*1000] puts "gui locked up?"
On 3/4/24 14:50, saitology9 wrote:
It seems that the ms argument to the after command has a limit. If it
is sufficiently large, it locks up the script and you can't do anything
until you cancel the after command.
Further checking seems to point at "2037" or thereabouts as the critical
time point. Any ms argument that puts it past that point causes the
error. But there is no info on this in the docs so perhaps it is
something else altogether.
% after [expr 14*365*24*60*60*1000] puts "gui locked up?"
First off the correct syntax would be:
after [expr {14*365*24*60*60*1000}] {puts "gui locked up?"}
Second off, is it realistic that the same process will be running in 14 years?
This is on 64-bit Windows running 32-bit tclsh.
Thirdly, it does not seem to cause an issue on Linux (Ubuntu to be
precise) -- so this may be a MS Windows bug.
First off the correct syntax would be:
after [expr {14*365*24*60*60*1000}] {puts "gui locked up?"}
Second off, is it realistic that the same process will be running in 14 years?
Thirdly, it does not seem to cause an issue on Linux (Ubuntu to be
precise) -- so this may be a MS Windows bug.
It sounds like 32-bit Tcl on Windows is using a 32-bit time value that
can't represent time past the overflow point of a 32-bit time value.
I.e., it may be suffering from the year 2038 problem:
https://en.wikipedia.org/wiki/Year_2038_problem
On 3/4/2024 4:26 PM, Rich wrote:
It sounds like 32-bit Tcl on Windows is using a 32-bit time value that
can't represent time past the overflow point of a 32-bit time value.
I.e., it may be suffering from the year 2038 problem:
https://en.wikipedia.org/wiki/Year_2038_problem
I think this is it! Thanks.
Sysop: | DaiTengu |
---|---|
Location: | Appleton, WI |
Users: | 915 |
Nodes: | 10 (2 / 8) |
Uptime: | 43:22:33 |
Calls: | 12,170 |
Calls today: | 2 |
Files: | 186,521 |
Messages: | 2,234,531 |