Understanding why it doesn't work on the device

Hello everybody,

I have just upgraded to Unity 4 today, and things are not working on the device.

I have a fairly mature project, that used to work perfectly on iOS.
I have completed some of the changes that were required by the Unity 4 upgrade - such as the deprecation of gameObject.active - and now the situation is this:

In the Editor, everything works as before.
In the iOS simulator and on the device, I get at least two problems:

  1. Some UI elements are not showing
  2. The simulator crashes with EXC_BAD_ACCESS at some point.

I do not see any error in Unity or the Player log.
I am not using MonoDevelop

I should mention it worked without a hitch in previous Unity and that I have completely deleted the Build folder.

Any tip on how should I find out what is the cause for these errors?
I have read that there is a way to show the console in the player builds - how do I do that?

Thanks.

Unity 4 is not Unity 3 and its very well possible that things got broken along the upgrade and need to be setup again to work fine or beeing ported.
Stuff thats child of a disabled game object in U4 for example is disabled too automatically for the time the parent is disabled, as such GameObject.Find and GetComponentInChildren will no longer use them (for the later there is a boolean parameter to force it to check inactive childs) which can easily result in a null reference if your code failed to correctly check the presence of objects before using them.

EXC_BAD_ACCESS is the low level counterpart of ‘null reference exception’ means that somehwere you use an object thats null.
If you do a development build, ensure to disable stripping and use ‘slow and safe’ you should get a callstack in xcode that tells you the function that causes it.

That you have non showing UI elements implies that at least there something went wrong, either the UI directly or the texture / shader used on it

Thanks.

Yeah - I figured its a null ref, and I do have safe and slow, but still I do not see the callstack. I am looking at the Xcode console and the player log (which I believe show the same) - should I look someplace else?

Do you happen to know what is the meaning of this statement in the Unity changelog? I mean, can I see an equivalent of a console on player builds now?
“Added a new development console to show error messages on screen in development player builds.” (from the changelog)

I guess that enabling this would help my debugging, I just dont know how to do so.

EDIT:
I am also sometimes getting this error when building for simulator:
Failed to connect to player ip: 10.0.0.2, port: 55296

Could this be the reason I am not getting the callstack?
Also, I was under the impression that Unity 4 should be better at ensuring execution order - so I am completely buffled as for why things work perfectly in the editor and not on the device/simulator.

The only option I have now is to downgrade, so any help is appreciated.