Closed AnthonyAtApex closed 2 years ago
Is it only on .net6? Can you provide minimal snippet of code which cause this problem?
It's possible that it's in .Net 5 too, but it was exacerbated with .Net 6. QA says they've saw the SOAP issue since we implemented DeepCloner it just wasn't reproducible on demand like it was with .Net 6.
we were using it like this:
public static T? Clone
public static async Task<T?> CloneAsync
public static async Task<T?> CloneDataContractAsync
await sqlConnection.CloneAsync();
Please, do on clone SqlConnection object. DeepCloner will create not copy of connection, but copy of connection class. So, you'll have two simultaneous instances of one sql connection. Moreover, SqlConnection uses native resources which impossible to clone (it's out of .NET). So, when you Dispose one connection and use second - the second one uses already released native resources and this causes Access Violation.
DeepCloner is intended to copy DTO objects without complex logic on it. Yes, it can be used to copy any complex structure, but behavior is undefined for this.
That makes sense. Thanks.
Howdy...
We spent the last 3 weeks working with MS on an issues without SOAP interface where we have integrated the DeepCloner tool. According to MS Support the DeepCloner is causing HEAP corruption which is then causing the Garbage Collector to throw errors due to Access Violations. This causes the dotNet6 framwork to crash and make the SOAP interface non-responsive.
Has anyone else see this issue? Any more info that the devs can use to fix this issue?