Bug Report T332393
Visible to All Users

ObjectDisposedException is thrown when the Kpi-Definition detail view is refreshed in certain scenarios

created 9 years ago

Dear Team,
I found a problem by clicking the refresh button within the Kpi-Definition-DetailView .
The ProxyCollection which is used for showing the matching objects for the criteria is recreated on clicking the refresh button (the preview tab must be visible), but the old collection is not deregistered from the underlying object space. On each click on the refresh button you got more and more ProxyCollection-Instances.
If you have complex criteria which use child objects for filtering and edit now one of these objects you get an ObjectDisposedException on saving your changes. The reason is that the old still existing ProxyCollection instances get an event by the object space for reloading but they can’t because of an already disposed session.
Please can you check this?
 Thank you

Best regards
Melanie

Show previous comments (1)
DevExpress Support Team 9 years ago

    Hello Melanie,

    I was unable to replicate the issue on my side using the XCRM demo. I have created a video showing my attempts. It seems that I missed some important steps in my attempts to reproduce the issue. Please record a video to illustrate the steps necessary to recreate this behavior on our side.
    I hope to hear from you soon.

    Thanks,
    Marina

    MM MM
    Melanie Meurer 9 years ago

      Hello Marina,
      Here is a video which demonstrates what happens in your code.
      I am using in this video a simple XAF Application with the KPI Module, nothing else.
      I created a simple KPI Definition without any restriction. It returns no objects, however we don’t need any data for the demonstration.
      I set two breakpoints in the code, first in the constructor of the ProxyCollection-class and the other one in the objectSpace_Reloaded-method of the CollectionSourceBase-class.
      Please take a look on the video and see what happens on clicking the refresh button multiple times.
      You get two ProxyCollection-instances more per click, the old ones are still registered to the object space and get the reload event.
      Thanks,
      Melanie

      DevExpress Support Team 9 years ago

        Hello Melanie,

        Thank you for the video. I have managed to reproduce this issue. I'll forward this ticket to our R&D team. They will examine it and do their best to resolve this issue.

        Thanks,
        Marina

        Answers approved by DevExpress Support

        created 9 years ago

        We have fixed the issue described in this ticket and will include the fix in our next maintenance update. To apply this solution before the official update, request a hotfix by clicking the corresponding link for product versions you require.

        Note: Hotfixes may be unavailable for beta versions and updates that are about to be released.

          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.