A strange ECM error and save game corruption... [SOLVED]

General Modding Information/Questions; support/discussion/questions

Moderator: thunderchero

Forum rules
:idea: Please search before starting new topic. :idea:
There is a good chance it has already been asked.
Post Reply
User avatar
Spocks-cuddly-tribble
Code Master
Code Master
Posts: 1962
Joined: Sun Apr 27, 2008 2:00 am

A strange ECM error and save game corruption... [SOLVED]

Post by Spocks-cuddly-tribble »

ECM - crash without BotF log - windows eventvwr gives error offset 0x46CD1

Code: Select all

004478D1           fmul  ds:tradepopmulti0_05   // sub_447890 trade route credits - shared code
But removing sub_447890 still gives the same error offset? :???:

I suspect a strange data corruption in a saved game file when the klingon AI eliminates the ferengi AI one turn earlier.


Two saved games: (2 -> crash, 1 -> klingons kill ferengi)
saves.zip
(152.68 KiB) Downloaded 44 times

EDIT: Just diagnosed: ECM bug (and possibly other mods?)

Eliminating an empire, with all other races unknown, can crash the game next turn. :???:

So a patch seems to corrupt the gameInfo in this case (known / dead empires bitmask?).

No idea how long determining and fixing said patch will take.

EDIT: Re-downloaded the installer to rule out any editing mess-up on my part and tested all relevant patches I could think of, but to no avail. :dwn:

So any hint/help would be appreciated. :wink:
Last edited by Spocks-cuddly-tribble on Wed Nov 01, 2023 11:55 am, edited 1 time in total.
I don't know how many bugs is too many but that point is reached somewhere before however many in BotF is.
User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 7966
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.

Re: A strange ECM error and save game corruption...

Post by thunderchero »

Spocks-cuddly-tribble wrote: Sun Jul 09, 2023 10:26 am ECM - crash without BotF log - windows eventvwr gives error offset 0x46CD1

Code: Select all

004478D1           fmul  ds:tradepopmulti0_05   // sub_447890 trade route credits - shared code
But removing sub_447890 still gives the same error offset? :???:

I suspect a strange data corruption in a saved game file when the klingon AI eliminates the ferengi AI one turn earlier.


Two saved games: (2 -> crash, 1 -> klingons kill ferengi)

saves.zip


EDIT: Just diagnosed: ECM bug (and possibly other mods?)

Eliminating an empire, with all other races unknown, can crash the game next turn. :???:

So a patch seems to corrupt the gameInfo in this case (known / dead empires bitmask?).

No idea how long determining and fixing said patch will take.

EDIT: Re-downloaded the installer to rule out any editing mess-up on my part and tested all relevant patches I could think of, but to no avail. :dwn:

So any hint/help would be appreciated. :wink:
I just tested saves above on my current ECM install and no crash? :shock:
I even tested on 800 x 600 install and 1366 x 768 install windowed and fullscreen
what am I missing?
User avatar
Spocks-cuddly-tribble
Code Master
Code Master
Posts: 1962
Joined: Sun Apr 27, 2008 2:00 am

Re: A strange ECM error and save game corruption...

Post by Spocks-cuddly-tribble »

thunderchero wrote: Tue Oct 31, 2023 2:20 pmI just tested saves above on my current ECM install and no crash? :shock:
what am I missing?
It's a bit tricky (sporadic glitch). Very strange and the randomness is not related to the RNG = random engine fix (removed for testing).

But you get it quite often in ECM. The point is: This NEVER happens in vanilla! Here is another save:

game8.zip
(34 KiB) Downloaded 32 times
Just end turn twice. Repeat (loading another save in between increased chance for me?) and you should see the issue soon.

---

Testing the random engine fix I found another outdated RNG patch that should be removed from all mods and patch databases (still in ECM):

lost_TTs_after_Invasion.patch
(470 Bytes) Downloaded 33 times
I don't know how many bugs is too many but that point is reached somewhere before however many in BotF is.
User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 7966
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.

Re: A strange ECM error and save game corruption...

Post by thunderchero »

Spocks-cuddly-tribble wrote: Tue Oct 31, 2023 3:50 pm Just end turn twice. Repeat (loading another save in between increased chance for me?) and you should see the issue soon.
in a way this might better discourage save scumming (now it make sense to me)

example if save "a" sector.lst is different size than save "b", this might cause an overrun when file is loaded into memory?

But also suggests memory is not being cleared before saved game is loaded (if memory has saved game loaded already)
User avatar
Spocks-cuddly-tribble
Code Master
Code Master
Posts: 1962
Joined: Sun Apr 27, 2008 2:00 am

Re: A strange ECM error and save game corruption...

Post by Spocks-cuddly-tribble »

Might be, but this special ECM problem also happens in uninterrupted running games without any saving/loading (and even auto-save disabled). :mad: :dwn:

Its very erratic, sometimes it crashes (later) when loading the save directly after starting BotF, sometimes not... :???:
I don't know how many bugs is too many but that point is reached somewhere before however many in BotF is.
User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 7966
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.

Re: A strange ECM error and save game corruption...

Post by thunderchero »

Spocks-cuddly-tribble wrote: Tue Oct 31, 2023 5:37 pm Its very erratic, sometimes it crashes (later) when loading the save directly after starting BotF, sometimes not... :???:
Yes. Its very erratic
problem is I have loaded as you advised 40+ times and not had a single crash yet.
Spocks-cuddly-tribble wrote: Tue Oct 31, 2023 3:50 pm Just end turn twice. Repeat (loading another save in between increased chance for me?) and you should see the issue soon.
it would be interesting using auto/last saves,

