oculus-samples / Unreal-SharedSpaces

Oculus multiplayer showcase demonstrating basic multiplayer functionality in Unreal, including Oculus Platform Social APIs, Photon as the transport layer and UE replication. The Oculus SDK and other supporting material is subject to the Oculus proprietary license.
Other
138 stars 65 forks source link

Ported over code, crashing when either one of us accepts the invite #8

Closed dav01d closed 2 years ago

dav01d commented 2 years ago

Hi everyone!

The short version: me and my co-developer are crashing out whenever the opposite accepts the invite to join our lobby. A sends an invite to B. A, who is in the game, crashes the moment B accepts the invite and joins the lobby. Oof!

What we did:

Ported over Plugins and Source, no issues in compiling. Photon had it's Appid set, and merged the configs with ours. This includes the use of the Photon Net Driver.

We migrated the GameMode and GameInstance, and recreated the Character's Set Character Destination and Set Character Master Client Status code as we already had a functioning character in our game.

Also migrated the DebuggingPanel because that's really damn useful. We recreated Invite, Roster and QueryFriends as the code was simple enough to use and we had a basic UI already ingame.

Here's a screenshot of the DebuggingPanel in our test level:

scrcpy_ZrhKQzWzQK

The level itself has two spawn points near each other:

UE4Editor_fyNOVWG2lf

We can open the invite panel and invite each other, but we crash whenever the other person joins. The GameMode and GameInstance are the same code, so theoretically the logic should hold up.

App is distributed via the ALPHA channel to the other developer.

Any ideas?

pr0-zac commented 2 years ago

Can you share a log file or log output from the crash?

Have you setup the destinations and completed the data use checkup in the developer dashboard? https://github.com/oculus-samples/Unreal-SharedSpaces/blob/main/Documentation/SharedSpaces.md#d-oculus-application-configuration

dav01d commented 2 years ago

I will grab logs for you! I was unsure if logs would be generated because I had to use Shipping as a build configuration. I will see if we can generate them today.

DUC and Destinations: It's in Pending Review, but to be safe I made sure the map was always Lobby, regardless if the Json failed to get back the Destination data (since I was worried that it's been in Review for a few weeks now...)

dav01d commented 2 years ago

https://storage.googleapis.com/maketheory-send/11142d0e-c01a-49bd-9e36-e40f207f6446.mp4

Here's a video of me opening and disconnecting the other user.

I just found how to make a log while Shipping. I'll generate that now and send it as soon as I can

dav01d commented 2 years ago

Drilling down. It seems we are failing here?

scrcpy_HN8g9MjaOI

Log: Me (who didn't crash) https://storage.googleapis.com/maketheory-send/1988a62e-edde-4be0-83b2-04b27bafb91b.log Line 2506 is where the mpNetDriver is null.

Codeveloper (who did crash when I accepted invite): https://storage.googleapis.com/maketheory-send/46b9ec1d-887d-4625-ae65-daf2bb96b4bb.log

Video: https://www.dropbox.com/s/qrtavxo6t1kdlza/scrcpy_vPijk0fFzj.mp4?dl=1

Also, Photon does see traffic it seems:

chrome_S4W3lzAnhb
dav01d commented 2 years ago

After two days of reading through everything, we're going to try another way of porting (bringing our code/assets INTO SharedSpaces) as we're having a large problem bringing SSpaces into ours. Compiled SharedSpaces and it works fine. Oof!

dav01d commented 2 years ago

Ok! Progress updated. Ported our content into SharedSpaces. No changes to SharedSpaces code, plugin, or blueprints.

Now we are getting this: image

Curiously we built SharedSpaces and was able to join each other just fine. Clearly there may be something from one we ported over?

We are using VR Expansion, but none of the AdvancedSessions stuff. Still on v38 branch from 4.27

dav01d commented 2 years ago

Hi everyone! Just another update:

  1. We were able to migrate over C++ from SharedSpaces into our project successfully (use https://inu-games.com/2020/07/23/how-to-merge-ue4-c-projects-by-adding-modules/ as a guide if you've never done this before).
  2. However we either crash out the moment someone joins us (the first set of logs above). Sometimes we'd get a Lobby session not found (post immediately above).
  3. So instead we went in reverse, we migrated all of our assets and code into SharedSpaces. This proved to be successful. To make things easier to match our git repository, we renamed everything using UE4 Project Renamer (https://www.artstation.com/marketplace/p/jAaO/unreal-engine-4-project-renamer does a lot of the leg work but you need to check especially namespaces)
  4. Finally, we hit upon something: We are using VR Expansion (https://vreue4.com/documentation) to power our movement, gripping etc. VRE comes with Advanced Sessions and here in we believe lies the problem. We haven't gotten there yet, but we believe enable the Advanced Sessions plugin is somehow conflicting with whatever Photon or Oculus Online Subsystem is doing. Not really sure, because we are adding one piece at a time to see what breaks.

So TLDR: We cannot find out why the log issues above exists, but our hunch is that VRE's Advanced Sessions is conflicting with this project. Will report back if we find out more.

els-oculus commented 2 years ago

It looks like your Oculus Online Subsystem is enabled. Try this: 1) In the editor, go to Edit > Plugins and uncheck Oculus Online Subsystem. 2) In your DefaultEngine.ini, you should have [OnlineSubsystemOculus] bEnabled=false

The reason is that our new subsystem replaces the older Oculus Online Subsystem. If you have both enabled, you get two conflicting message pumps.

dav01d commented 2 years ago

Hey @els-oculus thanks for your reply! I went ahead and loaded my DefaultEngine on that branch that wasnt allowing us to connect. Sadly OnlineSubsystemOculus was already false. However the plugin was On! So you may be right. Thanks for the reply! I think we can close this issue. :)