| Author |
Message |
slaneyrw
Joined: 08 Feb 2005 Posts: 28
|
Posted: Thu Jun 24, 2010 1:51 am Post subject: ANTS profiler still fails when Unity pdb symbols are present |
|
|
Title says it all.
Check previous forums messages. I thought that you would have fixed this by now |
|
| Back to top |
|
 |
nick.maidment
Joined: 29 Jan 2010 Posts: 74
|
Posted: Thu Jun 24, 2010 9:48 am Post subject: |
|
|
| Sorry to hear you're still having problems. After looking in the development database, the developers thought they had fixed it for this version. Are you getting the same error? |
|
| Back to top |
|
 |
AndrewH
Joined: 17 Aug 2006 Posts: 137
|
Posted: Thu Jun 24, 2010 11:29 am Post subject: |
|
|
We fixed several bugs with identical symptoms during the v6 EAP and beta periods. This specific case was not tested by us as we had no evidence that it was any different from the other cases we knew about, and the EAP feedback that we got was that the issues caused by these bugs were no longer occurring, so there was no reason for us to investigate this specific case.
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. _________________ Andrew Hunter
Software Developer
Red Gate Software Ltd. |
|
| Back to top |
|
 |
AndrewH
Joined: 17 Aug 2006 Posts: 137
|
Posted: Thu Jun 24, 2010 3:28 pm Post subject: |
|
|
I've now narrowed this down to an issue with the way that the profiler handles assemblies with the SecurityTransparent attribute, combined with a bug in .NET 2's verification of this attribute.
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. _________________ Andrew Hunter
Software Developer
Red Gate Software Ltd. |
|
| Back to top |
|
 |
slaneyrw
Joined: 08 Feb 2005 Posts: 28
|
Posted: Thu Jun 24, 2010 10:30 pm Post subject: |
|
|
Thanks Andrew...
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 ? |
|
| Back to top |
|
 |
AndrewH
Joined: 17 Aug 2006 Posts: 137
|
Posted: Fri Jun 25, 2010 10:58 am Post subject: |
|
|
I haven't been able to find anything on Microsoft's site about this problem, though I can write my own assembly marked as SecurityTransparent and call P/Invokes from it.
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. _________________ Andrew Hunter
Software Developer
Red Gate Software Ltd. |
|
| Back to top |
|
 |
|