save a copy of auto.sav and last.sav on game that does not crash

save a copy of auto.sav and last.sav on game that just crashed

then compare files, if they are the same it is a memory issue?
User avatar
Spocks-cuddly-tribble
Code Master
Code Master
Posts: 1962
Joined: Sun Apr 27, 2008 2:00 am

Re: A strange ECM error and save game corruption...

Post by Spocks-cuddly-tribble »

Thanks for this feedback. Yes, the behavior indicates a hardware RAM issue with my old BotF laptop causing this sporadic bug (pointer patches using virtual RAM locations). Similar reason why Win98 could not run multiple (relocation patched) instances of BotF. I need to doublecheck with another PC.

So this is good news for ECM. :up: Just a few more patches to add/remove (see one example above)...
Last edited by Spocks-cuddly-tribble on Wed Nov 01, 2023 11:33 am, edited 1 time in total.
I don't know how many bugs is too many but that point is reached somewhere before however many in BotF is.
User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 7966
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.

Re: A strange ECM error and save game corruption...

Post by thunderchero »

Spocks-cuddly-tribble wrote: Tue Oct 31, 2023 3:50 pm Testing the random engine fix I found another outdated RNG patch that should be removed from all mods and patch databases (still in ECM):
lost_TTs_after_Invasion.patch
only ECM and UM5 has this patch
Spocks-cuddly-tribble wrote: Tue Oct 31, 2023 7:17 pm Just a few more patches to add/remove (see one example above)....
once you get files and patches together let me know.
currently I have all files/patches applied as of you last PM
User avatar
Spocks-cuddly-tribble
Code Master
Code Master
Posts: 1962
Joined: Sun Apr 27, 2008 2:00 am

Re: A strange ECM error and save game corruption... [SOLVED]

Post by Spocks-cuddly-tribble »

Screenshot from another glitch using the same Laptop: :shock:

great_virtories.png
great_virtories.png (52.34 KiB) Viewed 953 times

Sadly I don't have that save anymore. More than one 'great victory' per turn is not possible in vanilla and ECM (more than 50% of own fleet build cost).


---

I was thinking of changing the starvation event map icon (the rotten plant symbol is kinda unfitting). But the bif2.tga doesn't look good:

starvation.png
starvation.png (4.37 KiB) Viewed 952 times
Btw any clue what the i_aln12.tga was meant for?

icon_tga_s.png
icon_tga_s.png (132.78 KiB) Viewed 952 times
I don't know how many bugs is too many but that point is reached somewhere before however many in BotF is.
User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 7966
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.

Re: A strange ECM error and save game corruption... [SOLVED]

Post by thunderchero »

Spocks-cuddly-tribble wrote: Fri Nov 03, 2023 12:31 pm Btw any clue what the i_aln12.tga was meant for?
alien attack last turn?
User avatar
Spocks-cuddly-tribble
Code Master
Code Master
Posts: 1962
Joined: Sun Apr 27, 2008 2:00 am

Re: A strange ECM error and save game corruption... [SOLVED]

Post by Spocks-cuddly-tribble »

Might be, albeit most monster icon TGAs use the prefix 't_'.

There is also event code for rebellions (shares the 'battle fought' TGA), but of course it's broken in BotF... :mad:
I don't know how many bugs is too many but that point is reached somewhere before however many in BotF is.
User avatar
Flocke
BORG Trouble Maker
BORG Trouble Maker
Posts: 3258
Joined: Sun Apr 27, 2008 2:00 am
Location: Hamburg, Germany
Contact:

Re: A strange ECM error and save game corruption... [SOLVED]

Post by Flocke »

Spocks-cuddly-tribble wrote: Sun Jul 09, 2023 10:26 am ECM - crash without BotF log - windows eventvwr gives error offset 0x46CD1
After having failed to reproduce this with game1.sav and game2.sav and already having successfully fast-forwarded 100 turns with game8.sav, after second load of game8.sav I got same crash:
Ausnahmecode: 0xc0000005
Fehleroffset: 0x00046cd1

Next time I needed 7 tries to reproduce this crash. Note, I still didn't re-install and update to latest version.
But I remember similar load issues with other mods and less frequently even vanilla when I tested editing save games and reloaded them many times.

I'm not going into deeper analysis here. I just wanted to check whether it is reproducable and I might see something obvious.
It is however random and UE doesn't flag any special issues either.
User avatar
Spocks-cuddly-tribble
Code Master
Code Master
Posts: 1962
Joined: Sun Apr 27, 2008 2:00 am

Re: A strange ECM error and save game corruption... [SOLVED]

Post by Spocks-cuddly-tribble »

Flocke wrote: Sat Mar 09, 2024 11:16 amIt is however random and UE doesn't flag any special issues either.
Strange was, I could reproduce the condition (eliminating an empire, all other races unknown to both, can crash the game next turn) only with ECM, but not with vanilla. This got me thinking about the cleanup codes when killing empires, since the hidden intel percentages bug (only one time - also ECM) is such a cleanup failure.

IIRC I removed the only two subject related patches, but this didn't fix the issue in my tests:

- eliminate empire morale omission fix (when killing pop of the last system)
- unremoved space stations fix
I don't know how many bugs is too many but that point is reached somewhere before however many in BotF is.
Post Reply

Return to “General Modding Information/Questions”