Jump to content

Crashes and PTs


DoctorB0NG

Recommended Posts

After hearing that accessing purchase terminals within the last 30 seconds of a game increases the chance of crashing, I decided to collect some data regarding the matter. Here are my findings:

There are four categories:

1) Crash after accessing terminal

2) Crash without terminal

3) No Crash after accessing terminal

4) No Crash without terminal

I collected 233 data points (played 233 games, yes I know that's a lot)

Categories:

1) 58 => 24.89%

2) 50 => 21.46%

3) 7 => 3.00%

4) 118 => 50.64%

Summary: If you access a purchases terminal within the last 30 seconds of a game, there's roughly a 3% chance that you won't crash. If you don't access a purchase terminal before the games ends, 1 out of 4 times you will crash.

Link to comment
Share on other sites

You want a full explanation here you go.

This was from the private testing section of the forums StealthEye made this discovery

RenX_Game.Rx_BuildingAttachment_PT.CloseMenu calls GFxMoviePlayer.Close(true). That function unloads any resources associated with the GFxMoviePlayer, and sets flag RF_PendingKill on the Rx_GFxPlayerMenu object. That means that it will be removed in the next garbage collection cycle, which by default runs every 30 seconds. When the garbage collector runs, it removes the Rx_GFxPlayerMenu and sets Rx_HUD.PTMovie = None. So, if the garbase collector runs at least once after a PT is accessed, no crash will occur. However, if the game ends when the garbage collector has not yet been called, Rx_HUD::PTMovie is still set to the already unloaded, pending to be deleted GFxPlayerMenu. The code in PostRender sees that Rx_HUD::PTMovie is still set, and calls ClosePTMenu. But because it was already unloaded, this causes a crash.

So, the exact reproduction steps are:

- close a PT

- end the game before the garbage collector runs (if you are fast, that should usually be true)

The fix is probably to ensure that Rx_HUD.PTMovie is always set to None after Close(true) is called. Adding "RxHUD.PTMovie = None;" to ClosePTMenu seems to work fine. It is possible that the same issue exists for one or more other screens as well, but I could not find any indication thereof.

Workaround: Until there is a fix, players should avoid PTs the last 30 seconds of the game. ;)

Link to comment
Share on other sites

You want a full explanation here you go.

This was from the private testing section of the forums StealthEye made this discovery

RenX_Game.Rx_BuildingAttachment_PT.CloseMenu calls GFxMoviePlayer.Close(true). That function unloads any resources associated with the GFxMoviePlayer, and sets flag RF_PendingKill on the Rx_GFxPlayerMenu object. That means that it will be removed in the next garbage collection cycle, which by default runs every 30 seconds. When the garbage collector runs, it removes the Rx_GFxPlayerMenu and sets Rx_HUD.PTMovie = None. So, if the garbase collector runs at least once after a PT is accessed, no crash will occur. However, if the game ends when the garbage collector has not yet been called, Rx_HUD::PTMovie is still set to the already unloaded, pending to be deleted GFxPlayerMenu. The code in PostRender sees that Rx_HUD::PTMovie is still set, and calls ClosePTMenu. But because it was already unloaded, this causes a crash.

So, the exact reproduction steps are:

- close a PT

- end the game before the garbage collector runs (if you are fast, that should usually be true)

The fix is probably to ensure that Rx_HUD.PTMovie is always set to None after Close(true) is called. Adding "RxHUD.PTMovie = None;" to ClosePTMenu seems to work fine. It is possible that the same issue exists for one or more other screens as well, but I could not find any indication thereof.

Workaround: Until there is a fix, players should avoid PTs the last 30 seconds of the game. ;)

I was aware one of the devs found it and posted it before, but I was negligent in quoting the original post and poster about this 'fix'. Instead, I advocated in most threads that avoiding the PT in the last 30 seconds to be helpful in preventing a crash while also mentioning a dev mentioned that before.

In future posts, I'll try to quote him on it and/or referring to this post

Link to comment
Share on other sites

  • 4 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...