[0.10.12] Removing rail mod causes crash to desktop

This subforum contains all the issues which we already resolved.
Post Reply
JamesOFarrell
Filter Inserter
Filter Inserter
Posts: 402
Joined: Fri May 23, 2014 8:54 am
Contact:

[0.10.12] Removing rail mod causes crash to desktop

Post by JamesOFarrell »

I'm not quite sure what is causing this crash but in some situations uninstalling a mod that includes modded rail and locos then loading a save with those entities in game will cause a crash to desktop. This doesn't always happen though. Here are 2 saves, one that will cause the crash and one should load correctly. Load both of them without Wagons_0.0.13 installed to see the issue.

Crash
No Crash

kovarex
Factorio Staff
Factorio Staff
Posts: 8078
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: [0.10.12] Removing rail mod causes crash to desktop

Post by kovarex »

Mod that adds or modifies rails is not recommended, I have no idea what could happen ..
I'm not talking about the rail laying mod, it is fine (in 0.11+ version).

JamesOFarrell
Filter Inserter
Filter Inserter
Posts: 402
Joined: Fri May 23, 2014 8:54 am
Contact:

Re: [0.10.12] Removing rail mod causes crash to desktop

Post by JamesOFarrell »

Yeah, you have mentioned this before, there is a reason that the wagons mod is still hidden away in the WIP forum but i thought I would report it anyway.

kovarex
Factorio Staff
Factorio Staff
Posts: 8078
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: [0.10.12] Removing rail mod causes crash to desktop

Post by kovarex »

Wagon mod should be ok, i was talking about the rail mod, and you would have to provide the mod as well.

JamesOFarrell
Filter Inserter
Filter Inserter
Posts: 402
Joined: Fri May 23, 2014 8:54 am
Contact:

Re: [0.10.12] Removing rail mod causes crash to desktop

Post by JamesOFarrell »

Removing the wagons mod (which adds a new type of rail and some new train engines) is the cause of this crash. If you load the Crash save without Wagons the game will crash (with no error). If you load it with wagons it will load fine. This is the download for the version of wagons that save is using. Hope that helps.

Edit: Also if you load the No_Crash save without wagons it should load fine even though the world has parts of the wagons mod in it.

SilverWarior
Filter Inserter
Filter Inserter
Posts: 559
Joined: Mon Mar 04, 2013 9:23 am
Contact:

Re: [0.10.12] Removing rail mod causes crash to desktop

Post by SilverWarior »

I havent tested this mod out but glancing at its entity and item definitions I suspect thre posible causes for crash:
1. Power rails: When you load a game without the mod active it means that rail sections which were build using powered rails no longer exist. This could result in train pathfinding aglorithm to fail but I don't think it would resulted in crash but rather train stopping with no valid path message.
But the main problem would occur if the train was on top of these powered rail secions when the game was saved. Why? Becouse now game doesen't know where to place the train since it can only be placed on the rails. This could definitly result in game crash.
2. New locomotives: I'm not sure how exactly the train works but as far as I know locomotives are the ones that control the whole train movment. So if suddenly there is no locomotive due to mod being disabled and the vagons were in motion before game probably won't know what to do with them which could result in game crash.
3. Roboport vagons: I don't know how would game deal if suddenly a roboport which is their destination no longr exists. Game probably won't know how to deal with loss of destination target. And even if it does having no other roboport in a close distance could prevent the game from finding a new valid destination for specific robot since robots no longer have infinite range as they used to have in the start.

So I recomend oyu make a few testing scenarios for tracking this bug:
1. Use ingame editor to quickly create a small scenario with some powered track layed don and a regular train on them. Run that scenario, save game and then quit. Now disable the rail mod and try loading that savegame. If the game crashes then the cause is that game doesen't know where to place the trains due to some missing track secions.
2. Create a small testing scenario with a standard rail and a stationary train (athleast one locomotive and one vagon - preferably vanila vagon) which uses new locomotives. Save game and disable the mod. If loading the game causes the game to crash then the game doesen't know how to deal then train suddenly no longer has valid locomotive. Personally I doubt this would cause crash. Probably there would just be bunch of vagons without locomotive.
3. Create a small testing scenario similar as the one above but make sure that the train is in motion. See now if loading such savegame causes the game to crash. If it dies then the game don't know how to deal with moving vagons which are not conected to any locomotive.
4. Create a small secnario with roboport vagon and make sure there are bunch of robots active around it. Save game and disable the mod. I belive thesting of this scenario would be the most difficlut as you would have to save the game at the right time so that one of the robots has roboport vagon set as its destination. If loading of this savegames causes the game to crash then the cause is either the fact that game desen't know how to handle with robot suddenly losing its destination. Or the fact that there might be some robots charging on the roboport vagon which no longer exists. So game doesn't know where to place those robots.

Anywhay if one of the testing scenarios fail still go and test others as I belive all of them might be potential cause for the game crash.

Boogieman14
Filter Inserter
Filter Inserter
Posts: 770
Joined: Sun Sep 07, 2014 12:59 pm
Contact:

Re: [0.10.12] Removing rail mod causes crash to desktop

Post by Boogieman14 »

Those sound like plausible theories. If any of them are true, the solution perhaps shouldn't be sought in fixing the crashes. A better approach might be to add a flag that mod authors can set so their mod is required for a savegame to load. That way the game can present a clear error at load time and the devs won't have to deal with numerous fringe cases (because you just know that something new will pop up at some point in the future). The only concern with such a flag might encourage sloppy coding (instead of coding things in such a way that it's always removable, just set the flag)
I don't have OCD, I have CDO. It's the same, but with the letters in the correct order.

kovarex
Factorio Staff
Factorio Staff
Posts: 8078
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: [0.10.12] Removing rail mod causes crash to desktop

Post by kovarex »

Removing the rail under the train removes the train in the next (0.11.17) version, so it should solve the problem.

Post Reply

Return to “Resolved Problems and Bugs”