# Race condition crash during FOnlineSubsystemModule startup 

**URL:** <https://forums.unrealengine.com/t/race-condition-crash-during-fonlinesubsystemmodule-startup/2726898>\
**Category:** Platform & Builds\
**Tags:** unreal-engine, Epic-Pro-Support, question\
**Created:** [April 28, 2026, 5:17pm UTC](https://forums.unrealengine.com/t/race-condition-crash-during-fonlinesubsystemmodule-startup/2726898 "2026-04-28T17:17:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous-edc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous-edc](https://forums.unrealengine.com/u/anonymous-edc)\
**Post date:** [April 28, 2026, 5:17pm UTC](https://forums.unrealengine.com/t/race-condition-crash-during-fonlinesubsystemmodule-startup/2726898/1 "2026-04-28T17:17:15Z")

</div>

I can repro in a debug build by going into OnlineSubsystemTypes and removing the UE\_BUILD\_SHIPPING condition for `IsUniqueIdLocal`, then set a break point in `FOnlineSubsystemModule::ParseOnlineSubsystemName`. During module startup this causes enough of a stall on the game thread so that `FOnlineAsyncTaskManagerSteam::OnlineTick` processes callbacks before all OSS are ready. More specifically the callback `FOnlineAsyncTaskManagerSteam::OnUserStatsReceived` runs and tries to log a message which eventually, via `IsUniqueIdLocal` crashes because it checks `IOnlineSubsystem::DoesInstanceExist` where `FModuleManager::GetModuleChecked\<FOnlineSubsystemModule\>(“OnlineSubsystem”);` returns null reference because that subsystem module is loaded but not ready (a condition that returns a nullptr in `FModuleManager::GetModule`).

[Attachment Removed]

---

<div class="post-metadata">

**Author:** ![anonymous-edc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous-edc](https://forums.unrealengine.com/u/anonymous-edc)\
**Post date:** [April 28, 2026, 5:17pm UTC](https://forums.unrealengine.com/t/race-condition-crash-during-fonlinesubsystemmodule-startup/2726898/2 "2026-04-28T17:17:19Z")

</div>

**Steps to Reproduce**  
During game launch (shipping build), specifically in module startup for FOnlineSubsystemModule, we get a crash. What I’ve found is that the native OSS (Steam) starts up first, and `FOnlineAsyncTaskManagerSteam::OnlineTick` starts getting called on a non-gamethread. In `FOnlineAsyncTaskManagerSteam::OnlineTick` as part of processing a callback, I see that it eventually calls out to `IsUniqueIdLocal` which then crashes in `IOnlineSubsystem::DoesInstanceExist` because it eventually tries to use an online subsystem module that isn’t ready (see `FModuleManager::GetModuleChecked\<FOnlineSubsystemModule\>(“OnlineSubsystem”)`. This is pretty easy to repro by stalling the game thread just after the native OSS has started up. Going into DefaultEngine.ini and setting `bLoadNativeOSSBeforeDefault` to false prevents the crash, but we don’t want that. Curious if there is some other workaround or maybe we have something configured in correctly? Another fix I found was to go into `FOnlineAsyncTaskManagerSteam::OnlineTick` and early out until `FModuleManager::Get().GetModule(“OnlineSubsystem”);` returns non-nullptr.

[Attachment Removed]

---

<div class="post-metadata">

**Author:** ![WhiteDwarf144](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@WhiteDwarf144](https://forums.unrealengine.com/u/WhiteDwarf144)\
**Post date:** [May 8, 2026, 3:35pm UTC](https://forums.unrealengine.com/t/race-condition-crash-during-fonlinesubsystemmodule-startup/2726898/3 "2026-05-08T15:35:23Z")

</div>

The early out using GetModule is a good way to delay processing any steam callbacks until the module is ready. I’ve created a bug report for us to fix this in the general case in a future release.

[Attachment Removed]
