We’ve been working on getting one of our applications building in Cloud Build for best part of a week and we’ve simply not been able to get a single build working on iOS. There has never been a clear error message in the log whatsoever so we’re just trying every permutation with nothing to go on and we’ve just about run out of things to try now.
Description of issue: The build fails but there are no real errors shown. There’s a stack trace with a bunch of Editor related stuff which I think is stopping the build but I have no idea how it relates to our project or what we would do to fix it.
Unity version: 5.5.0f3
XCode version: 8
Source control: Git
Local build platform: iOS 10 (via Mac OS Sierra)
Build target: iOS
Relevant plugins being used: Google Play Game Services. A custom plugin to add sqlite3 to the Xcode project. Fabric (with Crashlytics). Keen reporter.
Project name: Iolani Palace App
This is what I consider to be the “relevant chunk” of the build log.
24731: [Unity] Receiving unhandled NULL exception
24732: [Unity] Obtained 31 stack frames.
24733: [Unity] #0 0x000001026e5290 in -[GUIOpenGLView drawRect:]
24734: [Unity] #1 0x000001026ce1d0 in GUIView::RepaintAll(bool)
24735: [Unity] #2 0x00000102633285 in Application::UpdateScene(bool)
24736: [Unity] #3 0x00000102318118 in EditorSceneManager::FinishNewScene()
24737: [Unity] #4 0x0000010231802f in EditorSceneManager::NewScene(NewSceneSetup, NewSceneMode)
24738: [Unity] #5 0x00000102628618 in Application::FinishLoadingProject()
24739: [Unity] #6 0x000001026bc057 in -[EditorApplication applicationDidFinishLaunching:]
24740: [Unity] #7 0x007fff9b057bbc in __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__
24741: [Unity] #8 0x007fff9b057b4f in ___CFXRegistrationPost_block_invoke
24742: [Unity] #9 0x007fff9b057ac7 in _CFXRegistrationPost
24743: [Unity] #10 0x007fff9b057832 in ___CFXNotificationPost_block_invoke
24744: [Unity] #11 0x007fff9b0145e2 in -[_CFXNotificationRegistrar find:object:observer:enumerator:]
24745: [Unity] #12 0x007fff9b013835 in _CFXNotificationPost
24746: [Unity] #13 0x007fff947f317a in -[NSNotificationCenter postNotificationName:object:userInfo:]
24747: [Unity] #14 0x007fff8cc08355 in -[NSApplication _postDidFinishNotification]
24748: [Unity] #15 0x007fff8cc080bf in -[NSApplication _sendFinishLaunchingNotification]
24749: [Unity] #16 0x007fff8cac2d99 in -[NSApplication(NSAppleEventHandling) _handleAEOpenEvent:]
24750: [Unity] #17 0x007fff8cac2843 in -[NSApplication(NSAppleEventHandling) _handleCoreEvent:withReplyEvent:]
24751: [Unity] #18 0x007fff9484172d in -[NSAppleEventManager dispatchRawAppleEvent:withRawReply:handlerRefCon:]
24752: [Unity] #19 0x007fff948415a7 in _NSAppleEventManagerGenericHandler
24753: [Unity] #20 0x007fff94112261 in aeDispatchAppleEvent(AEDesc const*, AEDesc*, unsigned int, unsigned char*)
24754: [Unity] #21 0x007fff94111fe8 in dispatchEventAndSendReply(AEDesc const*, AEDesc*)
24755: [Unity] #22 0x007fff94111f04 in aeProcessAppleEvent
24756: [Unity] #23 0x007fff9424baf9 in AEProcessAppleEvent
24757: [Unity] #24 0x007fff8cabe290 in _DPSNextEvent
24758: [Unity] #25 0x007fff8cabd226 in -[NSApplication _nextEventMatchingEventMask:untilDate:inMode:dequeue:]
24759: [Unity] #26 0x007fff8cab1d80 in -[NSApplication run]
24760: [Unity] #27 0x007fff8ca7b368 in NSApplicationMain
24761: [Unity] #28 0x000001026d59f8 in EditorMain(int, char const**)
24762: [Unity] #29 0x000001026d6209 in main
24763: [Unity] #30 0x000001000029b4 in start
24764: /BUILD_PATH/.mason/buildpacks/unity/bin/compile: line 31: 8068 Abort trap: 6 "${unity_args[@]}"
24765: ! Unity player export failed!
24766: ! build of 'default-ios' failed. compile failed
Since there are no real errors, I don’t know what the “relevant chunk” of the build log is for sure. So I’ve uploaded the entire thing here, just in case : Dropbox
The project on CloudBuild is not in the same state it was when I built this and got this error log. One of the other developers has been trying to strip things out of the project to see if they can narrow down what the problem is.
The logs I’ve reported are accurate for build #14 on Cloud Build.
Yes, I’m quite certain that the project builds locally.
We’re not using PostProcessSceneAttributes but there is one script which uses [PostProcessBuild] which I guess is the predecessor to it.
EDIT: Removed a false lead.
There's this which is my own script we use to set up sqlite3, but we've had the same build problem since long before I added that.
[code]
[PostProcessBuild]
public static void OnPostprocessBuild(BuildTarget buildTarget, string path)
{
if (buildTarget == BuildTarget.iOS)
{
string projPath = path + "/Unity-iPhone.xcodeproj/project.pbxproj";
PBXProject proj = new PBXProject();
proj.ReadFromString(File.ReadAllText(projPath));
string target = proj.TargetGuidByName("Unity-iPhone");
proj.AddFileToBuild(target, proj.AddFile("usr/lib/libsqlite3.dylib", "Frameworks/libsqlite3.dylib", PBXSourceTree.Sdk));
File.WriteAllText(projPath, proj.WriteToString());
}
}
Today I tried removing anything which begins with [PostProcess so that I can get all of the new ones and the old ones. There were a few from Google Analytics and Fabric as well as my own posted above. I rebuilt to see what would happen. Exactly the same result.
So I guess we can conclude that [PostProcess stuff is not the problem.
Excerpt from latest log - full one in Cloud Build - build #32
21083: [Unity] Receiving unhandled NULL exception
21084: [Unity] Obtained 31 stack frames.
21085: [Unity] #0 0x000001026e5290 in -[GUIOpenGLView drawRect:]
21086: [Unity] #1 0x000001026ce1d0 in GUIView::RepaintAll(bool)
21087: [Unity] #2 0x00000102633285 in Application::UpdateScene(bool)
21088: [Unity] #3 0x00000102318118 in EditorSceneManager::FinishNewScene()
21089: [Unity] #4 0x0000010231802f in EditorSceneManager::NewScene(NewSceneSetup, NewSceneMode)
21090: [Unity] #5 0x00000102628618 in Application::FinishLoadingProject()
21091: [Unity] #6 0x000001026bc057 in -[EditorApplication applicationDidFinishLaunching:]
21092: [Unity] #7 0x007fffa0365bbc in __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__
21093: [Unity] #8 0x007fffa0365b4f in ___CFXRegistrationPost_block_invoke
21094: [Unity] #9 0x007fffa0365ac7 in _CFXRegistrationPost
21095: [Unity] #10 0x007fffa0365832 in ___CFXNotificationPost_block_invoke
21096: [Unity] #11 0x007fffa03225e2 in -[_CFXNotificationRegistrar find:object:observer:enumerator:]
21097: [Unity] #12 0x007fffa0321835 in _CFXNotificationPost
21098: [Unity] #13 0x007fff99b0117a in -[NSNotificationCenter postNotificationName:object:userInfo:]
21099: [Unity] #14 0x007fff91f16355 in -[NSApplication _postDidFinishNotification]
21100: [Unity] #15 0x007fff91f160bf in -[NSApplication _sendFinishLaunchingNotification]
21101: [Unity] #16 0x007fff91dd0d99 in -[NSApplication(NSAppleEventHandling) _handleAEOpenEvent:]
21102: [Unity] #17 0x007fff91dd0843 in -[NSApplication(NSAppleEventHandling) _handleCoreEvent:withReplyEvent:]
21103: [Unity] #18 0x007fff99b4f72d in -[NSAppleEventManager dispatchRawAppleEvent:withRawReply:handlerRefCon:]
21104: [Unity] #19 0x007fff99b4f5a7 in _NSAppleEventManagerGenericHandler
21105: [Unity] #20 0x007fff99420261 in aeDispatchAppleEvent(AEDesc const*, AEDesc*, unsigned int, unsigned char*)
21106: [Unity] #21 0x007fff9941ffe8 in dispatchEventAndSendReply(AEDesc const*, AEDesc*)
21107: [Unity] #22 0x007fff9941ff04 in aeProcessAppleEvent
21108: [Unity] #23 0x007fff99559af9 in AEProcessAppleEvent
21109: [Unity] #24 0x007fff91dcc290 in _DPSNextEvent
21110: [Unity] #25 0x007fff91dcb226 in -[NSApplication _nextEventMatchingEventMask:untilDate:inMode:dequeue:]
21111: [Unity] #26 0x007fff91dbfd80 in -[NSApplication run]
21112: [Unity] #27 0x007fff91d89368 in NSApplicationMain
21113: [Unity] #28 0x000001026d59f8 in EditorMain(int, char const**)
21114: [Unity] #29 0x000001026d6209 in main
21115: [Unity] #30 0x000001000029b4 in start
21116: /BUILD_PATH/.mason/buildpacks/unity/bin/compile: line 31: 6466 Abort trap: 6 "${unity_args[@]}"