ANTS profiler still fails when Unity pdb symbols are present
slaneyrw
Posts: 46
Title says it all.
Check previous forums messages. I thought that you would have fixed this by now
Check previous forums messages. I thought that you would have fixed this by now
Comments
I have reproduced an issue with Unity 2.0, however. It only occurs if the target application is 64-bit and the profiler is in a line-level mode and seems to be due to an access violation in the .NET JIT. It's possible to work around the problem for now by changing the application target to x86 or by deleting the pdb or switching to a different profiling mode.
Software Developer
Red Gate Software Ltd.
In .NET 4, this will produce a SecurityVerificationException. In .NET 2, nothing happens when using the x86 JIT and the x64 JIT crashes.
This means that you can also work around the problem by removing the SecurityTransparent attribute from any assemblies you want to use line-level timings on.
Software Developer
Red Gate Software Ltd.
x64 ASP.NET MVC application, with Unity 2.0 and all Unity assemblies are marked with this attribute.
Is there a KB article from MS on the .NET 2 bug, I might be able to get a hotfix using our Premier support agreement ?
A fix for the .NET issue wouldn't help with the profiler, however, as the problem is due to code being generated by the profiler that can't run in a SecurityTransparent assembly. The only difference would be that the program would crash with an exception instead of an access violation.
We'll look into fixing this in a minor release: the solution will probably have to be to disable line-level timings for SecurityTransparent methods.
Software Developer
Red Gate Software Ltd.