System.InvalidProgramException
Rob Ashton
Posts: 2
Hi there,
We're currently in the process of profiling some performance critical sections of code and we're coming across this one in quite a few places. It can happen at any point in the profiling process, but always within the same section of code.
We've worked around it so far by disabling profiling in the namespaces where it occurs and we don't need profiling info, but now it's cropping up in a time critical section of code that we DO need to profile
Our product is written in VB.NET (mostly) and .NET 2.0
I'm thinking it's something to do with parameterised properties/generics but I've seen a forum topic for ANTS Profiler 2 with an identical problem where it was apparently tracked down.
Seeming as we're now getting it, it would suggest we've either got a similar issue or it's something entirely different just causing the same problems. InvalidProgramException isn't exactly the most descriptive of exceptions as anybody writing anything using Reflection.Emit will testify to... :roll:
Click here for a zipped up xml file containing the complete exception dump.
We're currently in the process of profiling some performance critical sections of code and we're coming across this one in quite a few places. It can happen at any point in the profiling process, but always within the same section of code.
We've worked around it so far by disabling profiling in the namespaces where it occurs and we don't need profiling info, but now it's cropping up in a time critical section of code that we DO need to profile
Our product is written in VB.NET (mostly) and .NET 2.0
I'm thinking it's something to do with parameterised properties/generics but I've seen a forum topic for ANTS Profiler 2 with an identical problem where it was apparently tracked down.
Seeming as we're now getting it, it would suggest we've either got a similar issue or it's something entirely different just causing the same problems. InvalidProgramException isn't exactly the most descriptive of exceptions as anybody writing anything using Reflection.Emit will testify to... :roll:
Click here for a zipped up xml file containing the complete exception dump.
Comments
My apologies for the late reply. I was wondering if perhaps creating COR_Profiler enhanced native images of your assembly might make a difference. .NET Framework 2.0 provides this facility to make assemblies more 'profiler friendly'. If you wouldn't mind, could you try:
I'm curious to see if this doesn't clear up some of the more esoteric exceptions thrown by some applications during profiling.
Thanks!