Hi,

When we run ANTS Performance Profiler with 'line-level and method-level timings; all methods' our Application crashes in DO with a VerificationException.

When we run with 'Method-level timings; all methods', then the program starts.

Regards Paul Sinnema Diartis AG

Type: System.Security.VerificationException

Message: Operation could destabilize the runtime.

=========================================================

at Xtensive.Storage.Configuration.DomainConfiguration.Load(String name) in c:\Temp\DataObjects.Net\Xtensive.Storage\Xtensive.Storage\Configuration\DomainConfiguration.cs:line 407 at Diartis.KLIB.Model.ModelContext.get_KLIBDomainConfiguration() in C:\KLIB2\trunk\KLIB\KLIBDatabase\ModelContext.cs:line 114 at Diartis.KLIB.Model.ModelContext.get_DBFullName() in C:\KLIB2\trunk\KLIB\KLIBDatabase\ModelContext.cs:line 100 at Diartis.KLIB.Model.ModelContext.get_KLIBDomain() in C:\KLIB2\trunk\KLIB\KLIBDatabase\ModelContext.cs:line 161 at Diartis.KLIB.Model.ModelContext.OpenSession() in C:\KLIB2\trunk\KLIB\KLIBDatabase\ModelContext.cs:line 172 at Diartis.KLIB.Model.ModelContext.get_Instance() in C:\KLIB2\trunk\KLIB\KLIBDatabase\ModelContext.cs:line 63 at Diartis.KLIB.KLIBViewModel.VMContext.get_Instance() in C:\KLIB2\trunk\KLIB\KLIBViewModel\VMContext.cs:line 39 at Diartis.KLIB.KLIBContext..ctor() in C:\KLIB2\trunk\KLIB\KLIBMasks\Base\KLIBContext.cs:line 219 at Diartis.KLIB.KLIBContext.get_Instance() in C:\KLIB2\trunk\KLIB\KLIBMasks\Base\KLIBContext.cs:line 140 at Diartis.KLIB.App.OnStartup(StartupEventArgs e) in C:\KLIB2\trunk\KLIB\KLIB\App.xaml.cs:line 83

asked Nov 18 '10 at 11:19

Paul%20Sinnema's gravatar image

Paul Sinnema
261888896

edited Nov 18 '10 at 13:04

Alex%20Yakunin's gravatar image

Alex Yakunin
29714412


One Answer:

Actually, it's difficult to advise anything here, so I'll just list the options:

  • The issue can be related to ANTS Profiler. There are some evidences exposing this. We use dotTrace to profile DO4, and nothing like this happens with it.
  • Also, the issue can be related to PostSharp. There are some evidences for this as well, but in case with PostSharp itself it's really pretty easy to get such error, if you write your own aspects, since you can do generally anything with MSIL code. On the other hand, it's suspicious that application crashes just under profiler - i.e. likely, this mean this is more related to profiler, rather than PostSharp (esp. taking into account that nothing similar happens with dotTrace).

I think the best option is to check your assemblies with PEVerify to find out the reason:

  • If there is something wrong with IL, we can try to fix the issue or notify PostSharp team about this.
  • Otherwise I'd suggest you to notify RedGate about the issue. If this won't help, I can only recommend you to try dotTrace :)

But IMO, the worst part here is that .NET error reporting in this case is absolutely bad. It writes nothing helping to find the reason in this case. We've been getting this error for few times while developing our Tuples framework - originally it was relying on IL Emit, so we've been getting such exception while debugging it. But currently Tuples are fully based on generics - we switched to this option mainly to make them serializable. So actually, this error is pretty normal, if you use IL Emit, and I'm absolutely sure people using this API simply hates it. I understand Microsoft considers buggy IL normally can't appear - well, actually it can, even if you use only public APIs. So IMO, they should make the error reporting more descriptive in this case.

answered Nov 18 '10 at 12:23

Alex%20Yakunin's gravatar image

Alex Yakunin
29714412

edited Nov 18 '10 at 12:28

Reported it to RedGate last week. They have reacted already. Will have to do some more digging.

(Nov 24 '10 at 14:15) Paul Sinnema Paul%20Sinnema's gravatar image
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!
toggle preview

powered by OSQA