Options

VerificationException only when profiling in LINE mode

TheZManTheZMan Posts: 9
edited October 16, 2013 5:27PM in ANTS Performance Profiler 8
I've profiled our game many times with ANTS though it has been using 8.0 so I am not sure if this is related to the 8.3 upgrade or changes we have made.

The game runs perfectly in DEBUG/RELEASE and every other profile we build under. However whenever I try to profile it using ANTS I get a VerificationException the first time I use the Ionic.GZip class.

This class is used throughout our code and I am trying to profile the same DEBUG build that works just fine. So ANTS appears to be the only variable that is changing here.

If I choose method level profiling then the exception doesn't happen. If I choose line level it crashes the app every time.

Any ideas or should I roll back to 8.0 to see if that fixes it?

EDIT: This is an XNA based app using .Net 4.0 in VS 2010.

Comments

  • Options
    I rolled back to 7.3 and when line profiling is enabled I get a crash at the same point:


    System.Security.VerificationException was unhandled
    HResult=-2146233075
    Message=Operation could destabilize the runtime.
    Source=Ionic.Zip (x86)

    After installing 8.3 again I now get the VerificationException instead of the TypeInitializationError - but its in the same line of code. The Constructor for GZipStream.

    The Exception Helper asks:
    ""Make sure your application is not loading two conflicting versions of a class library."
    http://msdn.microsoft.com/query/dev10.q ... RIFICATION);k(DevLang-CSHARP)&rd=true

    There are 2 versions of GZIP in 2 different DLLs. One is private and only used internally so there should not be a conflict and the game runs just fine without the profiler and even with method level timings turned on.

    Any ideas what line-level timing is doing to cause this crash?
  • Options
    Solution found..

    After googling I came across this which sounded very like my problem
    http://documentation.red-gate.com/displ ... arent+code

    I removed
    [assembly: AllowPartiallyTrustedCallers]
    from the gzip source and now line level timing works
Sign In or Register to comment.