check(PIEInstanceID != -1) assertion failed

I used the multithreaded start in editor with dedicated server and "Play as client" mode as on screenshot
And on the server I used the Engine->Browse for change the level.
But after on the client I got strange assertion in UE4 engine code ( World.cpp, UWorld::ConvertToPIEPackageName):

#check(PIEInstanceID != -1);

What is PIEInstanceID? Why is -1?

And are there way to avoid?

.

#So callstack here:

UE4Editor-Engine.dll!UWorld::ConvertToPIEPackageName(const FString & PackageName, int PIEInstanceID)line 2244 C++
UE4Editor-UnrealEd.dll!UEditorEngine::CreatePIEWorldByDuplication(FWorldContext & WorldContext, UWorld * InWorld, FString & PlayWorldMapName)line 3478 C++
UE4Editor-Engine.dll!UEngine::LoadMap(FWorldContext & WorldContext, FURL URL, UPendingNetGame * Pending, FString & Error)line 9699 C++
UE4Editor-Engine.dll!UEngine::TickWorldTravel(FWorldContext & Context, float DeltaSeconds)line 9159 C++
UE4Editor-UnrealEd.dll!UEditorEngine::Tick(float DeltaSeconds, bool bIdleMode)line 1292 C++
UE4Editor-UnrealEd.dll!UUnrealEdEngine::Tick(float DeltaSeconds, bool bIdleMode)line 370 C++
UE4Editor.exe!FEngineLoop::Tick()line 2644 C++
UE4Editor.exe!GuardedMain(const wchar_t * CmdLine, HINSTANCE__ * hInInstance, HINSTANCE__ * hPrevInstance, int nCmdShow)line 142 C++
UE4Editor.exe!WinMain(HINSTANCE__ * hInInstance, HINSTANCE__ * hPrevInstance, char * __formal, int nCmdShow)line 189 C++

#Locals:

  •  PackageName	L"/Game/SAD/Maps/Multiplayer/TestLevel"	const FString &
    
  •  PIEInstanceID	-1	int
    
  •  PackageAssetName	L"TestLevel"	FString
    
  •  PackagePIEPrefix	L"呸锍û"	FString
    
  •  PackageAssetPath	Invalid	FString
    

What I’m doing wrong?

Hey -

Can you let me know if you have the same error occur in a new 4.12 project? If so, can you provide the setup steps so that I can try to reproduce this on my end? I setup my Level Editor - Play tab to match you screenshot but when I PIE I get an error message stating “The map specified on the commandline could not be found. Would you like to load the default map instead?” Can you let me know what other setup steps need to be done?

On 4.12 version this error occurs too.
I used next steps to reproduce error:

  1. Created a new map TestLevel
  2. Created a new second map LoginMap
  3. Used as editor startup map is TestLevel
  4. Used as Game default map is LoginMap
  5. Used as Server default map is TestLevel
  6. Created new GameInstance named MyGameInstance, and in StartGameInstance method used Engine->Browse(*WorldContext, URL, Error), where URL is parsed params from FCommandLine::Get().
  7. Runs with dedicated server and without single process and with editor multiplayer mode: Play As Client (as on screenshot).

After this I logged URL and got next:

I can follow your steps up until step 6. What type of variable is URL? Is Error a known variable or a variable for a custom error message? Can you provide the code for the class?

Oh sorry, a small correction: URL constructed as FURL() without parameters and without anything changes.
And due to debug info FURL() constructs an URL with correct map name (default constructor returns default map for the client and dedicated server).

I still don’t know what “Error” is doing (if it’s a variable you created or part of the class). Please provide the code for you class so that I can ensure that my setup matches what you’re doing.

http://pastebin.com/bxiCbJCp .h
http://pastebin.com/eHXfX0LU .cpp

Hey -

I was able to reproduce the crash with the dedicated server settings. This bug has been reported for investigation as UE-32511.

Cheers

excellent!