FindGameObjectsWithTag .. EXC_BAD_ACCESS

In a empty game object called “game” I have a simple script containing:

static var curChar:GameObject;

function Awake(){
setCurChar("mychar");
}

function setCurChar(nm:String){
var arr=GameObject.FindGameObjectsWithTag("chars");
for (var o in arr)
	{
	if(o.name==nm)
		{
		curChar=o;
		curChar.transform.position=Vector3(0,0,0);
		}
	else
		{
		hideGameObject(o); //hide the unwanted characters
		}
	}
}

function hideGameObject(o:Object){
	o.active=false; //null error?
	if (o.renderer)
		{
		o.renderer.enabled=false;
		}
	for (var i in o.transform)
		{
		hideGameObject(i);
		}
}

The first time iPhone enters “hideGameObject” it stuck on EXC_BAD_ACCESS
How could the var “o” be null!?(of course it works without errors inside the editor)

This is the console log:

ExecutionEngineException: Attempting to JIT compile method ‘(wrapper dynamic-method) UnityEngine.GameObject:GameObject$set_active$System.Boolean (object,object[ ])’ while running with --aot-only.

at System.Delegate.CreateDelegate (System.Type type, System.Object firstArgument, System.Reflection.MethodInfo method, Boolean throwOnBindFailure) [0x00000] in :0
at System.Delegate.CreateDelegate (System.Type type, System.Reflection.MethodInfo method, Boolean throwOnBindFailure) [0x00000] in :0
at System.Delegate.CreateDelegate (System.Type type, System.Reflection.MethodInfo method) [0x00000] in :0
at System.Reflection.Emit.DynamicMethod.CreateDelegate (System.Type delegateType) [0x00000] in :0
at Boo.Lang.Runtime.DynamicDispatching.Emitters.DispatcherEmitter.CreateMethodDispatcher () [0x00000] in :0
at Boo.Lang.Runtime.DynamicDispatching.Emitters.DispatcherEmitter.Emit () [0x00000] in :0
at Boo.Lang.Runtime.DynamicDispatching.PropertyDispatcherFactory.EmitPropertyDispatcher (System.Reflection.PropertyInfo property, SetOrGet gos) [0x00000] in :0
at Boo.Lang.Runtime.DynamicDispatching.PropertyDispatcherFactory.EmitDispatcherFor (System.Reflection.MemberInfo info, SetOrGet gos) [0x00000] in :0
at Boo.Lang.Runtime.DynamicDispatching.PropertyDispatcherFactory.Create (SetOrGet gos) [0x00000] in :0
at Boo.Lang.Runtime.DynamicDispatching.PropertyDispatcherFactory.CreateSetter () [0x00000] in :0
at Boo.Lang.Runtime.RuntimeServices.DoCreatePropSetDispatcher (System.Object target, System.Type type, System.String name, System.Object value) [0x00000] in :0
at Boo.Lang.Runtime.RuntimeServices.CreatePropSetDispatcher (System.Object target, System.String name, System.Object value) [0x00000] in :0
at Boo.Lang.Runtime.RuntimeServices+c__AnonStorey17.<>m__D () [0x00000] in :0
at Boo.Lang.Runtime.DynamicDispatching.DispatcherCache.Get (Boo.Lang.Runtime.DynamicDispatching.DispatcherKey key, Boo.Lang.Runtime.DynamicDispatching.DispatcherFactory factory) [0x00000] in :0
at Boo.Lang.Runtime.RuntimeServices.Dispatch (System.Object target, System.String cacheKeyName, System.Type[ ] cacheKeyTypes, System.Object[ ] args, Boo.Lang.Runtime.DynamicDispatching.DispatcherFactory factory) [0x00000] in :0
at Boo.Lang.Runtime.RuntimeServices.Dispatch (System.Object target, System.String cacheKeyName, System.Object[ ] args, Boo.Lang.Runtime.DynamicDispatching.DispatcherFactory factory) [0x00000] in :0
at Boo.Lang.Runtime.RuntimeServices.SetProperty (System.Object target, System.String name, System.Object value) [0x00000] in :0
at mainCharScript.hideGameObject (System.Object o) [0x00000] in :0
at mainCharScript.setCurChar (System.String nm) [0x00000] in :0
at mainCharScript.Awake () [0x00000] in :0

You can try to replace

function hideGameObject(o:Object){

with

function hideGameObject(o:GameObject){