[boskid][0.18.15] Crash on save: "incomingBlock->getOutboundSignals().count(const_cast<RailSignalBase*>(this))" failed
-
Mat46
- Burner Inserter

- Posts: 6
- Joined: Sun Jul 07, 2019 2:14 pm
- Contact:
[boskid][0.18.15] Crash on save: "incomingBlock->getOutboundSignals().count(const_cast<RailSignalBase*>(this))" failed
Hello
Il have a intermittent problem in the game on manual save or autosave.
In the log, i see 2 errors :
- the first with visual studio 2017
- the second with RailSignalBase
Is this a problem with a mod or something else ?
Thank you for your answer.
Mat
Factorio Log : Mod List : My save :
Il have a intermittent problem in the game on manual save or autosave.
In the log, i see 2 errors :
- the first with visual studio 2017
- the second with RailSignalBase
Is this a problem with a mod or something else ?
Thank you for your answer.
Mat
Factorio Log : Mod List : My save :
-
Loewchen
- Global Moderator

- Posts: 10970
- Joined: Wed Jan 07, 2015 5:53 pm
- Contact:
Re: [0.18.15] Crash on save: "incomingBlock->getOutboundSignals().count(const_cast<RailSignalBase*>(this))" failed
If you have repeated unrelated crashes you can not reliably reproduce then the issue is your hardware/OS/driver and not the game.
-
Mat46
- Burner Inserter

- Posts: 6
- Joined: Sun Jul 07, 2019 2:14 pm
- Contact:
Re: [0.18.15] Crash on save: "incomingBlock->getOutboundSignals().count(const_cast<RailSignalBase*>(this))" failed
Ok, i check this.
Thank you
Mat
Thank you
Mat
-
Loewchen
- Global Moderator

- Posts: 10970
- Joined: Wed Jan 07, 2015 5:53 pm
- Contact:
Re: [0.18.15] Crash on save: "incomingBlock->getOutboundSignals().count(const_cast<RailSignalBase*>(this))" failed
I'd start with: https://www.memtest.org/ let it run for several complete loops or until an error.
-
Mat46
- Burner Inserter

- Posts: 6
- Joined: Sun Jul 07, 2019 2:14 pm
- Contact:
Re: [0.18.15] Crash on save: "incomingBlock->getOutboundSignals().count(const_cast<RailSignalBase*>(this))" failed
Hello
I run Memtest 3 times in the row (for the moment 0 errors). I will continue the test in the next week.
For info, my pc have 5 month. I changed everything except the graphics card and 2 hard drives. (PC Assembled).
I checked all the update for windows, drivers, .. and all is ok.
I uninstalled all versions of visual basic and installed only visual basic 2019 -> Same Problem.
I uninstalled factorio and reinstalled -> Same Problem.
I didn't have the problem in previous versions.
I noticed that I make a manual backup right after loading my save, I don't have the problem.
If I start playing for 5 minutes and save, I have the bug.
I'm going to do other tests by deactivating mods
Thank You
Mat
I run Memtest 3 times in the row (for the moment 0 errors). I will continue the test in the next week.
For info, my pc have 5 month. I changed everything except the graphics card and 2 hard drives. (PC Assembled).
I checked all the update for windows, drivers, .. and all is ok.
I uninstalled all versions of visual basic and installed only visual basic 2019 -> Same Problem.
I uninstalled factorio and reinstalled -> Same Problem.
I didn't have the problem in previous versions.
I noticed that I make a manual backup right after loading my save, I don't have the problem.
If I start playing for 5 minutes and save, I have the bug.
I'm going to do other tests by deactivating mods
Thank You
Mat
-
Mat46
- Burner Inserter

- Posts: 6
- Joined: Sun Jul 07, 2019 2:14 pm
- Contact:
Re: [0.18.15] Crash on save: "incomingBlock->getOutboundSignals().count(const_cast<RailSignalBase*>(this))" failed
Hello
I think i found the problem.
The problem comes from the "Train Construction Site" mod. If I put a rail signal next to the block (see the photo attached), I have the problem.
I will contact the modder to tell him the problem.
Thank you
Mat
I think i found the problem.
The problem comes from the "Train Construction Site" mod. If I put a rail signal next to the block (see the photo attached), I have the problem.
I will contact the modder to tell him the problem.
Thank you
Mat
-
Loewchen
- Global Moderator

