- Home /
The presence of 3rd party libraries in our Unity XCode project causes mono-land exceptions leading to a crash immediately after startup.
Hey Folks,
We have a Unity iPhone project of fair size and complexity. The project uses a fair number of external .net libraries, generics, and "unorthodox" programming techniques from reactive extensions to partial classes to Asset Bundles. The game runs quite well on test devices, and we are nearing release.
However, something very odd is going on when we are trying to bring in a couple of 3rd party libraries (Flurry and TestFlight's SDK). The mere presence of these .a files in the XCode project is causing a crash immediatly after the AppController calls [self startUnity:application]. We can do all we want before the startUnity call.
Doing a back trace in gdb gives us:
#1 0x010cd33c in System_SystemException__ctor_string () at mscorlib.dll.s:356770
and poking around a little further, it appears that the exception being constructed is a mono out of memory exception.
It looks like some out of control allocation is going on in mono-land. This happens on the iPhone4, iPad2, and iPhone3gs. Our application has no memory issues outside of this condition.
Configuring the libraries properly, with linker flags, etc. No change. Simply removing the .a file fixes everything
We've built the project with only a single empty scene selected in the build settings - same problem.
Creating an empty unity project and adding the .a files is fine - they run as they are supposed to. Something about our configuration is causing the problem
Anyone experienced anything like this before? Any hints?
Cheers,
Answer by chaneya · Jan 19, 2012 at 11:33 PM
I'm getting the same issue but I'm using AutoPilot purchased in the Asset store. I posted my issue in the AutoPilot thread. link text
I'm not familiar with the error checking you are doing but the end result sounds like the same issue.
I deploy to Testflight with the TestflightSDK and the AutoPilot build process works just fine. Autopilot uploads to Testflight. Once I download the Testflight build (.ipa) to my iPad, the game crashes back to iOS during the Splash Screen.
I'm afraid I don't have a answer.
Allan
Answer by mjewkes · Jan 19, 2012 at 11:51 PM
Switching to armv7 from armv6 fixed everything. Can only speculate as to why.
Answer by erran · Apr 14, 2012 at 06:25 PM
I met the same issue, exactly same. But I already use armv7 so can't solve it like mjewkes. any one has any ideas?