Page 1 of 2

[0.13.8] Flashing chat colors after just 12200 hours ingame

Posted: Mon Jul 18, 2016 9:22 am
by Danielv123
I would expect at the very least to be able to run my dedicated server for 3 years before strange shit happens :(

http://imgur.com/59VuCKL

No mods, savefile attatched.

Re: [0.13.8] Flashing chat colors after just 12200 hours ingame

Posted: Mon Jul 18, 2016 9:25 am
by Klonan
Thanks for the report,
And the nice gif,

I have confirmed the problem


Re: [0.13.8] Flashing chat colors after just 12200 hours ingame

Posted: Mon Jul 18, 2016 9:34 am
by Rseding91
Factorio's upper hour limit is 19884.107~ before the tick rolls over to 0 and who knows what happens. Not 3 years.

That being said, I'll look at your save and see if I can figure out what's causing the color issue.

Re: [0.13.8] Flashing chat colors after just 12200 hours ingame

Posted: Mon Jul 18, 2016 9:41 am
by Rseding91
Fixed the rainbow for 0.13.10.

Re: [0.13.8] Flashing chat colors after just 12200 hours ingame

Posted: Mon Jul 18, 2016 10:11 am
by posila
Rseding91 wrote:Factorio's upper hour limit is 19884.107~ before the tick rolls over to 0 and who knows what happens. Not 3 years.
So only 2.26 years

Re: [0.13.8] Flashing chat colors after just 12200 hours ingame

Posted: Mon Jul 18, 2016 10:40 am
by vtx
So you used an unsingned integer 32 bits.

Either you reset the time tick to 0 or you could upgraded it to 64 bit unsigned integer that will provide :

85 401 592 933 840,516 upper limit hours.

9 742 367 434,843 years instead of 2.26 years.

No one will ever reach that in a single life time. That will prevent any other issues that can pop in when you overflow the tick counter.

As the OP boost the game tick by 250 with uint64 he will be able to sustain it for

341 606 371 735,362 hours equal 38 969 469,739 years, still he'll never reach the end in a lifetime


Also if the network use BINARY data that will only add 4 bytes for the game tick.

Re: [0.13.8] Flashing chat colors after just 12200 hours ingame

Posted: Mon Jul 18, 2016 12:41 pm
by Danielv123
vtx wrote:Either you reset the time tick to 0 or you could upgraded it to 64 bit unsigned integer that will provide :
85 401 592 933 840,516 upper limit hours.
9 742 367 434,843 years instead of 2.26 years.
No one will ever reach that in a single life time. That will prevent any other issues that can pop in when you overflow the tick counter.
So, essentially they got ~30 hours to change to 64 bit intriegers.

I would also really like to know what caused these colors. Large logistics numbers aren't nearly as dramatic.

Re: [0.13.8] Flashing chat colors after just 12200 hours ingame

Posted: Mon Jul 18, 2016 1:09 pm
by Compboy
As the OP said. he would have loved to run his server "AT LEAST" for 3 years. which he could not get to. because of ... read above.
Hope they indeed consider vtx's comments.

Re: [0.13.8] Flashing chat colors after just 12200 hours ingame

Posted: Mon Jul 18, 2016 2:10 pm
by Rseding91
Compboy wrote:As the OP said. he would have loved to run his server "AT LEAST" for 3 years. which he could not get to. because of ... read above.
Hope they indeed consider vtx's comments.
2.26 years assuming a constant 60 UPS which it won't be if you're running it for that long.

Re: [0.13.8] Flashing chat colors after just 12200 hours ingame

Posted: Mon Jul 18, 2016 2:13 pm
by kovarex
Just to make it clear, we are not changing tick number to 64bit. If anyone spends 2.26 years of playtime on single map it is probably the time for restart.

Re: [0.13.8] Flashing chat colors after just 12200 hours ingame

Posted: Mon Jul 18, 2016 2:24 pm
by steinio
kovarex wrote:Just to make it clear, we are not changing tick number to 64bit. If anyone spends 2.26 years of playtime on single map it is probably the time for restart.
You like shitstorms? :)

Re: [0.13.8] Flashing chat colors after just 12200 hours ingame

Posted: Mon Jul 18, 2016 2:48 pm
by MajkStone
So this bug is Y2K for factorio? ;)

Re: [0.13.8] Flashing chat colors after just 12200 hours ingame

Posted: Mon Jul 18, 2016 6:20 pm
by Adil
kovarex wrote:Just to make it clear, we are not changing tick number to 64bit. If anyone spends 2.26 years of playtime on single map it is probably the time for restart.
When you've played a single map for 2.26 years of playtime, restarting it is probably the last thing you'd wish to do :P
Though this is definitely not healthy.

Re: [0.13.8] Flashing chat colors after just 12200 hours ingame

Posted: Mon Jul 18, 2016 6:33 pm
by Killerbee
Adil wrote:
kovarex wrote:Just to make it clear, we are not changing tick number to 64bit. If anyone spends 2.26 years of playtime on single map it is probably the time for restart.
When you've played a single map for 2.26 years of playtime, restarting it is probably the last thing you'd wish to do :P
Though this is definitely not healthy.
2 years of playtime is not that hard to get.
I have multiple times a year lanparties with some friends.
The games that have a server that can be hosted will be run on a server after the lanparty so people can continue to play when they want to.
That way we have several servers now that have run for multiple years(Minecraft, farming simulator and some other games).
It is probably not a smart thing to do with Factorio, but it in my case it would be in the realm of possibilities.

