Can't start two players game

Everytime I hit the play button with two players set I get this error:


Unknown exception - code 00000001 (first/second chance not available)

Cast of IpConnection //Engine//Transient.IpConnection_2 to LocalPlayer failed

KERNELBASE + 37901 bytes
UE4Editor_Core + 3095148 bytes
UE4Editor_Core + 1661722 bytes
UE4Editor_CoreUObject + 357979 bytes
UE4Editor_Engine + 3201930 bytes
UE4Editor_Engine + 6050083 bytes
UE4Editor_Engine + 1081372 bytes
UE4Editor_CoreUObject + 547972 bytes
UE4Editor_CoreUObject + 1302075 bytes
UE4Editor_CoreUObject + 1536135 bytes
UE4Editor_CoreUObject + 1416047 bytes
UE4Editor_CoreUObject + 1303464 bytes
UE4Editor_CoreUObject + 1416047 bytes
UE4Editor_CoreUObject + 547972 bytes
UE4Editor_CoreUObject + 1414048 bytes
UE4Editor_Engine + 1749361 bytes
UE4Editor_Engine + 16235652 bytes
UE4Editor_Engine + 1841540 bytes
UE4Editor_Engine + 6155068 bytes
UE4Editor_Engine + 1589192 bytes
UE4Editor_Engine + 8419206 bytes
UE4Editor_Engine + 8470877 bytes
UE4Editor_Core + 749554 bytes
UE4Editor_Core + 749949 bytes
UE4Editor_Core + 870517 bytes
UE4Editor_Engine + 8676089 bytes
UE4Editor_Engine + 8588016 bytes
UE4Editor_Engine + 8597799 bytes
UE4Editor_Engine + 5363286 bytes
UE4Editor_Engine + 5390742 bytes
UE4Editor_UnrealEd + 1814406 bytes
UE4Editor_UnrealEd + 5925286 bytes
UE4Editor!FEngineLoop::Tick() + 3294 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.4\engine\source\runtime\launch\private\launchengineloop.cpp:2098]
UE4Editor!GuardedMain() + 476 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.4\engine\source\runtime\launch\private\launch.cpp:133]
UE4Editor!GuardedMainWrapper() + 26 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.4\engine\source\runtime\launch\private\windows\launchwindows.cpp:125]
UE4Editor!WinMain() + 249 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.4\engine\source\runtime\launch\private\windows\launchwindows.cpp:201]
UE4Editor!__tmainCRTStartup() + 329 bytes [f:\dd\vctools\crt\crtw32\dllstuff\crtexe.c:618]

I don’t know what to do.

Seems to be your fault and not the engines; “Cast of IpConnection //Engine//Transient.IpConnection_2 to LocalPlayer failed”

Post the code we’re your sending the IP information to the Local Player to connect/retrieve

I’m using all blueprints. It works on the samples and the one I’m using is just a modified top down template. It says server is ready while the screen is black then it crashes

Hi Valkon,

Does this occur on a clean project with no additional content? Does the editor crash when you see this warning? If so can you post the crash logs from the most recent crash (these are in the filepath \Unreal Projects\PROJECTNAME\saved\logs)? Further, what steps are you taking before you get this warning to appear?

I stripped my project, till I found what was going on. It appears that if I plugged this code into tick event it causes the engine to crash

Hi Valkon,

I’m confused as to what you are attempting to do here? Are you able to put this on a timer and it not cause the crash?

I’d be happy to take a look and see what might be going on or if there is a way you can update this effectively without causing the crash.

This is basically Edge panning for RTS. it checks mouse location and if it’s within the screen then it checks if it’s within 20 units off any of the edges. If yes to moves the character in that direction. I’m able to make the game start if this was a begin play event. It just fails if it was in tick. I’m not sure why. I could send you the blueprint if you want?

Have that as your controller and try a dedicated server or +2 players

Ok, I tested a little theory and the good news is that your boolean list is fine (first picture). Once you remove the sequence and sets you are able to move again (see second picture). Unfortunately I’m not quite sure what is happening that is causing this error to occur. I’ll take a deeper look. For now, however, if you remove from the sequence down to your custom functions you should be able to start working again.

UPDATE: I figured it out.

The primary problem is your sequence, because you are effectively telling it to check every single direction at once all the time. If you are set on this method for your scrolling, plug your sets directly into the “Move right” branch, then if false check left then check top, then check down. However, I have a thread here: Tutorial - RTS Style Camera Movement with Edge Scrolling - Community & Industry Discussion - Epic Developer Community Forums in which a user has created an extremely efficient RTS scolling tutorial that I think would serve you quite well in what you are trying to accomplish.

The weird thing is that it’s working in single client. Once I add other players or a dedicated server it crashes. But I’ll use your method and see if it prevents the crash

Ok, please let me know if that works for you!

Hi Valkon,

We have not heard from you in quite some time. I am marking this thread as answered for tracking purposes. If you are still experiencing the crash, please comment back and let us know. Thank you!