Crash on MacOSX 10.9 while using a ps3 controller

Expected results:

Use a game controller such as Playstation 3 controller for input in Unreal Engine on Mac.

Actual results:

EXE_BAD_ACCESS when game controller is connected to development system.

Steps to Reproduce:

While having a playstation 3 game controller connected over bluetooth to MacOSX 10.9.2

Build and Run a UnrealEngine Editor -Mac64 with sample “sidescroller c++” project as target

Receive a EXE_BAD_ACCESS in method HIDInputInterface::SendControllerEvents();

Partial trace reads:

HIDInputInterface::SendControllerEvents()

FEngineLoop::Tick()

GuardedMain(wchar_t const*)

[UE4AppDelegate applicationDidFinishLaunching:]

Notes:

This issue does not persist when PS3 controller is not connected.

You can download a patch that should solve this problem from http://cdn.unrealengine.com/qfe/QFE-FromCL-2027741-Shelve-2030404… file contains an installer that will update engine. Please note that this is just a quick fix so you don’t have to wait for 4.0.2 release. As such, it’ll be removed if you use Verify Install option in Launcher.

I have fixed, in file HIDInputInterface.cpp, find code

for ( int32 ControllerIndex=0; ControllerIndex < MAX_NUM_HIDINPUT_CONTROLLERS; ++ControllerIndex )
{
	FControllerState& ControllerState = ControllerStates[ControllerIndex];
	FMemory::Memzero( &ControllerState, sizeof(FControllerState) );
    
	ControllerState.ControllerId = ControllerIndex;
}

move all of them to beginning of HIDInputInterface::HIDInputInterface function, I have modified and work fine.

Yes, that’s one of things patch I mentioned does. real cause of crash was failed IOHIDManagerOpen call. It needs to be moved to right after IOHIDManagerOpen to succeed. But your change is a good workaround.

, thanks for effort of making hot patch. It however did not seam to effect this particular issue with any new projects generated from Luncher App and users/shared location of engine.
I did however make siney’s edit to engine code .cpp that I’m not hosting at users/shared location and now got input from a PS3 game pad.
I’ll keep an eye on this diff once a new pull becomes available.

Thanks for update. I’m not sure why didn’t it help for new projects, but I’ll make sure that once patch code makes it to GitHub and 4.0.2, it’s not limited to editor.

error persist even in 4.0.2.

Platform: Mac

Device: Bluetooth PS3 Sixaxis

  • Official UE4 4.0.2 - Launcher Crash
  • Official UE4 4.0.2 - C++ Project Crash
  • Custom UE4 Build 4.0.2 without fixing anything - Editor launcher do not crash (so, it works?).
  • Custom UE4 Build 4.0.2 without fixing anything - C++ Project created with official release (paths changed): crash.
  • Custom UE4 Build 4.0.2 without fixing anything - C++ Project created with custom build: clang error (different branches of clang detected in PCHs, another issue).
  • Custom UE4 Build 4.0.2 without fixing anything - Print Project. WORKS!!! (sidescroller) ← why?

So, downloading source code and running built Editor works with PS3 sixaxis connected, until you try to run a c++ project instead of a BP project, maybe those c++ projects are using official release resources (dylibs from /Users/Shared/UnrealEngine/4.0/…) even being created or built with my own fork that is in a different directory.

Even where it works, I’m only able to move with stick. I can’t map X to jump for example, or can’t figure out what Gamepad input print event is, or if I must map it from a config.ini file like in UDK, but that’s another history.

After using Siney change to get past crash, I too noticed button mapping completely off. For instance PS3 sixaxis maps “select” to FaceButtonBottom. I’ve not taken time to figure out remapping.

Exactly, select button is one with I can jump. I found Input configuration in Edit > Project Settings where I can map “gamepad events” to “custom input events”, and then use it in blueprint, but where those buttons can be remapped to it’s correct gamepad events? Well that’s not main issue but i would like to know it.

Hey everyone,

I just want to check and see if this is still an issue in 4.2.1 for you. Please let us know if you are still experiencing this issue and we will continue our investigation. Thanks!