Re: [0.13.8] Flashing chat colors after just 12200 hours ingame

Posted: Mon Jul 18, 2016 6:47 pm
by vtx
To put things into perspective if you play ( or server is only active for ) 8 hours daily every days. Also you'll need to keep an average game.speed of 1.

You'll be able to play for 6.8 years.

Re: [0.13.8] Flashing chat colors after just 12200 hours ingame

Posted: Mon Jul 18, 2016 7:48 pm
by Compboy
vtx wrote:To put things into perspective if you play ( or server is only active for ) 8 hours daily every days. Also you'll need to keep an average game.speed of 1.

You'll be able to play for 6.8 years.
you are right. but there are some weird folks like myself out there that tend to stretch things just because.
look at mincecraft servers that have been running for "ages".
What if i would like to run it at say game speed 4?

For the moment I'll just go with what the Dev's agree on. but like the network re-work. I will be one that will say " well we told you so. "
At least they admit it in the FF this time.

Re: [0.13.8] Flashing chat colors after just 12200 hours ingame

Posted: Tue Jul 19, 2016 2:26 pm
by MrGrim
Between the Y2K problem and the year 2038 problem and every problem in between it's surprising to me that anybody would use a 32 bit value for any kind of clock ever. I'd love to know the state of mind of the dev that did that at the exact moment the decision was made... thinking maybe at 3:00 AM, slightly drunk, right in the middle of a coding bender; 18 hours in, and that evil way of thinking that that haunts coders from the era of when computer RAM was measured in bytes kicks in...

"64 bit is a lot of bits... surely 32 are enough.. I wouldn't want to run out of RAM..."

Re: [0.13.8] Flashing chat colors after just 12200 hours ingame

Posted: Tue Jul 19, 2016 7:58 pm
by Adil
Well, timer variable is probably not the only one, that is stored in the said size. There are probably lots of variable up to a few per entity, that need the same amount of ram.
Something that massively used certainly could make a difference in memory footprint.
Also, allocating additional bytes for something that is only used after two years of running does seem like a wasted ram.
Maybe some form of relative indexing might be better for that. Or maybe just when game nears the final tick, reduce every time variable by same time amount so that all of them are in the beginning of scale again.

Re: [0.13.8] Flashing chat colors after just 12200 hours ingame

Posted: Tue Jul 19, 2016 9:00 pm
by MrGrim
Adil wrote:Well, timer variable is probably not the only one, that is stored in the said size. There are probably lots of variable up to a few per entity, that need the same amount of ram.
Something that massively used certainly could make a difference in memory footprint.
Also, allocating additional bytes for something that is only used after two years of running does seem like a wasted ram.
Maybe some form of relative indexing might be better for that. Or maybe just when game nears the final tick, reduce every time variable by same time amount so that all of them are in the beginning of scale again.
Well, first and foremost the post was a joke.. the alcohol fueled 18 hour long coding bender part was the biggest clue.

However, if you'd really like to discuss the finer points. Storing the game clock as a 64 bit uint doesn't require storing every other previously 32bit value as 64bit. So, there's that. However, let's say we did.

You could convert 4,346,624 run time values to 64bit for the size of the Factorio executable. For the cost of the games "core" data folder you could cover an additional 10,335,279. That puts us at an increased footprint of just a hair over 56MB.

Now, I'll agree that for my old K6-2 system with 64MB of RAM that'd totally be an issue. Also that it was a 32 bit system and can't store a 64 bit value in a single register would be a bit of a big deal.

Let's have some fun and up that to a factor of 10. 146,819,030 64bit unit's being tracked. A whopping 560MB worth. Lets say we have something wild like 1000 values per entity tracked. That's enough to track 146,819 entities. That's a big but doable map. Of course, we're not tracking 1,000 metrics per entity.

On an average DDR3 1333 based system it would take 3 frames at 60fps to read 560MB from RAM. So, there's one in the 32 bit camp. It would "only" take 1.5 frames to read the same number of 32 bit values. There's also cache considerations, of course. Oh ya, and the fun performance implications. Check out - http://nicolas.limare.net/pro/notes/201 ... rit_speed/

Using 64 bit data types has trade offs, but the RAM utilization considerations are really far down the list. Of course, this was all just fun conjecture.

I don't know how often the game needs to copy the current clock value and how many copies it needs to keep. It's possible converting to 64 bit might have a performance hit that's measurable outside the margin of error. It does have me curious.

Re: [0.13.8] Flashing chat colors after just 12200 hours ingame

Posted: Sun Aug 28, 2016 4:44 pm
by Danielv123
Im gonna update this as I realized I forgot to tell you all the results of my test. Essentially, once it reaches 19884 hours it just ticks back over to 0. Got a nice 10 minute speedrun out of this, beat that!

Anyways, stability is flawless as always.