Bug Report B133946
Visible to All Users

The ArgumentException with the "The passed object belongs to another ObjectSpace" message is thrown when canceling inline editing in the ASPxGridListEditor

created 16 years ago

Hi!
I activate servermode for my WebApp.
Now, if I click on edit for inline editing and then press cancle I get the following error:
The masterObject belongs to a different ObjectSpace Parametername: masterObject
If I click save, it works just fine.
Steps to Reproduce:
See the video
Actual Results:
Cannot access a disposed object.
Object name: 'DevExpress.Xpo.UnitOfWork(64)'.
>     DevExpress.Xpo.v8.3.dll!DevExpress.Xpo.Session.Connect() + 0x53 bytes
      DevExpress.Xpo.v8.3.dll!DevExpress.Xpo.Session.Dictionary.get() + 0xb2 bytes
      DevExpress.Xpo.v8.3.dll!DevExpress.Xpo.Session.GetClassInfo(System.Type classType = {Name = "Task" FullName = "Puresoft.ExpressApplication.Module.Tasks.Task"}) + 0x25 bytes
      DevExpress.Xpo.v8.3.dll!DevExpress.Xpo.XpoDataSourceView.ExecuteSelect(System.Web.UI.DataSourceSelectArguments arguments = {System.Web.UI.DataSourceSelectArguments}) + 0x3b8 bytes
      System.Web.dll!System.Web.UI.DataSourceView.Select(System.Web.UI.DataSourceSelectArguments arguments, System.Web.UI.DataSourceViewSelectCallback callback = {Method = {Void OnDataSourceViewSelectCallback(System.Collections.IEnumerable)}}) + 0x14 bytes
      DevExpress.Web.v8.3.dll!DevExpress.Web.ASPxClasses.Internal.DataHelper.PerformSelect() + 0xb1 bytes
      DevExpress.Web.ASPxGridView.v8.3.dll!DevExpress.Web.ASPxGridView.GridViewDataHelper.PerformSelect() + 0xab bytes
      DevExpress.Web.v8.3.dll!DevExpress.Web.ASPxClasses.Internal.DataContainer.PerformSelect() + 0x7c bytes
      DevExpress.Web.v8.3.dll!DevExpress.Web.ASPxClasses.ASPxDataWebControlBase.DataBindCore() + 0x2d bytes
      DevExpress.Web.v8.3.dll!DevExpress.Web.ASPxClasses.ASPxDataWebControlBase.DataBind() + 0xaf bytes
      DevExpress.Web.ASPxGridView.v8.3.dll!DevExpress.Web.ASPxGridView.ASPxGridView.DataBind() + 0xe0 bytes
      DevExpress.ExpressApp.Web.v8.3.dll!DevExpress.ExpressApp.Web.Editors.ASPx.ASPxGridControl.DataBind() + 0x2a bytes
      DevExpress.ExpressApp.Web.v8.3.dll!DevExpress.ExpressApp.Web.Editors.ASPx.ASPxGridControl.OnLoad(System.EventArgs e = {System.EventArgs}) + 0x3b bytes
      System.Web.dll!System.Web.UI.Control.LoadRecursive() + 0x33 bytes
      System.Web.dll!System.Web.UI.Control.LoadRecursive() + 0x8e bytes
      System.Web.dll!System.Web.UI.Control.LoadRecursive() + 0x8e bytes
      System.Web.dll!System.Web.UI.Control.LoadRecursive() + 0x8e bytes
      System.Web.dll!System.Web.UI.Control.LoadRecursive() + 0x8e bytes
      System.Web.dll!System.Web.UI.Control.LoadRecursive() + 0x8e bytes
      System.Web.dll!System.Web.UI.Control.LoadRecursive() + 0x8e bytes
      System.Web.dll!System.Web.UI.Page.ProcessRequestMain(bool includeStagesBeforeAsyncPoint = true, bool includeStagesAfterAsyncPoint = true) + 0x274 bytes
      System.Web.dll!System.Web.UI.Page.ProcessRequest(bool includeStagesBeforeAsyncPoint, bool includeStagesAfterAsyncPoint = true) + 0x84 bytes
      System.Web.dll!System.Web.UI.Page.ProcessRequest() + 0x51 bytes
      System.Web.dll!System.Web.UI.Page.ProcessRequestWithNoAssert(System.Web.HttpContext context) + 0x16 bytes
      System.Web.dll!System.Web.UI.Page.ProcessRequest(System.Web.HttpContext context) + 0x32 bytes
      App_Web_emdzuw7x.dll!ASP.default_aspx.ProcessRequest(System.Web.HttpContext context = {System.Web.HttpContext}) + 0x33 bytes     C#
      System.Web.dll!System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() + 0xb6 bytes
      System.Web.dll!System.Web.HttpApplication.ExecuteStep(System.Web.HttpApplication.IExecutionStep step = {System.Web.HttpApplication.CallHandlerExecutionStep}, ref bool completedSynchronously = true) + 0x4c bytes
      System.Web.dll!System.Web.HttpApplication.ApplicationStepManager.ResumeSteps(System.Exception error) + 0x133 bytes
      System.Web.dll!System.Web.HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest(System.Web.HttpContext context, System.AsyncCallback cb, object extraData) + 0x7c bytes
      System.Web.dll!System.Web.HttpRuntime.ProcessRequestInternal(System.Web.HttpWorkerRequest wr = {Microsoft.VisualStudio.WebHost.Request}) + 0x17c bytes
      System.Web.dll!System.Web.HttpRuntime.ProcessRequestNoDemand(System.Web.HttpWorkerRequest wr) + 0x63 bytes
      System.Web.dll!System.Web.HttpRuntime.ProcessRequest(System.Web.HttpWorkerRequest wr) + 0x47 bytes
      WebDev.WebHost.dll!Microsoft.VisualStudio.WebHost.Request.Process() + 0x165 bytes
      WebDev.WebHost.dll!Microsoft.VisualStudio.WebHost.Host.ProcessRequest(Microsoft.VisualStudio.WebHost.Connection conn = {System.Runtime.Remoting.Proxies.__TransparentProxy}) + 0x6c bytes

