Collection was modified; enumeration operation may not execute. Options
SharpGIS
Posted: Tuesday, August 15, 2006 10:53:09 AM
Rank: Devotee

Joined: 7/20/2006
Posts: 32
I've started to get the error below on random while browsing our website. Furthermore it seems that IIS keeps restarting with a few minutes interval. This is something that has started today and haven't been seen before (and I didn't change a thing!)

Collection was modified; enumeration operation may not execute.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.InvalidOperationException: Collection was modified; enumeration operation may not execute.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[InvalidOperationException: Collection was modified; enumeration operation may not execute.]
System.Web.UI.ControlCollectionEnumerator.MoveNext() +2057474
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +139
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +24
System.Web.UI.Control.Render(HtmlTextWriter writer) +7
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +25
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +121
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +22
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +130
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +24
System.Web.UI.Control.Render(HtmlTextWriter writer) +7
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +25
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +121
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +22
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +130
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +24
System.Web.UI.Control.Render(HtmlTextWriter writer) +7
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +25
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +121
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +22
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +130
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +24
System.Web.UI.Control.Render(HtmlTextWriter writer) +7
umbraco.layoutControls.umbracoPageHolder.Render(HtmlTextWriter output) +4
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +25
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +121
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +22
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +130
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +24
System.Web.UI.Page.Render(HtmlTextWriter writer) +26
umbraco.WebForm1.Render(HtmlTextWriter output) +56
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +25
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +121
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +22
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1896


Furthermore I get this in the server event log:

Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 8/15/2006 10:45:35 AM
Event time (UTC): 8/15/2006 8:45:35 AM
Event ID: b9ed0b37047442a6904a7354b93d595a
Event sequence: 2230
Event occurrence: 13
Event detail code: 0

Application information:
Application domain: /LM/W3SVC/20/Root-2-128001043990937500
Trust level: Full
Application Virtual Path: /
Application Path: C:\www\
Machine name: BLOMINFOWEB

Process information:
Process ID: 1880
Process name: aspnet_wp.exe
Account name: BLOMINFOWEB\ASPNET

Exception information:
Exception type: HttpUnhandledException
Exception message: Exception of type 'System.Web.HttpUnhandledException' was thrown.

Request information:
Request URL: http://www.ourdomain.com/umbraco/dialogs/publish.aspx?id=1136
Request path: /umbraco/dialogs/publish.aspx
User host address: 80.167.43.82
User:
Is authenticated: False
Authentication Type:
Thread account name: SERVER\ASPNET

Thread information:
Thread ID: 19
Thread account name: SERVER\ASPNET
Is impersonating: False
Stack trace: at System.Web.UI.Page.HandleError(Exception e)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at ASP.umbraco_dialogs_publish_aspx.ProcessRequest(HttpContext context)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)


Custom event details:

SharpGIS
Posted: Tuesday, August 15, 2006 10:54:32 AM
Rank: Devotee

Joined: 7/20/2006
Posts: 32
Just want to add that refreshing the page usually helps, so this is not a static error at all.
SharpGIS
Posted: Tuesday, August 15, 2006 11:15:33 AM
Rank: Devotee

Joined: 7/20/2006
Posts: 32
I was just thinking...
Since this error usually appears while looping something, and the object you're looping gets changed, could this be caused by somebody publishing pages, while somebody else is browsing the website?

Are there some static collections in Umbraco that are likely to get looped (like when you are creating a menu structure), and also gets changed while publishing?
Do Umbraco lock static collections while reading or changing them?
SharpGIS
Posted: Tuesday, August 15, 2006 3:36:08 PM
Rank: Devotee

Joined: 7/20/2006
Posts: 32
Problem solved (Thanks goes to Kasper!).

The problem was caching of the macros, which is now disabled.
acl
Posted: Monday, March 17, 2008 1:09:00 AM
Rank: Devotee

Joined: 12/15/2006
Posts: 40
I've started getting this error too. I can turn off caching of macros, but it would be nice to have them cached. I don't think I cache any macros that would update the control collection between postbacks.
Can anyone shed some light on what the problem could be. I'm running 3.0.2.
aibi
Posted: Friday, May 09, 2008 2:55:40 PM
Rank: Newbie

Joined: 7/7/2007
Posts: 8
Location: Bochnia/Kraków, Poland
SharpGIS wrote:
Problem solved (Thanks goes to Kasper!).

The problem was caching of the macros, which is now disabled.


hm, why is it disabled ? :) have I missed something ? I started getting such an error since some time too. Is it queued as an issue to release with next umbraco version or I have to hack it by my own ? Macro caching is really important for me since my page has some complicated ones which makes lot of computation to render and page has lot of visitors :)
Users browsing this topic
Guest


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.