(Das nachfolgende ist ein Auszug aus einem internen Support-Ticket mit JetBrains zum dotTrace SDK)
This is weird:
I'm having two independent WinForms .NET 4.5 solutions.
In both of them, I'm using the dotTrace SDK to self-profile the application.
One application works like a charm, in the other application I (nearly) always get exceptions like this:
JetBrains.Profiler.Windows.Api.ProfilingApiException: Invalid call sequence
at JetBrains.Profiler.Windows.Api.Impl.Helper.CheckHResult(HResults hr)
I'm using the same code in both applications (at least this is what I think). Still, one runs completely perfect, the other throws the above exception.
Can you give me any hints on what I might do wrong?
- Initializing the profile too early/too late?
- Initializing in the wrong thread?
- Not using the editbin.exe /NXCOMPAT:NO executable flag on my application?
- Stopping in the wrong thread?
I would be very glad if you can help me bring some light into this and give me some hints.