Page 1 of 1

[boskid][0.18.4] Crashes loading map: "Count of rolling stocks on me does not match cached value."

Posted: Mon Feb 10, 2020 10:54 pm
by HeavySmoke333
I have a large save, around 800 hours, Had saved and shut down game, downloaded mini me mod, restarted game and when trying to load of map game crashes. Updated factorio to latest version however crashes persist upon loaded saved map, other saves still load and new game still starts, deleted mod and still crashes..

Crash report, Mod list and game file attached

Re: Game crashes when loading map

Posted: Mon Feb 10, 2020 10:56 pm
by Loewchen
Upload the save to google drive and post the link please.

Re: [0.18.4] Crashes loading map: "Count of rolling stocks on me does not match cached value."

Posted: Mon Feb 10, 2020 11:00 pm
by HeavySmoke333
Fast reply! Now uploading, standby

Re: [0.18.4] Crashes loading map: "Count of rolling stocks on me does not match cached value."

Posted: Mon Feb 10, 2020 11:20 pm
by HeavySmoke333

Re: [0.18.4] Crashes loading map: "Count of rolling stocks on me does not match cached value."

Posted: Tue Feb 11, 2020 12:37 pm
by boskid
Hm.... this is interesting
81102-a.png
81102-a.png (278.1 KiB) Viewed 5198 times
because i can do this (after fixing cache to apparently "valid" value):
81102-b.png
81102-b.png (363.73 KiB) Viewed 5198 times

Re: [0.18.4] Crashes loading map: "Count of rolling stocks on me does not match cached value."

Posted: Tue Feb 11, 2020 12:39 pm
by posila
That shouldn't be possible to do. The rail should have non-zero trainEnteredCount and should not let itself to be mined.

Re: [0.18.4] Crashes loading map: "Count of rolling stocks on me does not match cached value."

Posted: Tue Feb 11, 2020 12:44 pm
by boskid
posila wrote:
Tue Feb 11, 2020 12:39 pm
That shouldn't be possible to do. The rail should have non-zero trainEnteredCount and should not let itself to be mined.
I know, but this means that calculateTrainEnteredCount is broken and cached value is valid (i did small save recovery test by updating cached value to a value from calculateTrainEnteredCount)

-- edit:
Temporary fix: https://drive.google.com/file/d/1wK63T6 ... Dkh20/view - i could load that without that consistency check but i had to move affected train so it would fix rolling stock distance.
It may be related to 80875, i will have to look

Re: [0.18.4] Crashes loading map: "Count of rolling stocks on me does not match cached value."

Posted: Tue Feb 11, 2020 4:39 pm
by HeavySmoke333
Wow thats brilliant thanks for having a look and hopefully resolving to the point where I can continue on the same map, - Now downloading the fixed version. I had heard rumours that you guys were well on the case resolving issues and the fact that this has been wrapped up in about 12 hours just shows that.

I expect this problem has been caused by the mods that I am using -

Configurable train speeds and infinite breaking speed, The way I have the aforementioned mods set up is that trains run probably up to 100 times faster than usual and come to an almost instant stop upon breaking, I imagine in an unmodded version this problem may never arise?

Anyhow, thanks so much, Brilliant game and Brilliant team, keep up the good work!

Re: [0.18.4] Crashes loading map: "Count of rolling stocks on me does not match cached value."

Posted: Tue Feb 11, 2020 5:08 pm
by boskid
HeavySmoke333 wrote:
Tue Feb 11, 2020 4:39 pm
Configurable train speeds and infinite breaking speed, The way I have the aforementioned mods set up is that trains run probably up to 100 times faster than usual and come to an almost instant stop upon breaking, I imagine in an unmodded version this problem may never arise?
That was piece of information i was missing.
81102-repr.png
81102-repr.png (381.77 KiB) Viewed 5100 times

Re: [0.18.4] Crashes loading map: "Count of rolling stocks on me does not match cached value."

Posted: Tue Feb 11, 2020 5:11 pm
by HeavySmoke333
Sorry, they were listed in the mod list

Re: [boskid][0.18.4] Crashes loading map: "Count of rolling stocks on me does not match cached value."

Posted: Mon Feb 17, 2020 3:48 pm
by boskid
I did some small trains movement fixes so this gaps should not happen anymore (until you get to even higher train speeds, please dont), however i did not add migration so given save file will still be broken. I hope previously provided, fixed save file will be enough.

Re: [boskid][0.18.4] Crashes loading map: "Count of rolling stocks on me does not match cached value."

Posted: Mon Feb 17, 2020 6:06 pm
by ptx0
boskid wrote:
Mon Feb 17, 2020 3:48 pm
I did some small trains movement fixes so this gaps should not happen anymore (until you get to even higher train speeds, please dont), however i did not add migration so given save file will still be broken. I hope previously provided, fixed save file will be enough.
is it possible for the overpowered train speed and brakes to hit this condition? if so, is not possible to limit the top speed based on this so any fuel can't cause breaking state?

Re: [boskid][0.18.4] Crashes loading map: "Count of rolling stocks on me does not match cached value."

Posted: Mon Feb 17, 2020 9:03 pm
by boskid
ptx0 wrote:
Mon Feb 17, 2020 6:06 pm
is it possible for the overpowered train speed and brakes to hit this condition? if so, is not possible to limit the top speed based on this so any fuel can't cause breaking state?
In vanilla it is not possible, but with mods it could happen. Safe speed should be below 34.19/tick (half length of tight circle per tick), that is 7385km/h as shown in tooltips. Above that speed i will not guarantee anything.

Re: [boskid][0.18.4] Crashes loading map: "Count of rolling stocks on me does not match cached value."

Posted: Mon Feb 17, 2020 9:39 pm
by ptx0
boskid wrote:
Mon Feb 17, 2020 9:03 pm
ptx0 wrote:
Mon Feb 17, 2020 6:06 pm
is it possible for the overpowered train speed and brakes to hit this condition? if so, is not possible to limit the top speed based on this so any fuel can't cause breaking state?
In vanilla it is not possible, but with mods it could happen. Safe speed should be below 34.19/tick (half length of tight circle per tick), that is 7385km/h as shown in tooltips. Above that speed i will not guarantee anything.
awesome, since this is a known and somewhat static value you should indeed be able to hard limit the speed any train travels at and throw that onto the list of hard properties of trains that cannot be modded outside of a given range. ye know, like you would if it caused a buffer overflow.

Re: [boskid][0.18.4] Crashes loading map: "Count of rolling stocks on me does not match cached value."

Posted: Mon Feb 17, 2020 11:13 pm
by ptx0
realistically, the train should be derailing and cause substantial losses of life and other property if it's trying to round a bend in less than 12 parsec.

Re: [boskid][0.18.4] Crashes loading map: "Count of rolling stocks on me does not match cached value."

Posted: Wed Feb 19, 2020 8:33 pm
by HeavySmoke333
Hey thanks again for the repair, Save game is working fine. Lost play time but a small price to pay. Just in case your interested to know the trains max speed was a little over Mach 21