- Posts: 10970
- Joined: Wed Jan 07, 2015 5:53 pm
- Contact:
Re: [0.18.15] Crash on save: "incomingBlock->getOutboundSignals().count(const_cast<RailSignalBase*>(this))" failed
Mods generally should not be able to cause crashes so this should still be fixed game side. Is the save you provided the save you can reproduce this with?
-
Mat46
- Burner Inserter

- Posts: 6
- Joined: Sun Jul 07, 2019 2:14 pm
- Contact:
Re: [0.18.15] Crash on save: "incomingBlock->getOutboundSignals().count(const_cast<RailSignalBase*>(this))" failed
Hello
Yes, this is the save with which we can reproduce the problem.
I tested it several times with an automatic and manual backup.
Thank You
Mat
Yes, this is the save with which we can reproduce the problem.
I tested it several times with an automatic and manual backup.
Thank You
Mat
-
dpacbach
- Inserter

- Posts: 40
- Joined: Sun Apr 22, 2018 1:09 am
- Contact:
Re: [0.18.15] Crash on save: "incomingBlock->getOutboundSignals().count(const_cast<RailSignalBase*>(this))" failed
"incomingBlock->getOutboundSignals().count(const_cast<RailSignalBase*>(this))" failed
note to devs... const_cast is a code smell!
-
Rseding91
- Factorio Staff

- Posts: 17364
- Joined: Wed Jun 11, 2014 5:23 am
- Contact:
Re: [0.18.15] Crash on save: "incomingBlock->getOutboundSignals().count(const_cast<RailSignalBase*>(this))" failed
And yet, it doesn't matter.dpacbach wrote: Wed Apr 22, 2020 3:07 am"incomingBlock->getOutboundSignals().count(const_cast<RailSignalBase*>(this))" failed
note to devs... const_cast is a code smell!
If you want to get ahold of me I'm almost always on Discord.
- boskid
- Factorio Staff

- Posts: 4788
- Joined: Thu Dec 14, 2017 6:56 pm
- Contact:
Re: [boskid][0.18.15] Crash on save: "incomingBlock->getOutboundSignals().count(const_cast<RailSignalBase*>(this))" fail
Ok, after wasting too much time trying to find a nice solution i went berserk and fixed it the hard way:
- as stated in 86385, every rail signals will have to have collision masks that collide with each other to prevent multiple rail signals from being placed on the same tile.
- when trying to build a rail signal not on a tile center, the rail signal build position will be changed to be on a tile center (aka floor(x)+0.5)
- flag "placeable-off-grid" on any rail signal will be ignored.
- rail signal collision box is hardcoded to {{-0.2, -0.2}, {0.2, 0.2}} to prevent defining collision box that would not contain a {0,0} point inside preventing multiple signals at the same position from colliding with each other. This is also to make sure signal will be properly found when looking for a too-close signal on adjacent tile.
- if by any chance (or using editor's clone or scripted clone without snap-to-grid) a rail signal would land not on a tile center, it will not be considered valid so it will not bind to the rails
- all the saves from before 1.1.0 will have rail segments recomputed so if there are any signals not on a tile center, they will detach from rails immediately.
Unfortunately there are some assumptions that are important for rail signals logic to work so i will not remove any of those restrictions.
- as stated in 86385, every rail signals will have to have collision masks that collide with each other to prevent multiple rail signals from being placed on the same tile.
- when trying to build a rail signal not on a tile center, the rail signal build position will be changed to be on a tile center (aka floor(x)+0.5)
- flag "placeable-off-grid" on any rail signal will be ignored.
- rail signal collision box is hardcoded to {{-0.2, -0.2}, {0.2, 0.2}} to prevent defining collision box that would not contain a {0,0} point inside preventing multiple signals at the same position from colliding with each other. This is also to make sure signal will be properly found when looking for a too-close signal on adjacent tile.
- if by any chance (or using editor's clone or scripted clone without snap-to-grid) a rail signal would land not on a tile center, it will not be considered valid so it will not bind to the rails
- all the saves from before 1.1.0 will have rail segments recomputed so if there are any signals not on a tile center, they will detach from rails immediately.
Unfortunately there are some assumptions that are important for rail signals logic to work so i will not remove any of those restrictions.