Show previous comments (2)
Dennis Garavsky (DevExpress) 16 years ago

    Hello Robert,
    Thanks for the video you sent to us. Unfortunately, it did not help us much. We cannot determine what's wrong with your project just looking at the problem and not being able to play with it. The call stack you captured doesn't help us find the cause of the problem. We need a sample.
    Could you please send us a copy of your real project? Before that, please remove unnecessary parts of the code, which don't relate to the current problem. Please leave only the classes involved in the scenario, in which this error is reproducible. If it is not possible to prepare such a test project, we are ready to investigate your entire project. In this case, please give us a simple step-by-step instruction on how to make it run in a regular environment, so that we can easily investigate it ourselves.
    To safe your property here, I have marked this issue as Private.
    >>
     how can I check if the
    application realy uses the Servermode ?
    <<
    If you set the UseServerMode options your application should work in this mode. In this mode the ServerCollectionSource class is used in list views.
    Thank you for your effort,
    Dennis

      Hi Dennis, I tried my best to simplify the application.
      You need a sample database (MSSQL) named B133946.
      In den Updater.cs I insert the minimum sample data.
      You can login with the user Admin and no password.
      Then click the edit link for inline editing and then click cancel like I do it in the sample movie.
      thanks
      robert

      Dennis Garavsky (DevExpress) 16 years ago

        Hello Robert,
        Thanks a lot for your sample. We have had no problems in forcing it to run. I can reproduce the problem using the latest version of XAF.
        I briefly checked your Task class and it seems to be correct, though it requires a more closer look.
        I also noticed that this problem is reproduced in all InlineEditModes for this class, but everything works fine for other classes. The problem looks like a bug caused by incorrect code in the Task class or a Controller for this class. To ensure this, we will investigate your solution more deeply, and will let you know about our results soon.
        Thank you for your patience,
        Dennis

        Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

        Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.