UE4 failing to start on OSX Mavericks (Assertion failed: Result == 0 @ MacPlatformMisc.cpp)

Edit: MichaelT patch below solves this problem.

My guess (by looking at the source) is that it crashes while trying to increase the max amount of open files:

[2014.03.20-10.42.45:182][  0]LogMac:Error: appError called: Assertion failed: Result == 0 [File:/Users/build/BuildFarm/build_++depot+UE4-Releases+4.0/Engine/Source/Runtime/Core/Private/Mac/MacPlatformMisc.cpp] [Line: 243]  

Regardless of why it fails, I already have my open files limit pretty high:

launchctl limit maxfiles
    maxfiles    1000000        1000000

This crash happens on both occasions: when trying to launch UE4 via the official launcher and when you build it from the source. The weird thing is that it still crashes on line 243 when I comment the assert, clean the project (including deleting all cache from ~/Library/Developer/Xcode/DerivedData, manually) on Xcode and rebuild the UE4 editor.

##Specs:
###iMac
3.4 GHz Intel Core i7
8 GB 1333 MHz DDR3
AMD Radeon HD 6970M 2048 MB
OS X 10.9.2 (13C64)

##Full log file

Sorry for trouble. We will look into this today and have a patch for you as soon as possible, most likely by the end of day.

You should be able to work around this by commenting out line 243, though.

Could you let me know how do you launch the editor after building it? The thing is that each build configuration produces separate apps. Development produces UE4Editor.app, but for Debug it’s UE4Editor-Mac-Debug.app. By default, UE4 Xcode project is set to build Debug when you do Product->Build For->Running and Development when you do Product->Build For->Profiling. You can change that by modifying UE4Editor scheme. Maybe you’re not launching the build that you actually compiled?

You can download a patch that should solve this problem from http://cdn.unrealengine.com/qfe/QFE-FromCL-2027741-Shelve-2030404.zip. Zip file contains an installer that will update the 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 the Launcher.

It works now. Thanks!