Hi all,
I’m seeing random crashes with my Unity app on iOS 5.0 devices (an iPhone 4S and an iPad).
The crash is the result of an EXC_BAD_ACCESS on thread 0. The stack trace shows the following information:
0 app 0x00d38c20 s_SkinVertices4Bones_NEON_loop + 128
1 app 0x00dda040 bool SkinOptimized<(TransformInstruction)3, false, 4, true, false>(SkinMeshInfo, int) (MeshSkinning.cpp:489)
Unfortunately the debugger is unable to unwind the stack further, so I’m not sure where the call is originating.
My build target platform is Universal arm6 + arm7.
Interestingly, when I switch the target to be arm6 only, the crash does not occur. This is what led me to believe that maybe the problem lies in the Mesh Skinning optimizations.
However, I’m also aware that the problem might be elsewhere in my own code and that it just manifests itself as a crash in the VFP/NEON optimized code. I’ve be working on this assumption for the last 4 or 5 days and have been unable to find any solution, hence my reason for inquiring if anyone is having issues with the optimizations.
If it helps at all, my software versions are as follows:
Unity 3.4.2f3
XCode 4.2 (build 4C199)
iOS SDK 5.0 (9A334)
I would be grateful for any suggestions or insights that anyone has to offer. I realise there isn’t a whole lot of information to go on.
Many thanks,
Damian
Please submit a bug report with repro project attached to it and post your bug number there.
Thanks!
We just identified our problem about an hour ago. I’m posting an update for the benefit of anyone who happens to see a similar error in the future.
In our case there was an error in the geometry of one of the meshes we use in the scene. When we replaced this with the geometry from an equivalent model, everything worked fine.
We haven’t identified the error in the model, and we’re probably not going to try. But my guess is that something in the model was causing a buffer overrun in the mesh skinning. When run directly on a device it could sometimes take up to 20 minutes for the crash to occur, but running under XCode with Guard Edges enabled allowed us to detect the crash each time. The crash stopped occurring as soon as we replaced the mesh.
Id be curious to know what you did to cause this.
What program was the mesh made in?
Hi Damian,
That is an interesting bug indeed. More interesting, however, is how you came to find that the error was actually from one of the meshes you were using. With Guard Edges enabled, what exactly did you see (in Xcode?) that pointed you to that conclusion (and eventual solution).
Sorry for the delayed response. Using Guard Edges didn’t really give us any additional information, it just made the crash 100% repeatable.
Every time we loaded a particular scene, we would get the same crash with the same stack trace posted above. However, we could load a similar scene with no problems at all. From there it was just a process of elimination, selectively removing models from the problem scene until the crash no longer occurred.
Once we identified the problem model, we replaced it with an equivalent model from the other scene and everything worked fine. We still have no idea what the issue was with the orignal model. Both models were produced in the same package, and only differ very slightly. To be honest, we’re just happy to have found a fix and haven’t looked any deeper into the issue 