[16.25] Express belt animation stops at a specific time

This subforum contains all the issues which we already resolved.
Post Reply
metriy
Manual Inserter
Manual Inserter
Posts: 3
Joined: Sun Feb 25, 2018 10:38 am
Contact:

[16.25] Express belt animation stops at a specific time

Post by metriy » Sun Feb 25, 2018 11:30 am

After a certain time of the game, the animation of Express belt just stops. But it does not stop working. Animation T1-T2 belts continues to work fine.
This does not depend on the graphics settings or mods.
I played a very long time in this save, with the release of 0.15. Maybe at the specified second there is some overflow of the animation counter?
P.S. i'm using google translate, sorry for that.
situation 1.webm
(848.26 KiB) Downloaded 269 times
situation 2.webm
(1004.24 KiB) Downloaded 144 times
Attachments
factorio-current.log
(13.73 KiB) Downloaded 36 times
mods.zip
(3.55 MiB) Downloaded 37 times
save_1_minute_left.zip
(68.26 MiB) Downloaded 44 times

posila
Factorio Staff
Factorio Staff
Posts: 3992
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: [16.25] Express belt animation stops at a specific time

Post by posila » Sun Feb 25, 2018 12:50 pm

Thanks for the report.
Fixed for 0.16.26
I think this makes you record holder of the longest played map with belts :)

orzelek
Smart Inserter
Smart Inserter
Posts: 3611
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: [16.25] Express belt animation stops at a specific time

Post by orzelek » Sun Feb 25, 2018 1:31 pm

Did it really overflow some counter? ;)

posila
Factorio Staff
Factorio Staff
Posts: 3992
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: [16.25] Express belt animation stops at a specific time

Post by posila » Sun Feb 25, 2018 1:52 pm

You could say that. There was

frame = (int32_t)(tick * animation_speed)

where result of (tick * animation_speed) is double, so when it got larger than max int, casting it to int clamped it to max int (because that's how float -> int cast behaves, it doesn't wrap around as normal integer arithmetic)

Rseding91
Factorio Staff
Factorio Staff
Posts: 9977
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [16.25] Express belt animation stops at a specific time

Post by Rseding91 » Sun Feb 25, 2018 1:59 pm

posila wrote:You could say that. There was

frame = (int32_t)(tick * animation_speed)

where result of (tick * animation_speed) is double, so when it got larger than max int, casting it to int clamped it to max int (because that's how float -> int cast behaves, it doesn't wrap around as normal integer arithmetic)
People using signed types when they never needed or wanted the negative variant -.-
If you want to get ahold of me I'm almost always on Discord.

SQLek
Inserter
Inserter
Posts: 45
Joined: Tue Jun 28, 2016 10:23 am
Contact:

Re: [16.25] Express belt animation stops at a specific time

Post by SQLek » Sun Feb 25, 2018 4:41 pm

Dude! Do You really gamed over 9942 hours on this save? Without speeding up ts's like 3.4 years gaming 8 hours a day O.o

Supercheese
Filter Inserter
Filter Inserter
Posts: 835
Joined: Mon Sep 14, 2015 7:40 am
Contact:

Re: [16.25] Express belt animation stops at a specific time

Post by Supercheese » Sun Feb 25, 2018 4:59 pm

SQLek wrote:Dude! Do You really gamed over 9942 hours on this save? Without speeding up ts's like 3.4 years gaming 8 hours a day O.o
He could have been playing on a higher game.speed setting.

metriy
Manual Inserter
Manual Inserter
Posts: 3
Joined: Sun Feb 25, 2018 10:38 am
Contact:

Re: [16.25] Express belt animation stops at a specific time

Post by metriy » Sun Feb 25, 2018 9:07 pm

132 days = 3200 hours, and all at normal speed, just 24/7. And I know, I'm a little crazy :shock: - but someone mining bitcoins, well, I'm the mining ores in Factorio. So meditative... :D
Thanks for answer.

metriy
Manual Inserter
Manual Inserter
Posts: 3
Joined: Sun Feb 25, 2018 10:38 am
Contact:

Re: [16.25] Express belt animation stops at a specific time

Post by metriy » Mon Feb 26, 2018 6:32 pm

Yes, 16.26 fixed belts. However, the same problem still remained for express splitters and underground belts. :roll:

User avatar
retep998
Burner Inserter
Burner Inserter
Posts: 5
Joined: Mon Mar 21, 2016 1:32 am
Contact:

Re: [16.25] Express belt animation stops at a specific time

Post by retep998 » Mon Feb 26, 2018 8:33 pm

posila wrote:You could say that. There was

frame = (int32_t)(tick * animation_speed)

where result of (tick * animation_speed) is double, so when it got larger than max int, casting it to int clamped it to max int (because that's how float -> int cast behaves, it doesn't wrap around as normal integer arithmetic)
If you're doing this in C++, it's much worse than merely "clamping". Casts from floating point types to integer types that result in overflow cause full blown nasal demon undefined behavior!
Image

Rseding91
Factorio Staff
Factorio Staff
Posts: 9977
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [16.25] Express belt animation stops at a specific time

Post by Rseding91 » Mon Feb 26, 2018 8:37 pm

retep998 wrote:
posila wrote:You could say that. There was

frame = (int32_t)(tick * animation_speed)

where result of (tick * animation_speed) is double, so when it got larger than max int, casting it to int clamped it to max int (because that's how float -> int cast behaves, it doesn't wrap around as normal integer arithmetic)
If you're doing this in C++, it's much worse than merely "clamping". Casts from floating point types to integer types that result in overflow cause full blown nasal demon undefined behavior!
That's fine. It does the same thing on all of the platforms we support or multiplayer wouldn't work (and it does). We also rely on signed integer overflow/underflow which works as you'd expect it to on all of the platforms we support with tests and everything.
If you want to get ahold of me I'm almost always on Discord.

Post Reply

Return to “Resolved Problems and Bugs”

Who is online

Users browsing this forum: Bing [Bot]