title: SP 2010 Custom Workflow - WinWF Internal Error, Terminating Workflow only when DelayActivity is used
body: <p>I have a custom workflow that I must start off with a delayActivity because the list activating the process has an event receiver that updates a column that I need prior to the workflow initializing.  </p>
  
  <p>When I use the DelayActivity, it delays fine and the Event Receiver finishes the update.  However, when the delay completes, the workflow fails.  The Hive Logs show:</p>
  
  <ul>
  <li>Workflow Infrastructure ----         88xr ------ Unexpected------    WinWF Internal Error, terminating workflow Id# 5ff955a1-5135-4e54-9e90-105e11952fee</li>
  <li>Workflow Infrastructure ----                 98d4 -----  Unexpected------    System.NullReferenceException: Object reference not set to an instance of an object.</li>
  </ul>
  
  <p>If I remove the Delay Activity the workflow kicks off fine, however the value I need isn't there because the event receiver isn't done updating.</p>
  
  <p>I have tried launching the WF from the Event Receiver, but it just hangs.  A while Loop doesn't work either as it just keeps looping and holding the Event Receiver from completing the update.  I am kind of at my wits end here.  The DelayActivity seems like the best way to do this, but this error is making it impossible to use.</p>
  
  <p>I would appreciate any help.</p>
  
  <p>Thank you.</p>