question

jasonallen avatar image
jasonallen asked

What call does the Mock VM make when it switches to active?

My server is launching properly and gets to "CurrentGameState - StandingBy" without any problems. However, when the heartbeat reaches the threshold "NumHeartBeatsForActivateResponse" set in MultiplayerSettings.json, it crashes. The server logs show everything working up until that point and then crashing suddenly (without any info).

So in order to further debug I need to know what operation the Mock VM is performing when it activates the server. Is there a specific API call that gets made? Is it expecting the server to make an API call before that threshold?

I'm following the guide here:
https://docs.microsoft.com/en-us/gaming/playfab/features/multiplayer/servers/locally-debugging-game-servers-and-integration-with-playfab

apis
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Brent Batas (Lisk) avatar image Brent Batas (Lisk) commented ·

for what it's worth, I experienced the same thing (using GSDK samples and that tutorial). Don't know a solution yet :(

0 Likes 0 ·

1 Answer

·
Citrus Yan avatar image
Citrus Yan answered

Hi Jason, there is no specific public APIs call got made as far as I am aware, all the executions are done within the MockVmAgent.exe. And I don’t think it’s expecting the server to make an API call before that threshold. While we were trying to reproduce your issue, strange things happened to us too, we may have encountered the same issue as you did. In our testing, we received several "Standingby" heartbeat and crashed without any info. And I am wondering did you encounter this issue with the servers deployed in the cloud or just while locally debugging? Can you provide us with some more details about your issue such as logs before the crash happened? Anything that is helpful for us to track down this issue. We will discuss it with our team about it, any updates will let you know, thanks for your feedback.

5 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

jasonallen avatar image jasonallen commented ·
Here is the logstack when I attach my debugger: -vmlogstack.txt
It appears to be something in the SDK which is trying to read a JSON file. Because it's an internal library (private) I can't debug any further. Hopefully you guys are able to figure out more.
0 Likes 0 ·
-vmlogstack.txt (1.7 KiB)
jasonallen avatar image jasonallen jasonallen commented ·

Digging into the JSON libraries, I believe this is the line causing the program to terminate:

JSON_ASSERT( type_ == stringValue );
0 Likes 0 ·
jasonallen avatar image jasonallen commented ·

In the actual cloud, our servers are activating okay. We are able to launch them and connect with them and complete the game loop. This is ONLY occurring for the mock vm client.

0 Likes 0 ·
Citrus Yan avatar image Citrus Yan jasonallen commented ·

Hi Jason, what’s the version of your GSDK nugget package? We tried to upgrade com.playfab.csharpgsdk from 0.9.190509 to 0.9.190516, after that everything worked fine. We assume there is something wrong in the SDK although we cannot identify exactly where the problem is. Anyway, if you are using the old version of GSDK, you could try to upgrade it to see if it solves your issue. Any issues let us know.

1 Like 1 ·
jasonallen avatar image jasonallen Citrus Yan commented ·

I'm using C++, so I updated to version 0.7.190715 for that SDK and the mock vm now properly switches to activating!

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.