This is a migrated thread and some comments may be shown as answers.

JustMock Profiler causing .Net Framework calls to fail unexpectadly

1 Answer 71 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Craig
Top achievements
Rank 1
Craig asked on 24 Jul 2018, 11:27 PM

I have been trying to chase down a problem with some Unit Tests I have that use the JustMock profiler. Basically the underlying .net framework's Enum.IsDefined function is throwing a System.InvalidOperationException when passing it an int with a value of 0, which should never happen. After initially reporting this as a bug in VS/.Net to Microsoft and providing them with detailed trace information they have come back and said "We took a look at the dump and the failure appears related to methods rewritten by Telerik.CodeWeaver profiler. There is likely a bug or configuration issue with how it is rewriting these methods which lead to the unpredictable behavior you are seeing. I would recommend trying with the profiler off and then following up with Teletrik on why it is failing."

 

Below is a link to the bug report, however for some reason a large chain of the conversation including screenshots etc is locked to moderators and OP only which means you wont be able to see it. I have therefore copied the entire thread into a document and saved it as a pdf. I have attached it to this thread with a fake .png extension because this website only supports image attachments, so once downloaded just rename it to .pdf and you will be able to see the full contents of the discussion with MS.

https://developercommunity.visualstudio.com/content/problem/293705/enumisdefined-unexpected-invalidoperationexception.html

 

1 Answer, 1 is accepted

Sort by
0
Mihail
Telerik team
answered on 27 Jul 2018, 11:03 AM
Hello Craig,

As I said in the support ticket you have opened, it is possible that JustMock overrides the code you mentioned but this depends on the test itself.

You could enable the debug trace which could help to untangle the case. You can do this by adding the following line of code at the beginning of your failing test.
DebugView.IsTraceEnabled = true;

More details about tracing can be found in this article

Regards,
Mihail
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
Craig
Top achievements
Rank 1
Answers by
Mihail
Telerik team
Share this question
or