NotifyPropertyChanged, An item with the same key has already been added, Issue in 4.0.36

sivasubramanian1811's Avatar

sivasubramanian1811

07 Aug, 2017 10:16 AM

Hi Team,

Regarding the issue described in this support page http://support.sharpcrafters.com/discussions/problems/2563-exception-on-notifypropertychanged-property : Can I get a working sample to reproduce this issue in my side?? Also please explain the nature of the issue.

Please let me know why the above mentioned issue is not listed in the page "PostSharp-ReleaseNotes-4.0.45.html"

Thanks

  1. Support Staff 1 Posted by PostSharp Techn... on 07 Aug, 2017 02:10 PM

    PostSharp Technologies's Avatar

    Hello,

    This bug was fixed by implementing fixes for several other related issues. This is probably why it got overlooked and was not included in the release notes. That was a mistake, but it's just the situation we have now with this bug.

    The reproduction involved async methods with thrown exception and changing the object's property on catch. Similar to the following piece of code:

                public async Task ExecuteWithThrowAndChangeInCatchAsync()
                {
                    try
                    {
                        await this.ThrowingSubtaskAsync();
                    }
                    catch
                    {
                        this.Property = 42;
                    }
                }
    

    Please note that the error was not deterministic, so it can be difficult to reproduce. We advice you to upgrade to the latest version of PostSharp that has this and other bug-fixes already implemented.

    -alex

  2. PostSharp Technologies closed this discussion on 07 Aug, 2017 02:10 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac