Page 1 of 1

[1.1.91] Crash in EntityWithOwner.cpp: "this->unitNumber == 0 was not true"

Posted: Thu Sep 21, 2023 7:26 pm
by iperfectfurius
This save contains approximately 30 mods.
Apparently, this save no longer loads. I searched the forums, but no exact error has been found.
I've played this save for around 50 hours, and I don't have any clue what to do.

But this error, I think, has happened to me 2 times before, but a simple restart was enough to make it work.
What I have done:

Checked the configuration of the mods.
Disabled large mods and transportation-related mods.

How i can know if the bug is from base game or any mods?

If you can help me in anything would be gratefull.

Re: [1.1.91] Crash in EntityWithOwner.cpp: "this->unitNumber == 0 was not true"

Posted: Fri Sep 22, 2023 1:21 am
by Rseding91
Do you have any way to take a new save file and get it into this broken state? This kind of error typically indicates memory corruption and or bad hardware.

Re: [1.1.91] Crash in EntityWithOwner.cpp: "this->unitNumber == 0 was not true"

Posted: Fri Sep 22, 2023 2:21 pm
by iperfectfurius
I don't know what to do to reproduce this state. New games seem to work as normal, but this save and all autosaves are broken. Even with all mods disabled, they don't load, and I don't know if that is normal. I tested a little with a new scenario, trying to remember what I was doing, but it always seems to load well.

I tried it with another PC, and the same issue occurred. I think it's 100% the save, but I have no idea if it's the mods or the Factorio base game. Changing versions didn't change anything.

Can I try other things?

But one thing is strange; I remember that I put a save replay when starting a new game, but Factorio says no record is available.

Re: [1.1.91] Crash in EntityWithOwner.cpp: "this->unitNumber == 0 was not true"

Posted: Fri Sep 22, 2023 2:36 pm
by Loewchen
iperfectfurius wrote:
Fri Sep 22, 2023 2:21 pm
I tried it with another PC, and the same issue occurred. I think it's 100% the save, but I have no idea if it's the mods or the Factorio base game. Changing versions didn't change anything.
The save file is corrupted, nothing you do with the corrupted save is relevant in regards to finding out how it got corrupted in the first place.
iperfectfurius wrote:
Fri Sep 22, 2023 2:21 pm
Can I try other things?
You can try what ever you can come with as long as it results in a reliable method to corrupt a fully working non corrupted save file. Nothing you do with the already corrupted save is of value.