JustMock Profiler causing .Net Framework calls to fail unexpectadly

2 posts, 0 answers
  1. Craig
    Craig avatar
    1 posts
    Member since:
    Jul 2017

    Posted 24 Jul 2018 Link to this post

    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.



  2. Mihail
    Mihail avatar
    263 posts

    Posted 27 Jul 2018 Link to this post

    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

    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
Back to Top