GetInput Crashing Game on Multiplayer

When calling GetInputAnalogKeyState or IsInputKeyDown during a Multiplayer game gives me a crash.

float InputTest=GetInputAnalogKeyState(EKeys::W);
bool IsInputKeyDown(EKeys::Type Key) const;

Not sure if its a bug or something I’m doing wrong. It seems to work fine locally.

Fatal error!

Address = 0xd58070c3 (filename not found) [in C:\Program Files\Rocket\Engine\Binaries\Win64\RocketEditor-Engine.dll]
AShooterCharacter::InputTest() 0xcded7c4e + 0 bytes [File=d:\ue4_project\shootergame\source\shootergame\private\player\shooterplayercontroller.cpp:1011] [in D:\UE4_Project\ShooterGame\Binaries\Win64\RocketEditor-ShooterGame.dll]
Address = 0xd668f025 (filename not found) [in C:\Program Files\Rocket\Engine\Binaries\Win64\RocketEditor-CoreUObject.dll]
Address = 0xd483da59 (filename not found) [in C:\Program Files\Rocket\Engine\Binaries\Win64\RocketEditor-Engine.dll]
Address = 0xd49243ea (filename not found) [in C:\Program Files\Rocket\Engine\Binaries\Win64\RocketEditor-Engine.dll]
Address = 0xd4924e09 (filename not found) [in C:\Program Files\Rocket\Engine\Binaries\Win64\RocketEditor-Engine.dll]
Address = 0xd492731f (filename not found) [in C:\Program Files\Rocket\Engine\Binaries\Win64\RocketEditor-Engine.dll]
Address = 0xd492703e (filename not found) [in C:\Program Files\Rocket\Engine\Binaries\Win64\RocketEditor-Engine.dll]
Address = 0xd4927224 (filename not found) [in C:\Program Files\Rocket\Engine\Binaries\Win64\RocketEditor-Engine.dll]
Address = 0xd50f6a1f (filename not found) [in C:\Program Files\Rocket\Engine\Binaries\Win64\RocketEditor-Engine.dll]
Address = 0xd50f6ea5 (filename not found) [in C:\Program Files\Rocket\Engine\Binaries\Win64\RocketEditor-Engine.dll]
Address = 0xd09d7320 (filename not found) [in C:\Program Files\Rocket\Engine\Binaries\Win64\RocketEditor-OnlineSubsystem.dll]
Address = 0xd50dedad (filename not found) [in C:\Program Files\Rocket\Engine\Binaries\Win64\RocketEditor-Engine.dll]
Address = 0xd47a4891 (filename not found) [in C:\Program Files\Rocket\Engine\Binaries\Win64\RocketEditor-Engine.dll]
Address = 0xd506813c (filename not found) [in C:\Program Files\Rocket\Engine\Binaries\Win64\RocketEditor-Engine.dll]
Address = 0xd4f1ad11 (filename not found) [in C:\Program Files\Rocket\Engine\Binaries\Win64\RocketEditor-Engine.dll]
Address = 0x3fa66093 (filename not found) [in C:\Program Files\Rocket\Engine\Binaries\Win64\Rocket.exe]
Address = 0x3fa5cb8c (filename not found) [in C:\Program Files\Rocket\Engine\Binaries\Win64\Rocket.exe]
Address = 0x3fa5cbfa (filename not found) [in C:\Program Files\Rocket\Engine\Binaries\Win64\Rocket.exe]
Address = 0x3fa6772b (filename not found) [in C:\Program Files\Rocket\Engine\Binaries\Win64\Rocket.exe]
Address = 0x3fa683c3 (filename not found) [in C:\Program Files\Rocket\Engine\Binaries\Win64\Rocket.exe]
Address = 0x77b3652d (filename not found) [in C:\Windows\system32\kernel32.dll]
Address = 0x77c6c541 (filename not found) [in C:\Windows\SYSTEM32\ntdll.dll]
Address = 0x77c6c541 (filename not found) [in C:\Windows\SYSTEM32\ntdll.dll]

I believe my similar post on this subject, and the subsequent response and upcoming solution from Marc is the answer to your question :

IsInputKeyDown Causes Crash if Called Outside of PlayerTick in Multiplayer at Client Game Start
https://rocket.unrealengine.com/questions/7256/isinputkeydown-causes-crash-if-called-outside-of-p.html

#The Solution

Before doing any kind of stuff with input, like isinputkeydown, iskeypressed, or GetInputAnalogKeyState

do this simple check

this check will fail for first few seconds of multiplayer game on the client:

//assuming you are in your player controller class when calling the other functions
If(!PlayerInput) return;
//~~~~~~~~~~~~~~~

if using these elsewhere

If(!yourPCRef->PlayerInput) return;

:slight_smile:

Rama

Nathan thank you very much for your help. After some more testing that fixed it for me.

Thanks!