NullReferenceException in StartCoroutine

I am getting crash reports from players (using an automated error reporting system), although i cannot seem to reproduce this issue.

For some reason, a certain piece of code that starts a coroutine throws a null reference exception:

StartCoroutine(LoadLevelDelayed());

// This method is defined properly, returning an IEnumerator and yielding at certain points.
private IEnumerator LoadLevelDelayed()
{
   // ...
}

This script is attached to a game object that is saved inside a scene (i’ve seen other posts where people tried to manually instantiate MonoBehaviour objects and that was the cause of failure).

Other information that may be related is that the call to StartCoroutine occurs inside an anonymous delegate, e.g:

public class Something : MonoBehaviour
{
    public void SomeMethod()
    {
        CallAnotherMethod(
                 delegate(bool success)
                  {
                          StartCoroutine(LoadLevelDelayed());
                  });
    }

    private IEnumerator LoadLevelDelayed()
    {
          // ..
    }
}

What else can lead to a NRE thrown when calling this method (StartCoroutine) ?

First, remove private from IEnumerator LoadLevelDelayed();
Try that…
Where are you calling startCoroutine() from?

EDIT:
That is the issue. I’ve been using coroutine and they worked very well. You can just call the startCouroutine function when your download is done. Coroutine runs at the same time with other codes

so just start coroutine after the download is done. Don’t expect Unity to support every feature of C#. Just try what I just said. You will see what I am talking about. You don’t need that get coroutine working.