Touch Event throwing XCode Error (not sure what it is - screenshot)

[PLEASE look at the 1st answer below – I’ve gotten it narrowed down, but still need some assistance if possible.]

I’m using the information here ( http://wiki.unity3d.com/index.php?title=OnMouseDown ) to build a simple 2d-scroller control interface. (pressing on left, move left etc).

My code:

var hit : RaycastHit;
	for (var i = 0; i < Input.touchCount; ++i) 
	{
		if (Input.GetTouch(i).phase == TouchPhase.Began) 
		{
			// Construct a ray from the current touch coordinates
			var ray = camera.ScreenPointToRay (Input.GetTouch(i).position);
			if (Physics.Raycast (ray,hit)) 
			{
				Debug.Log("Hit " + hit.collider.gameObject.name);
			}
		}
	}

Upon running the game on the iPad, as soon as I press the screen, the game freezes and I get this error in Xcode[6161-screen+shot+2012-12-28+at+3.05.52+pm.png|6161]

Any ideas what this is, or is my code not proper?

Some more information: I’ve gotten things to work, except i’m running into the problem again. Now it’s only happening when I press Two Buttons w/ One Finger at once, and with the code below. I can press two buttons with two fingers just fine, but when I lay my thumb, for instance, over two buttons, the error occurs.

** If I am not running xcode, the game works without the error. (Of course pressing two buttons only returns a “hit” on one of them **

Two questions:

1 What is the error that happens in xCode, and is there a way to ignore/stop it, since the game works on the iPad. I’d like to continue using the console in Xcode to read about other things going on in the game.

2 Is there a better way to accomplish this – to read what buttons are being pressed and react? Is there a way to lay a thumb over two buttons and have them both be “hit”? (Kind of like NES pads when you pressed “B” to run fast and “A” to jump, but all the time holding down “B”.)

var hit2 : RaycastHit;
for (var i = 0; i < Input.touchCount; ++i) 
	{
	print ("Touch " + i + " Position " + Input.GetTouch(i).position);
	var ray2 = mainCamera.ScreenPointToRay (Input.GetTouch(i).position);
	if (Physics.Raycast (ray2,hit2))
		print ("Hit w/ Touch:  " + hit2.collider.gameObject.name);
				if (hit2.collider.gameObject.name == "Left Button")
				{
					pressingLeft = true;
				}
			 if (hit2.collider.gameObject.name == "Right Button")
				{
					pressingRight = true;
				}
			 if (hit2.collider.gameObject.name == "Up Right Button")
				{
					pressingRight = true;
					pressingUp = true;
				}
			 if (hit2.collider.gameObject.name == "Up Button")
				{
					pressingUp = true;
				}
			 if (hit2.collider.gameObject.name == "Up Left Button")
				{
					pressingLeft = true;
					pressingUp = true;
				}
			 if (hit2.collider.gameObject.name == "Fire Button")
				{
					print ("Hit Fire");
					firing = true;
				}
			 if (hit2.collider.gameObject.name == "Jet Button")
				{
					print ("Hit Jet");
					pressingUp = true;
				}
	}