UI crashing not because of PrimalUI

Hey, everyone. I’m trying to do something I thought would be simple but it’s giving me a lot of pain. I just want to open a UI I made in the viewport when the player pushes “”. I followed this tutorial and did everything exactly the same except which button to push. I first did it using “=” like in the tutorial and it worked. I tried using the script in the player controller but it crashed the editor. I changed it back to being in the male & female character blueprints and the button pressed to “” and it still doesn’t work. I even tried changing it back to exactly the way I had it when it worked and it no longer works either. Pretty frustrated, this shouldn’t take this long to do and I’m completely lost. The UI is parented to PrimalUI which is the only other issue with UI crashes that I’ve heard of. This is the error I got the last time it crashed:

Fatal error!

Unhandled Exception: EXCEPTION_ACCESS_VIOLATION 0x00000000

UnknownModule!UnknownFunction (0x0000000000000000) + 0 bytes [UnknownFile:0]

I you have any answers, please help me out and end my misery.

Also, is there a way to implement code for a button press anywhere else? I would rather implement it in the character parent blueprint but I can’t tell if that would work since everything I do crashes. Would it be possible to implement in the player controller blueprint? If there’s more than one possibility, what are the ups and downs of the choices?

I’d run a verify on your editor. There’s no reason for that error for a button press. I’ve got the same test - and I’ve placed it on just about every key imaginable, no crashing.

Are we talking about key input events? Cause they behave fishy sometimes. Sometimes it crashes if you wanna create one. Just try it again after restart. Also, keys that are used by the player key mapping will not work in blueprint. The input gets consumed in the c++ code. I would also recommend doing any input events in the player pawn or controller only. You can also do it in other places but for that you need to enable input first. As I said, input events are fishy in the ADK and unrealiable if the player has this key already bind to something. Rather work with interface buttons only.

I verified the editor from the Unreal Launcher. I’m not sure if there something corrupted or what. I went in and all the blueprint script I added is gone, so I made a child of the player controller and changed the gamemode to use it. I checked that I wasn’t setting the press event to a button that did other things so I chose Right Control to open the UI. When I tried to add “Set Show Mouse Cursor”, it crashed the editor again. Then when I opened it again, the editor gave me a lot of errors about not being able to find a bunch of structures and items. I went on and just added the script for creating and adding the UI to the viewport, but didn’t set show mouse cursor. I just wanted to see if the press event would open the UI first. I played in the test map and pressed right control which then froze the editor and crashed it, but right before the editor closed, I saw the UI in the viewport. This is the Error Message I got:

Fatal error!

Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0xffffffff

UE4Editor-CoreUObject.dll!UnknownFunction (0x00007fffb4bd3995) + 0 bytes [UnknownFile:0]
UE4Editor-ShooterGame.dll!UShooterGameViewportClient::ValidateInput() (0x00007fff9effdbae) + 25 bytes [d:\ue4\unrealengine\projects\shootergame\source\shootergame\private\shootergameviewportclient.cpp:320]
UE4Editor-UnrealEd.dll!UnknownFunction (0x00007fffa53d14a5) + 0 bytes [UnknownFile:0]
UE4Editor-UnrealEd.dll!UnknownFunction (0x00007fffa5835716) + 0 bytes [UnknownFile:0]
UE4Editor.exe!UnknownFunction (0x00007ff6d5fd9464) + 0 bytes [UnknownFile:0]
UE4Editor.exe!UnknownFunction (0x00007ff6d5fced0f) + 0 bytes [UnknownFile:0]
UE4Editor.exe!UnknownFunction (0x00007ff6d5fced7a) + 0 bytes [UnknownFile:0]
UE4Editor.exe!UnknownFunction (0x00007ff6d5fdaae0) + 0 bytes [UnknownFile:0]
UE4Editor.exe!UnknownFunction (0x00007ff6d5fdba19) + 0 bytes [UnknownFile:0]
KERNEL32.DLL!UnknownFunction (0x00007fffcea913d2) + 0 bytes [UnknownFile:0]
ntdll.dll!UnknownFunction (0x00007fffced95454) + 0 bytes [UnknownFile:0]
ntdll.dll!UnknownFunction (0x00007fffced95454) + 0 bytes [UnknownFile:0]

After what felt like banging my head on a wall, I got it to work. I think trying to do the same script from the tutorial in the controller doesn’t work. It would crash and I would have to verify the editor again to try another way. The tutorial works fine, I just didn’t know I had to verify the editor. Thanks CFrankie! That would explain why the editor had an error for files I never touched. I’m pretty new to UE4 and game/mod development so thank you for your patience!

UI’s are incredibly glitchy when it comes to the DevKit. I and a fellow modder have encountered a few issues/bugs when working with UI’s.

-WM