IEnumerator crashing up when calling from a Startcoroutine

Hi Guys,

I have a call that is connecting to an external server and parsing information. The call is working fine in the webplayer and IOS within the editor. However when I deploy out to IOS I get the following crash in XCode.

System.Linq.Enumerable.c__Iterator1> doesn’t implement interface System.Collections.Generic.IEnumerable>

  • Assertion: should not be reached at mini-trampolines.c:183

The code that makes the call looks like the following:

public void GetAcceptChallengeCount()
	{
    Debug.Log("GetAcceptChallengeCount");
		var query = new ParseQuery<Game>()
			.WhereEqualTo("challengeeFBId", _fbUserID)
			.WhereEqualTo("status", CHALLENGE_CHALLENGED)
			.WhereGreaterThan("challengerScore", -1);
		StartCoroutine (WaitTaskAndDoAction (query.CountAsync(), OnAcceptChallengeCount));	 
	}

public static IEnumerator WaitAndDoAction(float secconds, Action action)
	{
		yield return new WaitForSeconds(secconds);
		action();
	}

No idea why this would be crashing my IOS device. Any thoughts appreciated.

I had this exact error with Parse, but I don’t think it’s caused by the code you posted–I think you over-edited it (it doesn’t make sense, with wrong parameters, etc.).

The error is because the generic version of ParseQuery crashes when used with Or(), either the static function or the member function. The solution is that instead of using new ParseQuery(), you must use ParseObject.GetQuery("Game"). The crash will vanish. I’ve reported the bug. Here’s hoping the Parse folks fix this!