Hi,
After whole day debugging and tracing by modify SF source code, I found that, we hit new error which is more "explainable" for me. As we can see the error "An item with the same key has already been added", and I found that, TypePropertyCache.GetPropertyInfo() is a static/shared method. Meanwhile, _Dictionary used by TypePropertyCache is also static/shared. However, I couldn't find any code that ensure thread-safe. Is it a mistake?
Regarding why I hit Object reference is null ... I still unable to find out the cause.
Server Error in '/FlexHR' Application.
--------------------------------------------------------------------------------
An item with the same key has already been 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: An item with the same key has already been 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.
Stack Trace:
[ArgumentException: An item with the same key has already been added.]
System.ThrowHelper.ThrowArgumentException(ExceptionResource resource) +48
System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add) +2668392
System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value) +11
MicroFour.StrataFrame.Business.TypePropertyCache.GetPropertyInfo(Type OwnerType, String PropertyName) +505
MicroFour.StrataFrame.Business.TypePropertyCache.GetPropertyInfo(Object Owner, String PropertyName) +45
MicroFour.StrataFrame.Business.BusinessLayer.BindDataToWebControl(IWebBusinessBindable ControlToBind, IWebBinding Binding) +251
MicroFour.StrataFrame.Business.BusinessLayer.BindDataToWebControlPrimary(IWebBusinessBindable ControlToBind) +55
MicroFour.StrataFrame.UI.Web.BasePage.BindControls() +166
[UIException: An error occurred while binding data to the web control 'deDateFrom'.]
Vfs.Generic.UI.Web.Strataframe.Forms.BasePage.OnPreRender(EventArgs e) +322
System.Web.UI.Control.PreRenderRecursiveInternal() +86
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2041
Beside, I also hit this error, if not mistaken no other user is running beside myself. As I check _SharedTables is also static/shared and didn't see any code ensure threadsafe in ShareCurrentDataTable().
Server Error in '/FlexHR' Application.
Object reference not set to an instance of an object.
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.NullReferenceException: Object reference not set to an instance of an object.
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:
[NullReferenceException: Object reference not set to an instance of an object.]
System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add) +455
System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value) +11
MicroFour.StrataFrame.Business.SharedDataTableCollection.AddBusinessObjectTable(BusinessLayer BusinessObject) +243
MicroFour.StrataFrame.Business.BusinessLayer.ShareCurrentDataTable(BusinessLayer BusinessObject) +162
MicroFour.StrataFrame.Business.BusinessBindingSource.CreateShareAndAddBusinessObject(Int32 index) +94
MicroFour.StrataFrame.Business.BusinessBindingSource.get_Item(Int32 index) +115
MicroFour.StrataFrame.Business.Enumerator.get_Current() +34
MicroFour.StrataFrame.UI.Web.Enumerator.get_Current() +9
DevExpress.Web.ASPxClasses.Internal.CommonUtils.ConvertEnumerableToList(IEnumerable source) +98
DevExpress.Web.Data.WebDataProxy.SetDataSource(Object dataSource) +48
DevExpress.Web.ASPxGridView.ASPxGridView.PerformDataBinding(String dataHelperName, IEnumerable data) +48
DevExpress.Web.ASPxClasses.Internal.DataHelper.PerformDataBinding(IEnumerable data) +26
DevExpress.Web.ASPxClasses.Internal.DataHelper.OnDataSourceViewSelectCallback(IEnumerable data) +75
System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +29
MicroFour.StrataFrame.UI.Web.WebBusinessBindingSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +8
DevExpress.Web.ASPxClasses.Internal.DataHelper.PerformSelect() +197
DevExpress.Web.ASPxGridView.GridViewDataHelper.PerformSelect() +116
DevExpress.Web.ASPxClasses.Internal.DataContainer.PerformSelect() +118
DevExpress.Web.ASPxClasses.ASPxDataWebControlBase.DataBindCore() +15
DevExpress.Web.ASPxClasses.ASPxDataWebControlBase.DataBind() +138
DevExpress.Web.ASPxGridView.ASPxGridView.DataBind() +157
DevExpress.Web.ASPxClasses.Internal.DataHelperBase.EnsureDataBound(Boolean ensureChildControls) +89
DevExpress.Web.ASPxClasses.Internal.DataContainer.EnsureDataBound() +128
DevExpress.Web.ASPxClasses.ASPxDataWebControlBase.OnPreRender(EventArgs e) +19
Vfs.Generic.UI.Web.DevEx.Controls.BaseGridView.OnPreRender(EventArgs e) +40
System.Web.UI.Control.PreRenderRecursiveInternal() +86
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2041
Finally, FYI, I have recompile all SF dll from source code.
Please advice. Thank you