Hi. First, fantastic job on the iPhone release… I took a vacation day just to play with it and it’s even better than I hoped!
However, I’ve run into a problem and I’m not sure if it’s me or the cross compiler. I was trying to convert some of the procedural deformations from the Unity Procedural examples and ran into a hard crash with the cross compiler.
On my system at least (Mac Mini, 1.83Ghz, Core 2 Duo, 1GB RAM) I can reproduce this crash 100% of the time. This is the message I get when building (after the standard Mac OS X “The application mono-iphone-xcompiler quit unexpectedly” dialog):
Exception: Failed AOT cross compiling c757252fcfd8243c1a4e08c66c4b803c.dll
UnityEditor.PostprocessBuildPlayer.Postprocess (BuildTarget target, System.String installPath, System.String companyName, System.String productName, System.String iPhoneBundleIdentifier, Int32 iPhoneStrippingLevel, Int32 width, Int32 height, System.String downloadWebplayerUrl, System.String manualDownloadWebplayerUrl, BuildOptions options) (at /Users/joe/iphone-clean/Editor/Mono/PostprocessBuildPlayer.cs:567)
To duplicate this problem, create a new, blank Unity iPhone project. Then:
#1) Create a folder called “Plugins” in the Project view.
#2) Create a new C Sharp Script in the Plugins folder (rename it to Crashy). Replace the sample class template with this:
public class Crashy {
float[,] g2 = new float[2,2];
public Crashy() {
g2[0,0] = 0.0f;
}
}
#3) Save your scene.
#4) Set up your iPhone Bundle Identifier in the Player Settings.
Then build. On my system at least, I get a crash and a hung process that I have to kill from the Activity Monitor (or command line, it’s called mono-iphone-xcom).
The problem appears to be the assignment statement in the constructor. If I comment it out it builds just fine.
Any suggestions? Is this an actual bug or am I doing something wrong?