I'm evaluating your Memory Profiler tool and so far I like it very much, but I'm running into a show-stopper of an issue. I have an object that is being constructed but MemProf doesn't catch it.
I believe the object in question is being leaked somehow (hence our evaluation of MemProf). So MemProf's missing the object construction is frustrating our efforts to fix the leak. The object contains a single byte array that is holding about 1.5 MB of data. The Type is detected by MemProf, just not the instances.
If this is a user error I'm not sure what I've done to cause it. I haven't messed with the default settings much. I did add an instance data rule to try and guarantee the object was profiled but it didn't work. (The issue occurred both before and after adding the rule).
Any ideas? I am evaluating MemProf looking to purchase, and as I've said this issue would remove MemProf from the lead position in my evaluations. Besides this issue I really do like MemProf.
- Memory Profiler 3.0.113 Evaluation
- Windows XP SP2
- .Net 2.0
We have another entry point into our application that references that same class I described above and MemProf sees the object being created from.
Also I tried another memory profiler, AQTime 5, and it also seemed unable to see that class from the original entry point.
Is the instance not listed as a live instance when you expect it to be?
Is the class of the instance listed in the Types view, and does the profiler present any allocations of the class?
Can you provide some code that illustrate how the instance is created (and maybe some additional information about the class)?
SciTech Software AB
MemProf lists the object in the "Types" list only after an instance is created. (I believe the listing late is by design? That would make sense.) But the object is never listed with any instances created or garbage collected. I've checked with the "Types" filter set "All" and "New or Removed instances"
I know an instance is created because I verified the creation: I launched the application with MemProf, attached the debugger (VS 2005), and put a break point on the object's creation to verify it was created. Then I removed the break points and ran the same code, creating a snapshot before and after the instantiation and didn't see the object's creation.
We have a rather big and complex application so I'm not sure which information about our code would be most useful in helping you. I'm not trying to avoid your question, I simply don't want to deluge you with lots of data that won't help. (Also due to IP reasons I need to appropriately tailor my responses.)
The class is a non-sealed, non-abstract public class (not struct). It contains a private byte and three private integers, no unmanaged memory or unsafe code. The byte is about 1.5 MB in size, and it is not detected as being allocated either (I'm assuming because the parent class isn't detected).
The class lives in an assembly that AFAIK has no special assembly attributes, build settings, or obfuscation. The assembly is not directly referenced by the entry point assembly; it is not listed in the entry point assembly's manifest. The class' assembly is referenced by other assemblies that the entry point assembly references; I think there are 2 or 3 levels of assemblies between the class' assembly and the entry point assembly.
I did at one point build a test where an instance of the class was created in the entry point assembly and MemProf did detect that instantiation. Does it have something to do with the class being in an assembly that is several steps removed from the entry point assembly?
Please let me know what else you would like me to provide you.
P.S.: I don't mean to be using the term "MemProf" in a derogatory fashion, it's just faster to type.
Note that only live instances are presented when a heap snapshot is collected. An instance is "live" if it is reachable from any root at the time of the heap snapshot. If the instance didn't exist at the time of the comparison snapshot, it is flagged as "New" as well. A removed instance is an instance that existed in the comparison snaphshot, but that does no longer exist in the primary snapshot.
However, as long as you start the profiled process from the profiler (not attaching), all instance allocations are tracked and you will be able to see the call stack of all instance allocations.
In your case it seems like the created instance becomes garbage collected before the heap snapshot is collected (i.e. it is not reachable from any root). If this is the case, it will not be listed when you filter by "New or removed instances". Rather you should filter by allocations. E.g. double click the type in the Types view, and then select "Allocs/sec" under "Sort stack by". This should show you the call stack of the instance creation.
SciTech Software AB
SciTech Software AB
Users browsing this forum: No registered users and 14 guests