Server Travel crashing game

So for some reason when I call ServerTravel game it crashes 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 promoted build from yesterday (7-26-15).

Here is my code inside of PlayerController that makes call:

void APlayerControllerLobby::StartGame()
{
	if (Role == ROLE_Authority)
	{
		FString UrlString = TEXT("TestWorld?Listen");

		GetWorld()->ServerTravel(UrlString, true, false);
	}
	else
	{
		SERVER_StartGame();
	}
}

bool APlayerControllerLobby::SERVER_StartGame_Validate()
{
	// Add check to make sure this person is in fact host of game
	return true;
}

void APlayerControllerLobby::SERVER_StartGame_Implementation()
{
	StartGame();
}

Something odd that I noticed what that if I set 3rd parameter to true (bShouldSkipGameNotify) then it goes into my new map new problem. Though obviously this won’t work since then clients don’t know to connect. I also tried using GetWorld()->SeamlessTravel() function and that works as well though again only server travels there, rest of clients stay put. As a workaround I guess I could try and just have server travel first and then notify clients to do 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 same result.

thanks,
-ckchessmaster

Hi ckchessmaster,

Thanks for 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 crash occurred?

Thanks!

Thanks! I actually forgot to send crash report, I just sent it now though. Yeah normally I wouldn’t be on this version however I ended up needing some of features that were in promoted branch back about a month ago and have been updating occasionally for fixes so bugs and stuff. I updated most recent promoted in hopes of fixing issue I just ran into.

Hey ckchessmaster-

It appears that some variable is not being set properly before being called. In GameMode.cpp file where function ProcessServerTravel() is called could you add a breakpoint to line 922 ( if(URL.ToUpper().Contains(TEXT("?RESTART"))) )? Then start game and server travel. Let me know if this triggers breakpoint and if so, step through code to see what NextMap variable and URL values are set to.

Cheers

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 path like “Maps/TestWorld” (I did try moving TestWorld into my root folder as well as folder of current map but no difference. I noticed that IsShortPackageName() simply checks to see if there is a “/” is in URL. I tried to add “/” to URL and it did stop crashing but instead would just immediately go to default level. I’m assuming I’m missing something here since serverTravel is only type of travel that seems to be having this issue.

So after stepping through code I figured out what was going on. Essentially I wasn’t using a long package name to tell it where to find map. After I changed variable UrlString to “/Game/Maps/TestWorld” it worked. I think my confusion came from fact that if you aren’t doing a ServerTravel this is unnecessary. For example when I load into my lobby world I just use open blueprint node and then on 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.

  • (ckchessmaster)

Thanks for this :slight_smile: