Replay corruption
Date: November 05, 2021 10:58AM
Posted by: zifox
Hi,

I have an issue I can't solved at the moment: my replays get corrupted. Max replay length is set to 1h30min.
I've done 4 full races so far and every single replay I load is corrupted: sometime early in the race, sometimes late. My car decides to live it's own life, goes of track an hit a wall, as if it was desynchronised. IA cars are not affected.

Where do these corruptions come from ? Is there anything I can do ?
Re: Replay corruption
Date: November 05, 2021 04:14PM
Posted by: Carl_gpgames
this usually happens if anything in the gp4.exe has been changed (which includes any changes with gp4tweaker and probably gpxpatch as well)



GP Files | GP Videos | Discord: Carl_gpgames#2350
Re: Replay corruption
Date: November 06, 2021 12:46PM
Posted by: zifox
Thanks for the tip.

I did a few tests. The exe I use has no modifications apart from camera positions, so I replaced it by an original one and tried to see if anything changes.
It was the same. I tried with an non-modded install (original cars/tracks), same behavior. Then I tried loading the replay without gpxpatch, and the replay crashes quite quickly, at lap 2 (instead of 12). Maybe gpxpatch is as your say the culprit here, i'll try the opposite next time: do a full race without gpxpatch, and load the replay to see if it makes any difference.
Re: Replay corruption
Date: November 06, 2021 03:36PM
Posted by: Carl_gpgames
you missunderstood me.
if you save a replay, then modify the exe (f. e. cameras or whatever), then that replay want work anymore.
it's not a matter if your exe is original or not, it's just that you must use the exact same exe to play the replay which you used to record it.



GP Files | GP Videos | Discord: Carl_gpgames#2350
Re: Replay corruption
Date: November 06, 2021 06:35PM
Posted by: zifox
Carl_gpgames Wrote:
-------------------------------------------------------
> it's just that you must use the exact same exe to
> play the replay which you used to record it.

hum ok. But that does not work either. I was always using the same exe to read the replay, something without even quitting the game. I'm wondering if it's also corrupted in memory, or only when you load a save game. I'll check that out next time.
Re: Replay corruption
Date: November 06, 2021 06:50PM
Posted by: Carl_gpgames
yes, if you change anything in tweaker (or even) gpxpatch (which works with shared memory), it might corrupt replays (and hotlaps). not always and not for all values, but it might.



GP Files | GP Videos | Discord: Carl_gpgames#2350
Re: Replay corruption
Date: November 08, 2021 10:47AM
Posted by: zifox
More tests => even more questions.

I have two versions of the EXE:
- one pristine (debug version 1.02)
- one modified (debug version with altered cameras & wheel & helmet positions. No modified in performances/names)

Obviously, i'd like to run the game with at least correct helmet positions. So first thing to check, running without gpxpatch.

I loaded my season savegame (which was saved during qualify) using the pristine exe, and started the race. I had a huge bug: no IA car was moving. :-O
I restarted with the modified exe, same behavior.

I even loaded the savegame with an unmodified install, same issue.

If I start with gxpatch, whatever the exe, it works. What the hell is gpxpatch doing that could break the AI like that ? :-o
Thing is, it's broken only when I load my season. No issue when launching a single race.

Anyway I ran a partial race with the pristine exe (saved at 2/3 of a full race), launched the replay, and it broke after 20 laps. (roughly half of the replay).

Also I realized that camera positions are saved in the savegame !

edit: i loaded a previous savegame without gpxpatch (autosave at end of previous race), no issue to load it and finish the race. I went to the next event, did the qualif session and started the race: no issue either. Ok... (I)
Tried to do the race, go a CTD after one lap.



Edited 1 time(s). Last edit at 11/08/2021 10:37PM by zifox.
Re: Replay corruption
Date: November 10, 2021 10:27AM
Posted by: zifox
Ok so I restarted the race, with gpxpatch this time. Had a few crashes mi-race though.

The replay is corrupted at lap 2, which coincides roughly with the moment the game crashed when I tried to race without gpxpatch. I'm wondering if gpxpatch might to able to catch/prevent crashes, but in these case the replay would get corrupt ? Is it possible ? Could the exception handling in gpxpatch do that ?

I did a few others tests to check the compatibility of my executables: I can load/save from any exe and load the save during the race with another one without any glitch/AI issue. (that means pristine exe from pristine install / pristine exe from modded install / modified exe from modded install)

Which is why I totally lost: I really don't understand the stalled AI bug I got earlier.

Anyway, given that the game tends to crash often (didn't manage a full race without a crash), I will have to keep gpxpatch running and forget about watching replays.



Edited 2 time(s). Last edit at 11/10/2021 10:28AM by zifox.
Re: Replay corruption
Date: November 14, 2021 11:29PM
Posted by: zifox
After a few others tests, it's clear: I can't manage more than 5 laps without a crash... unless I play with gpxpatch. That's so weird.

And I think I managed to understand why replays are corrupted. I get no corruption if I watch a replay which is written in memory while I play (ie not loaded from a file), replays get corrupted when saving/loading only.

I suspect that some floating values are not serialized correctly, meaning that we have rounded / truncated / invalid values when watching the replay after loading a file. That could explain what I see each time: a slight change in direction at one moment, which offsets the rest of the trajectory.
Re: Replay corruption
Date: November 18, 2021 12:13PM
Posted by: livejackass
I don't know if everyone goes through this, but 10 years ago I gave up full replays of the race for problems like this, which I never found solution. Yesterday I got a certain success in the alternative to this, using a free program called OBS STUDIO, I managed to make this recording in streaming (hd thanks). It's not perfect, but you can try it :) Good luck.

[youtu.be]
Sorry, only registered users may post in this forum.

Click here to login

Maintainer: mortal, stephan | Design: stephan, Lo2k | Moderatoren: mortal, TomMK, Noog, stephan | Downloads: Lo2k | Supported by: Atlassian Experts Berlin | Forum Rules | Policy