madb icon indicating copy to clipboard operation
madb copied to clipboard

Device.RefreshProperties fails with ArgumentException

Open camalot opened this issue 8 years ago • 0 comments

Original Bug Filed on CodePlex

If you call Device.RefreshProperties, the code fails with an ArgumentException.

The GetPropReceiver attempts to add the properties to the Device.Properties dictionary. But if a property was already present previously, this will result the .Add operation to fail with an ArgumentException.

The best solution probably is to clear the dictionary before refreshing it. That way, stale properties are removed and the GetPropReciever will never encounter this situation.

camalot avatar May 19 '16 13:05 camalot