Network Failure & Drop Simulation
Stress-testing download resumability, retry state machines, and graceful failure handling under severe network loss.
Table of Contents
- The Hostile Reality of Player Networks
- Step 1: Crafting the “Subway Tunnel” Fault Profile
- Step 2: Running the Rehearsal
- Step 3: Capturing Evidence with a Repro-Pack
The Hostile Reality of Player Networks
In development environments with high-speed fiber internet, Addressables downloads almost never fail. In the real world, your players download updates:
- On crowded cellular towers with 800 ms latency spikes.
- On subway trains passing through tunnels with total socket resets.
- Behind restrictive hotel or airport captive portals that intercept HTTP streams.
This workflow explains how to use PatchProof’s Fault Profiles to harden your game’s networking code.
Step 1: Crafting the “Subway Tunnel” Fault Profile
- Open
Tools > PatchProof > Origin & Fault Profiles. - Click “New Fault Profile” and name it
SubwayTunnel_Drop. - Configure Rule 1 (Socket Reset):
- Fault Type:
ConnectionDrop - URL Pattern:
.*_assets_.*\.bundle(Targets primary gameplay bundles). - Trigger Byte Offset:
262144(Drops the connection after exactly 256 KB transferred).
- Fault Type:
- Configure Rule 2 (High Latency Retry):
- Fault Type:
LatencyDelay - URL Pattern:
.* - Delay Milliseconds:
1500(Forces all subsequent requests to wait 1.5 seconds).
- Fault Type:
- Click “Save Fault Profile”.
Step 2: Running the Rehearsal
- Open
Tools > PatchProof > Rehearsal Room. - Set your candidate update pairing.
- In the Active Fault Profile dropdown, select
SubwayTunnel_Drop. - Click “Run Selected Scenario” (targeting the
FreshCache_ConnectionDroptile).
What You Should Observe in the Client Binary:
- The client begins downloading the bundle.
- The download progress bar reaches ~15% and stops.
- The local origin closes the TCP socket.
- Good Client Behavior:
- The client catches the
ConnectionError. - A non-blocking retry indicator appears: “Connection interrupted. Retrying in 3… 2… 1…”
- The client initiates a new request with an HTTP
Range: bytes=262144-header. - The download finishes, and the asset loads cleanly.
- The client catches the
- Bad Client Behavior (Bug Discovered!):
- The game freezes completely on the main thread.
- An unhandled
NullReferenceExceptionis logged. - The client crashes to desktop or enters an infinite reload loop.
Step 3: Capturing Evidence with a Repro-Pack
If your game fails the test:
- Immediately click “Export Repro-Pack” on the failed tile in the Rehearsal Room.
- The exported archive contains the exact
SubwayTunnel_Dropprofile and the request trace showing the socket abort at byte 262,144. - Hand the package to your gameplay networking engineer to implement proper retry backoff logic.