Cancelling a LAN session search with SteamSubSystem causes crash

Hi Sean,

First I’m calling ‘FindSessions’ on the onlinesessionptr in C++, then I call CancelFindSessions.

const IOnlineSubsystem* OnlineSub = IOnlineSubsystem::Get();
IOnlineSessionPtr Session = OnlineSub->GetSessionInterface();

Hmm very odd… I’ll try this again tomorrow (still have the project) and see what happens.

When using the Steam Sub System, it’s possible to search for and host ‘LAN’ games as far as the session is concerned.

However, if you try to ‘cancel’ the search while searching for a LAN game, the engine will crash with an access violation. I’m fairly sure this is caused by Line 786 in OnlineSessionInterfaceSteam.cpp, but since there is no logging and the breakpoints aren’t hit I can’t be sure.

Apparently, it’s not possible to use Steam with LAN sessions - so IMO there should be some more clear warnings in place for that upfront, and it shouldn’t allow you to create them.

Hey TheJamsh,

How are you going about cancelling your search? I have a generic project set up for Steam tests so once you can provide that info I can go ahead and give it a shot and see if I can repro.


Just wanted to let you know that I haven’t forgotten about this thread. I’ll be looking into today/over the next couple of days and I’ll let you know what my results are as soon as I can.

Thanks for your patience.

I’ve tested this, and I didn’t experience a crash on my end. I am creating and searching for a LAN match using Steam, and then calling CancelFindSessions() before the search completes.

Could you provide the callstack you’re seeing for the crash as well as the logs?


We are marking this topic as resolved for tracking purposes, as we haven’t heard from you in a few days. If this issue persists, feel free to respond to the thread and provide a project that I can use to reproduce the issue on my end.

Have a great day

Hi Sean,

Coming back to this after quite a while, I’m still getting this crash. I’m on 4.17.1 now. Even though I’m using my own AppID, I can’t find any sessions when using non-lan mode, but when using Lan mode, the game crashes when I try to cancel finding sessions.

I still don’t get a proper callstack because the code is optimized away. I guess I’ll have to try with a full engine build -.-

It does seem as though there is some unguarded code in the Steam OSS though…


Sorry to hear you’re still running into this. I still unfortunately haven’t hit the same issue on my end, but that could definitely be due to differences in our setups.

If you’re able to grab a callstack, logs, or even a test project, that would be fantastic. I’d love to get a ticket in for this if it’s something that requires one.

Thanks for the update, and feel free to leave another comment to reopen this as you discover more info.