<?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 : Weird Intermittent Error</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2010 : Weird Intermittent Error</description>
  <pubDate>Tue, 12 May 2026 22:29:07 -700</pubDate>
  <lastBuildDate>Thu, 27 Dec 2012 17:14:54 -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=3862</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>Weird Intermittent Error :   If youconstruct a new EntityManager...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3862&amp;PID=15472#15472</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=11" rel="nofollow">kimj</a><br /><strong>Subject:</strong> 3862<br /><strong>Posted:</strong> 27-Dec-2012 at 5:14pm<br /><br />If you&nbsp;construct a new EntityManager for a search and do not use the EM on any other threads, then it's difficult to divine the problem here.&nbsp; As you know, the EM is not thread safe, and its internal PendingEntityMap, which is at issue here, is also not thread safe.&nbsp; Under "normal" conditions, at least all test conditions I can come up with which use the EM on a single thread, the error is not reproducible.<div>&nbsp;</div><div>The PendingEntityMap is used to resolve "pending" entities, which are created for any navigation properties which must be resolved&nbsp;asynchronously.&nbsp; When you query tblSMSecurityUser, are you accessing any of its navigation properties after the results are returned?&nbsp;&nbsp; If you're loading results into a DataGrid, could the grid be accessing them?&nbsp; Could any event handlers for any UI controls be accessing the navigation properties?&nbsp; You should look for a situation where this EM, or any entity within it, is being accessed from another thread.&nbsp; You can use the server's debug log to help determine which navigation properties are accessed, since these relation queries are written to the log.&nbsp; The EM Querying event is another good candidate to add debugging diagnostics.</div>]]>
   </description>
   <pubDate>Thu, 27 Dec 2012 17:14:54 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3862&amp;PID=15472#15472</guid>
  </item> 
  <item>
   <title>Weird Intermittent Error : Ths is our code:We created a generic...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3862&amp;PID=15470#15470</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1228" rel="nofollow">Vonzkie</a><br /><strong>Subject:</strong> 3862<br /><strong>Posted:</strong> 27-Dec-2012 at 3:06pm<br /><br />Ths is our code:<div><br></div><div>We created a generic Search Form.</div><div><br></div><div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var constructorInfo = typeof(E).GetConstructor(new Type&#091;&#093; {&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; typeof(bool),&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; typeof(string) ,&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; typeof(EntityServiceOption),&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; typeof(string)&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; });</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var entityManager = constructorInfo.Invoke(new object&#091;&#093; { &nbsp;&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; true,&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ConnectionKey, &nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; EntityServiceOption.UseDefaultService,</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; null}) as E;</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ContextManagerBase&lt;T, E&gt; contextManager = new ContextManagerBase&lt;T, E&gt;(entityManager);</div><div><br></div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var finalQuery = contextManager.BaseQuery.Where(Filter == null ? p =&gt; true : Filter);</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; e.QueryableSource = finalQuery as IQueryable;</div></div><div><br></div><div>Where baseQuery is GetQuery&lt;T&gt;, so basically a basic query.</div><div><br></div><div>Thanks,</div><div>Von</div><div><br></div>]]>
   </description>
   <pubDate>Thu, 27 Dec 2012 15:06:16 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3862&amp;PID=15470#15470</guid>
  </item> 
  <item>
   <title>Weird Intermittent Error :   This could indicate a multi-threading...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3862&amp;PID=15468#15468</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=11" rel="nofollow">kimj</a><br /><strong>Subject:</strong> 3862<br /><strong>Posted:</strong> 27-Dec-2012 at 2:27pm<br /><br />This could indicate a multi-threading problem.<div>&nbsp;</div><div>Can you show us the code for your query (or queries) which you think might be involved?</div>]]>
   </description>
   <pubDate>Thu, 27 Dec 2012 14:27:11 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3862&amp;PID=15468#15468</guid>
  </item> 
  <item>
   <title>Weird Intermittent Error : Hi guys,We&amp;#039;re using EntityInstantFeedbackSource...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3862&amp;PID=15467#15467</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1228" rel="nofollow">Vonzkie</a><br /><strong>Subject:</strong> 3862<br /><strong>Posted:</strong> 27-Dec-2012 at 3:14am<br /><br />Hi guys,<div><br></div><div>We're using EntityInstantFeedbackSource of Devexpress for our Search Form purposes with Devforce nTier Architecture as the datasource.</div><div><br></div><div>Now, majority of our Search Form that queries different kind of tables are working well but some are experiencing issue like "Collection has been modified" during loading or "Index is out of range".</div><div><br></div><div>The problem is that, the issue is intermittent and we can hardly replicate the issue and we don't know when the bug will appear.</div><div><br></div><div>I managed to get some details, can you determine what causes this stack trace?</div><div><br></div><div><div>&nbsp; &nbsp;at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)</div><div>&nbsp; &nbsp;at System.Collections.Generic.List`1.Enumerator.MoveNextRare()</div><div>&nbsp; &nbsp;at System.Collections.Generic.List`1.Enumerator.MoveNext()</div><div>&nbsp; &nbsp;at System.Linq.Enumerable.WhereListIterator`1.MoveNext()</div><div>&nbsp; &nbsp;at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)</div><div>&nbsp; &nbsp;at System.Linq.Enumerable.ToList&#091;TSource&#093;(IEnumerable`1 source)</div><div>&nbsp; &nbsp;at IdeaBlade.EntityModel.PendingEntityMap.FindByFromEntity(EntityAspect fromAspect)</div><div>&nbsp; &nbsp;at IdeaBlade.EntityModel.PendingEntityMap.Update(EntityAspect pendingAspect, EntityAspect realAspect)</div><div>&nbsp; &nbsp;at IdeaBlade.EntityModel.ScalarEntityReference`1.InformPendingEntityOfRealEntity(EntityAspect realEntity)</div><div>&nbsp; &nbsp;at IdeaBlade.EntityModel.ScalarEntityReference`1.QueryCallback(EntityQueryOperation op)</div><div>&nbsp; &nbsp;at IdeaBlade.EntityModel.BaseOperation`2.OnCompleted()</div><div>&nbsp; &nbsp;at IdeaBlade.EntityModel.BaseOperation`2.IdeaBlade.EntityModel.IHasAsyncEventArgs.OnCompleted()</div><div>&nbsp; &nbsp;at IdeaBlade.EntityModel.AsyncProcessor`1.&lt;&gt;c__DisplayClass2.&lt;.ctor&gt;b__0(TArgs args)</div></div><div><br></div><div>Here's the link of our model project &nbsp; <a href="http://www.ideablade.com/forum/uploads/1228/iRely.Model2.rar" target="_blank">uploads/1228/iRely.Model2.rar</a></div><div>, try to check the table tblSMSecurityUser, because that's the entity that we're using to query for that specific Search Form issue.</div><div><br></div><div><br></div><div><br></div><div>Thanks,</div><div>Von</div>]]>
   </description>
   <pubDate>Thu, 27 Dec 2012 03:14:57 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3862&amp;PID=15467#15467</guid>
  </item> 
 </channel>
</rss>