So for some reason when I call ServerTravel game it crashes the game with this error: UE - Pastebin.com
I’ve tried looking around but so far I have had no luck figuring out why its crashing.
I’m running on the promoted build from yesterday (7-26-15).
Here is my code inside of the PlayerController that makes the call:
if (Role == ROLE_Authority)
FString UrlString = TEXT("TestWorld?Listen");
GetWorld()->ServerTravel(UrlString, true, false);
// Add check to make sure this person is in fact the host of the game
Something odd that I noticed what that if I set the 3rd parameter to true (bShouldSkipGameNotify) then it goes into my new map new problem. Though obviously this won’t work since then the clients don’t know to connect. I also tried using the GetWorld()->SeamlessTravel() function and that works as well though again only the server travels there, the rest of the clients stay put. As a workaround I guess I could try and just have the server travel first and then notify the clients to do the same, but its not ideal.
I’m using seamless travel to do all of this, though I did try without seamless travel enabled and got the same result.
Thanks for the report! I’ve assigned a member of our support team to look into this issue, and they’ll post here if they need any additional information. Generally it’s not ideal to develop in latest promoted or master branch, and it’s very possible this will be caught by our QA passes in short order, but I do appreciate you bringing it to our attention early.
I wasn’t able to find this crash report in our system, though; did you hit Send after the crash occurred?
Thanks! I actually forgot to send the crash report, I just sent it now though. Yeah normally I wouldn’t be on this version however I ended up needing some of the features that were in the promoted branch back about a month ago and have been updating occasionally for fixes so bugs and stuff. I updated the the most recent promoted in hopes of fixing the issue I just ran into.
It appears that some variable is not being set properly before being called. In the GameMode.cpp file where the function ProcessServerTravel() is called could you add a breakpoint to line 922 ( if(URL.ToUpper().Contains(TEXT("?RESTART"))) )? Then start the game and server travel. Let me know if this triggers the breakpoint and if so, step through code to see what the NextMap variable and URL values are set to.
Ok so URL is set to L"TestWorld" and after stepping through NextMap becomes L"TestWorld" as well at line 940.
I went through it some more and it eventually breaks on its own at line 944: UE_LOG(LogGameMode, Fatal, TEXT(“ProcessServerTravel: %s: Short package names are not supported.”), *URL);
Is there a specific way that you have to handle opening maps when using server travel? My urls is just “TestWorld” but does it need the path like “Maps/TestWorld” (I did try moving the TestWorld into my root folder as well as the folder of the current map but no difference. I noticed that the IsShortPackageName() simply checks to see if there is a “/” is in the URL. I tried to add “/” to the URL and it did stop crashing but instead would just immediately go to the default level. I’m assuming I’m missing something here since serverTravel is the only type of travel that seems to be having this issue.
So after stepping through the code I figured out what was going on. Essentially I wasn’t using a long package name to tell it where to find the map. After I changed the variable UrlString to “/Game/Maps/TestWorld” it worked. I think my confusion came from the fact that if you aren’t doing a ServerTravel this is unnecessary. For example when I load into my lobby world I just use the open blueprint node and then on the client I use join session. I’m not sure if this was intended but that appears to be whats going on from what I can tell.
Sorry I couldn’t figure this out earlier I didn’t know how to use breakpoints with standalone and so after figuring that out I was able to see more clearly what was going on.
Thanks again, and if this is some type of bug after with only long package names working i’ll be glad to help out with gathering any more information you might need.