Date/Time Format with improbably large numbers

Found a bug? Tell us about it here

Moderator: DPlotAdmin

Post Reply
raswaim
Posts: 69
Joined: Thu Jan 06, 2005 3:43 pm
Location: Houston, TX

Date/Time Format with improbably large numbers

Post by raswaim »

Not a big issue, but if you happen to generate large values for the X-axis while you have date/time formatting turned on, the program will terminate. It looks like the formatting routine has an unhandled condition, probably as the result of an integer conversion going negative. The issue appears if an x value is greater than 2^31. I tripped over it while attempting to convert a timescale to milliseconds (multiplying using operate on X) before switching the format back to default - not a sequence I can recommend. Not something you'd generally have a problem with unless you regularly need to check your calendar 6 million years from now, but since the results are so startling, I thought I'd report it...
- RAS
User avatar
DPlotAdmin
Posts: 2312
Joined: Tue Jun 24, 2003 9:34 pm
Location: Vicksburg, Mississippi
Contact:

Post by DPlotAdmin »

Richard,
Thanks. That problem actually did occur to me briefly as I was working on the last update, but didn't stay in my head long enough to fix it.

Hmm... an integer operation, that means you need to guard against integer overflow. Nah, who's going to do that?

And now we know :-)

I'll definitely have this fixed next time, most likely by making it all floating point. So if you want to plot the time of day when the sun is expected to fizzle, you'll be able to.
Visualize Your Data
support@dplot.com
raswaim
Posts: 69
Joined: Thu Jan 06, 2005 3:43 pm
Location: Houston, TX

Post by raswaim »

Do whatever is easiest, I personally don't really care if it actually returns a sensible date since I think the Morlocks will introduce a new standard to replace the Gregorian calendar. I just didn't want it to crash....
- RAS
Post Reply