Video Screencast Help
Symantec to Separate Into Two Focused, Industry-Leading Technology Companies. Learn more.

Collection was modified; enumeration operation may not execute.

Created: 27 Mar 2013 • Updated: 07 Oct 2013 | 23 comments

I am randomly getting the following error in a Workflow project and a WebForm project (Workflow 7.1 SP2):

Component Name: Request for Extension

Exception Message: Collection was modified; enumeration operation may not execute.

Error Stack Trace:

System.InvalidOperationException: Collection was modified; enumeration operation may not execute. at System.Collections.Hashtable.HashtableEnumerator.MoveNext() at LogicBase.Core.Data.OrchestrationData.Clone(Boolean allowExternal) at LogicBase.Components.FormBuilder.FormBuilderComponentRenderer.GetRenderData(IData data) at LogicBase.Components.FormBuilder.FormBuilderComponentRenderer.LoadComplete() at LogicBase.Components.FormBuilder.FormBuilderComponent.LogicBase.Core.Models.Dialog.IAspNetPageComponent.LoadComplete(ComposerForm page) at LogicBase.Core.Models.Dialog.ComposerForm.OnLoadComplete(EventArgs e)

I've been randomly getting it inside a new "Time Tracking" web form project that has two grid components inside of the main form. The error only seems to trigger after a user has left the form open for a period of time and then tries to start working in it again. I do have a Refresh Page On Timer component on the form set to 10 minutes to refresh the page.

For the workflow project, the error has only happened once so far inside a Dialog Workflow with the initial entry form (Component Name: Request for Extension). The strange thing is the workflow project has no collection/array type of variables in it so I'm wonder what might be triggering the error "Collection was modified; enumeration operation may not execute."

Thanks for any suggestions on how to fix this!

Operating Systems:

Comments 23 CommentsJump to latest comment

africo's picture

Usually for page timeouts, i change the Idle Time-out (minutes) value for the application pool.  Give that a shot and see what happens.

reecardo's picture

This was (supposedly) fixed in the 7.1 Sp2 MP1 release... we added a lock around the Clone operation that some customers were getting.

Aryanos's picture

I'm getting this issue randomly as well. reecardo, is there going to be a fix for 7.1 SP1 released for this? 

I like my beats fast and my bass down low

reecardo's picture

This would be really easy to push down to our SP1 rollup. contact support and reference this Connect thread.

Aryanos's picture

Thanks reecardo, I'll do that.

I like my beats fast and my bass down low

matzebru's picture

I updated our Workflow Server from 7.1 SP2 to 7.1 SP2 MP1.1 this past weekend. I then updated my Workflow Designer system from 7.1 SP2 to 7.1 SP2 MP1.1, recompiled the integration library and web form project that was having the issue and re-published them to the server this morning. The random "Collection was modified; enumeration operation may not execute." errors are still happening though. Any other thoughts?

Thanks

- Bruce

 *** If a forum post solves your problem, please flag it as a solution. If you like an article or forum post, vote it up. ***

Aryanos's picture

Please don't tell me that, we just got a rollup with the fix for it and I'm planning to put it in this week so hearing it didn't resolve the issue is concerning.

I like my beats fast and my bass down low

jahus's picture

I am also getting this error randomly in my project.

I am running SMP 7.1 SP2 (7.1.8280)

 

Did you manage to fix this? If so, what worked?

jahus's picture

Btw. I have already experimented with application pool timeouts and the error is not related to that setting. So my guess would be that it is indeed a bug in Workflow.

Therefore I am interested in hearing what version actually fixed this if any?

reecardo's picture

There was a checkin around this that should have showed up in the 7.1 Sp2 MP1 release (and all releases past that). Some customers were reporting issues around this, and some code was added (basically, the C# just added a lock around a Clone operation in WF)

jahus's picture

It seems from this comment and this comment that the check-in wrt. adding a lock did not resolve the issue.

Do you have some sort of public bug tracking, where I can monitor when this issue is resolved?

I have a production system with daily crashes due to this problem.

matzebru's picture

My "resolution" to the issue was to remove alot of the complexity of trying to use dynamic item source models in 3 ajax labels and a grid component, as these were all triggering the error. I was under pressure by managment to get this process into production so I kept it simple and just used some javascript to hit a hidden button to pass out of the form to do all the variable updates and pass back in static values.

I haven't had any issues since then but of course it's only a workaround and not a true "fix".

- Bruce

 *** If a forum post solves your problem, please flag it as a solution. If you like an article or forum post, vote it up. ***

jahus's picture

Not the best news, but thank you for the very detailed information on a viable workaround.

BRING's picture

This should be fixed in Workflow build 7.1.1600.66.  And fixed in 7.5, which is where Workflow only customers should be at.  If there are still problems, please contact support with debug level logs.   We also do not maintain a public list of bugs to be tracked.  While that may seem like a nice feature for external customers, I am sure that you can understand why that information is kept internal.

Thank You for the continued feedback on this issue.

jahus's picture

Just to let you know: it has not been fixed in Workflow build 7.1.1600.66.

The frequency of the error has decreased, but it is not gone.

So I don't think it would be right to mark it as a solution. I have an ongoing support case where the problem is under further investigation.

Aryanos's picture

I get this error randomly and it is really frustrating as it happens on a Multiple Value Mapping and Single Value Mapping components that is an important piece of the workflow. As I mentioned above when this happens and you try it again right away it works.

I like my beats fast and my bass down low

Aryanos's picture

I was told by Support that this issue still exists in WF 7.5. Can someone from Symantec please let me know if this is going to be fixed soon in a hot fix or next update?

I like my beats fast and my bass down low

africo's picture

like Matzebru, i removed some ajax labels and all is now well.  no longer having this issue.  seems that when an ajax label is merging a piece of an array, it triggers this error.  it was for me, anyway.

Aryanos's picture

It's happening on the data mapping components for me and I'm not using any ajax labels. 

I like my beats fast and my bass down low

reecardo's picture

We have recently checked in a fix for this reopened issue into our trunk. To my knowledge, it has not been pushed back down to any rollups. If there is a need, I would contact support and request it.

Aryanos's picture

Hi reecardo,

I was told that the 7.1 WF and SD platforms have been EOL so would they still be able to push this into a rollup for 7.1 SP1?

I like my beats fast and my bass down low

reecardo's picture

I know this has been put into the SP2 rollup (as of today)... and it's not too complex where it could be put back into an SP1 rollup.

Aryanos's picture

Thanks reecardo, I'll contact support and hopefully they can provide a rollup.

I like my beats fast and my bass down low