<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>DevForce Community Forum : Coroutine and Errors</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2010 : Coroutine and Errors</description>
  <pubDate>Wed, 22 Jul 2026 01:32:52 -700</pubDate>
  <lastBuildDate>Fri, 01 Jul 2011 11:54:13 -700</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 9.69</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>www.ideablade.com/forum/RSS_post_feed.asp?TID=2636</WebWizForums:feedURL>
  <image>
   <title>DevForce Community Forum</title>
   <url>http://www.ideablade.com/forum/forum_images/IdeaBlade_logo_tm.png</url>
   <link>http://www.ideablade.com/forum/</link>
  </image>
  <item>
   <title>Coroutine and Errors :    Hi stephenmcd1, I&amp;#039;ve...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2636&amp;PID=11161#11161</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=892" rel="nofollow">sbelini</a><br /><strong>Subject:</strong> 2636<br /><strong>Posted:</strong> 01-Jul-2011 at 11:54am<br /><br />Hi stephenmcd1,<div> </div><div>I've been trying to reproduce this issue without success.</div><div>Have you tried to write an error handler for each EntityQueryOperation within the coroutine iterator? (rather that just rely on the CoroutineOperation)</div><div>&nbsp;</div><div>I know this is additional work, but it'd help isolating which operation is causing the exception:</div><div>&nbsp;</div><div>i.e.</div><div>&nbsp;</div><div><font face="Courier New, Courier, mono">&nbsp;&nbsp;&nbsp; private IEnumerable&lt;INotifyCompleted&gt; LoadAllCoroutine() {</font></div><div><font face="Courier New"></font>&nbsp;</div><div><font face="Courier New, Courier, mono">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var orderdetailsOp = _mgr.OrderDetails.ExecuteAsync();</font><font face="Courier New, Courier, mono"><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; orderdetailsOp.Completed += (s, args) =&gt; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (args.HasError) {</font></div><div><font face="Courier New, Courier, mono">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // do something<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;};</font></div><div><font face="Courier New, Courier, mono">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; yield return orderdetailsOp;<br></font></div><div><font face="Courier New, Courier, mono">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; yield return Coroutine.Return(null);</font></div><div><font face="Courier New, Courier, mono">&nbsp;&nbsp;&nbsp; }</font></div><div><div>&nbsp;</div><div> By the way, are you executing these queries in parallel?</div><div>&nbsp;</div><div>Regards,</div><div>&nbsp;&nbsp; Silvio.</div></div>]]>
   </description>
   <pubDate>Fri, 01 Jul 2011 11:54:13 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2636&amp;PID=11161#11161</guid>
  </item> 
  <item>
   <title>Coroutine and Errors : We were finally able to move to...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2636&amp;PID=11146#11146</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=613" rel="nofollow">stephenmcd1</a><br /><strong>Subject:</strong> 2636<br /><strong>Posted:</strong> 29-Jun-2011 at 3:03pm<br /><br /><div style=": rgb255, 255, 255; margin-left: 1px; margin-top: 1px; margin-right: 1px; margin-bottom: 1px; font-family: Verdana, Arial, Helvetica, sans-serif; color: rgb0, 0, 0; font-weight: normal; font-size: 12px; line-height: 1.4; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; -: n&#111;ne; ">We were finally able to move to the latest version (6.1.1.0) a few days ago and I just got this same error. &nbsp;It seems to be considerably more rare than it used to be but that could just be because of unrelated factors (network speed, etc.).<div><br></div><div>The details are the same as I reported above. &nbsp;Unfortunately, since the original exception gets re-thrown without being wrapped, there isn't any stack trace for the original InvalidOpertaionException.</div><div><br></div><div>We have a number of Corourtines that all execute around the same time (right when the user logs in) so I haven't been able to isolate the particular coroutine code that is breaking. &nbsp;But I can confirm that there are still some problems in the latest version :-).</div></div>]]>
   </description>
   <pubDate>Wed, 29 Jun 2011 15:03:15 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2636&amp;PID=11146#11146</guid>
  </item> 
  <item>
   <title>Coroutine and Errors : Thanks for the update. There are...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2636&amp;PID=10617#10617</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=613" rel="nofollow">stephenmcd1</a><br /><strong>Subject:</strong> 2636<br /><strong>Posted:</strong> 09-May-2011 at 5:24pm<br /><br />Thanks for the update. &nbsp;There are some breaking changes in 6.1.0 that are temporarily keeping us from upgrading but we plan to do so relatively soon. &nbsp;I'll update this forum when we do upgrade and I can do some testing. &nbsp;Unfortunately, the errors would come up pretty irregularly so I'll probably just have to wait a while after we upgrade and see if the error comes up.]]>
   </description>
   <pubDate>Mon, 09 May 2011 17:24:09 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2636&amp;PID=10617#10617</guid>
  </item> 
  <item>
   <title>Coroutine and Errors : Hi Stephen,   DevForce 6.1.0...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2636&amp;PID=10604#10604</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=892" rel="nofollow">sbelini</a><br /><strong>Subject:</strong> 2636<br /><strong>Posted:</strong> 06-May-2011 at 9:41am<br /><br />Hi Stephen, <DIV>&nbsp;</DIV><DIV>DevForce 6.1.0 has bee released.</DIV><DIV>Can you verify if this issue is still present after the update?</DIV><DIV>&nbsp;</DIV><DIV>Regards,</DIV><DIV>&nbsp;&nbsp; Silvio.</DIV>]]>
   </description>
   <pubDate>Fri, 06 May 2011 09:41:51 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2636&amp;PID=10604#10604</guid>
  </item> 
  <item>
   <title>Coroutine and Errors : Hi Stephen,  Could you send...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2636&amp;PID=10537#10537</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=892" rel="nofollow">sbelini</a><br /><strong>Subject:</strong> 2636<br /><strong>Posted:</strong> 26-Apr-2011 at 9:25am<br /><br />Hi Stephen,<DIV>&nbsp;</DIV><DIV>Could you send me your coroutine code? </DIV><DIV>We have found an issue that throws similar exception. </DIV><DIV>While the bug we found has been fixed (and the fix will be present in the next release), I'd like to know if your failing code is similar to the one we reproduced the issue.</DIV><DIV>&nbsp;</DIV><DIV>Silvio.</DIV>]]>
   </description>
   <pubDate>Tue, 26 Apr 2011 09:25:38 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2636&amp;PID=10537#10537</guid>
  </item> 
  <item>
   <title>Coroutine and Errors :  We are experiencing intermittent...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2636&amp;PID=10530#10530</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=613" rel="nofollow">stephenmcd1</a><br /><strong>Subject:</strong> 2636<br /><strong>Posted:</strong> 25-Apr-2011 at 3:26pm<br /><br /><p>We are experiencing intermittent errors when executing some queries using Coroutines. &nbsp;The trouble is, the stack trace of the error is being overwritten because of the way the CoroutineOperation.HandleError() works. &nbsp;If there is an exception, it is rethrown but it doesn't wrap the exception so the stack trace gets blown away.</p><p>For example, below are the details of an exception we just recieved. &nbsp;The error message isn't terribly helpful and since we don't know what code originally threw the exception it is even harder to track down.</p><p>I guess my question is in two parts. &nbsp;First, can the error handling code be enhanced a bit to preserve the original stack trace (I think that is how I normally see DevForce do it). &nbsp;Then secondly, do you have any idea why I might receive an error like the one below? &nbsp;I don't have a lot of context because the exception is so vague and there isn't any of my actual code on the stack trace so I don't know what kind of query started this off. &nbsp;Any guidance would be appreciated.</p><p><table width="99%"><tr><td><pre class="BBcode">Exception Type: System.InvalidOperationException<br>Message: Collection was modified; enumeration operation may not execute.<br>StackTrace:<br>at IdeaBlade.EntityModel.CoroutineOperation.HandleError(INotifyCompletedArgs notifyCompletedArgs)<br>   at IdeaBlade.EntityModel.CoroutineOperation.OnCompleted(INotifyCompletedArgs notifyCompletedArgs)<br>   at IdeaBlade.EntityModel.CoroutineParallelProcessor.CompletionItem.HandleCompleted(INotifyCompletedArgs args)<br>   at IdeaBlade.EntityModel.BaseOperation.BaseOnCompleted()<br>   at IdeaBlade.EntityModel.BaseOperation`2.OnCompleted()<br>   at IdeaBlade.EntityModel.BaseOperation`2.IdeaBlade.EntityModel.IHasAsyncEventArgs.OnCompleted()<br>   at IdeaBlade.EntityModel.AsyncProcessor`1.&lt;&gt;c__DisplayClass2.&lt;.ctor&gt;b__0(TArgs args)<br>   at IdeaBlade.EntityModel.AsyncProcessor`1.Signal()<br>   at IdeaBlade.EntityModel.AsyncProcessor`1.&lt;Execute&gt;b__5(Object x)<br>   at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(Object state)<br>   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)<br>   at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()<br>   at System.Threading.ThreadPoolWorkQueue.Dispatch()<br>&nbsp;  at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()</pre></td></tr></table></p>]]>
   </description>
   <pubDate>Mon, 25 Apr 2011 15:26:02 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2636&amp;PID=10530#10530</guid>
  </item> 
 </channel>
</rss>