Exception if two person access the same page at the same time


Author
Message
ChanKK
ChanKK
Advanced StrataFrame User (622 reputation)Advanced StrataFrame User (622 reputation)Advanced StrataFrame User (622 reputation)Advanced StrataFrame User (622 reputation)Advanced StrataFrame User (622 reputation)Advanced StrataFrame User (622 reputation)Advanced StrataFrame User (622 reputation)Advanced StrataFrame User (622 reputation)Advanced StrataFrame User (622 reputation)
Group: Forum Members
Posts: 190, Visits: 1.3K
Hi,

I hit the error below if two person access the same page at the same time. Even though I have replaced the latest Business.dll (this time confirmed is replaced) Please advice. Thank you



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:





Line 184: protected override void OnPreRender(EventArgs e)

Line 185: {

Line 186: base.OnPreRender(e);

Line 187:

Line 188: this.ErrorIcon = "../images/ErrorIcon.png";







Source File: C:\FlexHR\Trunk\Mainline\Generic\UI\Web\Strataframe\Forms\BasePage.cs Line: 186



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) +143

System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value) +11

MicroFour.StrataFrame.Business.TypePropertyCache.GetPropertyInfo(Type OwnerType, String PropertyName) +259

MicroFour.StrataFrame.Business.TypePropertyCache.GetPropertyInfo(Object Owner, String PropertyName) +22

MicroFour.StrataFrame.Business.BusinessLayer.BindDataToWebControl(IWebBusinessBindable ControlToBind, IWebBinding Binding) +196

MicroFour.StrataFrame.Business.BusinessLayer.BindDataToWebControlPrimary(IWebBusinessBindable ControlToBind) +62

MicroFour.StrataFrame.UI.Web.BasePage.BindControls() +150



[UIException: An error occurred while binding data to the web control 'lblDocRef'.]

MicroFour.StrataFrame.UI.Web.BasePage.BindControls() +570

MicroFour.StrataFrame.UI.Web.BasePage.Page_PreRender(Object sender, EventArgs e) +7

System.Web.UI.Control.OnPreRender(EventArgs e) +8679510

Vfs.Generic.UI.Web.Strataframe.Forms.BasePage.OnPreRender(EventArgs e) in C:\FlexHR\Trunk\Mainline\Generic\UI\Web\Strataframe\Forms\BasePage.cs:186

System.Web.UI.Control.PreRenderRecursiveInternal() +80

System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +842





--------------------------------------------------------------------------------



Version Information: Microsoft .NET Framework Version:2.0.50727.3053; ASP.NET Version:2.0.50727.3053




Reply
ChanKK
ChanKK
Advanced StrataFrame User (622 reputation)Advanced StrataFrame User (622 reputation)Advanced StrataFrame User (622 reputation)Advanced StrataFrame User (622 reputation)Advanced StrataFrame User (622 reputation)Advanced StrataFrame User (622 reputation)Advanced StrataFrame User (622 reputation)Advanced StrataFrame User (622 reputation)Advanced StrataFrame User (622 reputation)
Group: Forum Members
Posts: 190, Visits: 1.3K
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
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
ChanKK - 16 Years Ago
Trent L. Taylor - 16 Years Ago
ChanKK - 16 Years Ago
Trent L. Taylor - 16 Years Ago
ChanKK - 16 Years Ago
ChanKK - 16 Years Ago
Trent L. Taylor - 16 Years Ago
ChanKK - 16 Years Ago
ChanKK - 16 Years Ago
                         I've wrapped most of those that needed it in a SyncLock. Several of...
StrataFrame Team - 16 Years Ago
                             Hi,
May I know when would it available for download?
...
ChanKK - 16 Years Ago
                                 We will do another build tomorrow morning.
Trent L. Taylor - 16 Years Ago
                                     I will send you a link to a custom build to test this this afternoon....
Trent L. Taylor - 16 Years Ago

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search