Sign in to follow this  

Buffer overflow on salt water packet size with door compressor


riwenna
  • Branch: Live Branch Version: Windows Pending

I finally decided to deal with all my salt water on Oceania... by compressing it all into four tiles with a door compressor pump.

It worked well, I cleaned somewhere between a half and a third of the map, went to check on my door pump, noticed in horror that the salt water quantity per tile was displayed as -2147483648.-2.147484E+09 Kg (I especially love the two negatives), and as I was watching the water somehow reversed out of my door pump, tried to flood my map with -2147483648.-2.147484E+09 Kg packets of water and crashed.

5dbf043e28bd6_Screenshot2019-11-0316_17_13.thumb.png.acaf46c9a80056ab40d6034fb4be421c.png

I also noticed that my game happily went on running with this for four cycles off screen (as I kept reloading the auto-saves to find a morning before the buffer overflow and for four cycles the water packets in the pump had been -2147483648.-2.147484E+09 Kg, and would push out, flood and crash my game if I was observing). Had to rewind all the way to cycle 1006 to stop it from adding any more water before the packets in the bottom had overflowed.

I am also attaching the save game from the morning of cycle 1010; it loads normally (I've tried several times) despite having the packets overflown for several cycles already. It crashes a few seconds after unpausing: IntOverflow.sav

If save files from several cycles prior are of help, let me know.


Steps to Reproduce
Try compressing all the water on Oceania into four tiles with a door pump. Or just run the savegame attached.

Status: Pending

This issue has not been confirmed by a developer yet.


  Report Bug
Sign in to follow this  


User Feedback


....

"door compressor pump" is evil. :D

Now you know that you should not use it as it's non intended to be used like this. :p 

  • Haha 1

Share this comment


Link to comment
Share on other sites
....

No bug here. 2147483648 is exactly 32 Bit. And if a value reaches max, it flips to negative, and causing all kinds of problems. 

You´ve simply reached a hard limit inside the code. 

This is clearly nothing that get "fixed" anytime soon. You´re using an exploit, that causing the game to hit a hard limit. No need to change anything here. This is the ultimate limit for this exploit. Nothing more, nothing less. 

  • Like 1

Share this comment


Link to comment
Share on other sites
....

The game actually keeps track of how much mass is in a tile beyond the 32 bit.

Spoiler

image.thumb.png.62946c322ca06d6669cc9a215778a96c.png

I tried/tested a lot of door pump setups, managed to break all of them somehow.

Share this comment


Link to comment
Share on other sites
....

Ah, yes, no bug. Good code is always written so that if the users reach the hard limit, the program or service crashes to teach them a lesson. Totally intended behaviour.

In fact, somebody else reported a game crash due to the same problem:

Since there is clearly nothing to get fixed here and the devs consider this an exploit to be punished, when the devs responded to the post they laughed at the OP there, told him that his world was lost, told him off for designing a system like that in the first place and that there's no need to change anything.

Oh wait, no, actually, the devs were interested in what made the game crash, looked into his logs and savefiles, and then suggested what to do to be able to continue playing and using that system while they're looking into that behaviour.

There will always be people pushing on the limits of what games (especially sandbox games like this) allow them to do. If something is not an allowed mechanic, it should not be in the game, rather than crashing it, I think.

Share this comment


Link to comment
Share on other sites
....


Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now