[Umbraco] Item has already been added. Key in dictionary: '??' Key being added: '??'

Error description:

Server Error in '/' Application.

Item has already been added. Key in dictionary: '??'  Key being added: '??'

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.ArgumentException: Item has already been added. Key in dictionary: '??'  Key being added: '??'
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.

DB Log:

At /umbraco/editContent.aspx?id=???? (Referred by: http://localhost/umbraco/umbraco.aspx): System.ArgumentException: Item has already been added. Key in dictionary: '??'  Key being added: '82'     at System.Collections.Hashtable.Insert(Object key, Object nvalue, Boolean add)     at umbraco.controls.ContentControl.CreateChildControls()     at System.Web.UI.Control.EnsureChildControls()     at umbraco.controls.ContentControl.OnInit(EventArgs e)     at System.Web.UI.Control.InitRecursive(Control namingContainer)     at System.Web.UI.Control.AddedControl(Control control, Int32 index)     at umbraco.cms.presentation.editContent.OnInit(EventArgs e)     at System.Web.UI.Control.InitRecursive(Control namingContainer)     at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)


How to reproduce the problem in my environments.(NOT 100%) : 

1. Create a document type with multiple tabs and inherited other tabs from parents document type.

2. Create a node and get {nodeId}.

3. Open edit page URL http://localhost/umbraco/editContent.aspx?id={nodeId}. on multiple browser (Here I used three difference browsers in the same time. )

3. Run command iisreset

4. Repeated step 2 & 3.


Temporary Solution:

1. Recycle Application pool.



Update : 2014.04.23

This is Umbraco bug will affected versions 4.7.0 & 4.8.0 , already fixed in changeset 18d853003c17 in 4.9.0 , the root cause is :
// This class can be cached and potentially shared between multiple threads.
// Two or more threads can attempt to lazyily-load its virtual tabs at the same time.
// If that happens, the m_VirtualTabs will contain duplicates.
// We must prevent two threads from running InitializeVirtualTabs at the same time.
// We must also prevent m_VirtualTabs from being modified while it is being populated.
// optimize, lazy load the data only one time

The issue may occur on every 30 min once the ContentType Cache refresh.

Permanent Solution:

  1. Update source code at /src/umbraco.cms/businesslogic/ContentType.cs , and rebuild source code to get businesslogic.dll
  2. Upgrade Umbraco version to v4.9.0


More Information :

The "GenerateResource" task failed unexpectedly.

Error description:

The "GenerateResource" task failed unexpectedly.
System.TypeInitializationException: The type initializer for 'Microsoft.Build.Utilities.FileTracker' threw an exception. ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at Microsoft.Build.Utilities.FileTracker..cctor()
   --- End of inner exception stack trace ---
   at Microsoft.Build.Utilities.FileTracker.ForceOutOfProcTracking(ExecutableType toolType, String dllName, String cancelEventName)
   at Microsoft.Build.Tasks.GenerateResource.Execute()
   at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
   at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask, Boolean& taskResult)    umbraco.presentation



Refers to Microsoft.NET Framework v4.0.30319
Go to directory C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(Preferably -Open the file with Notepad)
Search for <PropertyGroup> , and then set <TrackFileAccess> to false

Reference: http://connect.microsoft.com/VisualStudio/feedback/details/501894/the-generateresource-task-failed-unexpectedly-system-dllnotfoundexception-unable-to-load-dll-filetracker-dll-the-specified-module-could-not-be-found-exception-from-hresult-0x8007007e