Presales question: 

I have a C# project which uses interop to Matlab code compiled as a DLL.

Occasionally I get "Memory could not be read errors", where the stack traces seem to point into finalizers.    Hard to reproduce.

Can/how can the ANTS Memory Profile help troubleshoot this?


gr8lakes
0

Comments

2 comments

  • gr8lakes
    PS - not sure if the issue is in the C# code, or related to the managed/unmanaged interop.
    gr8lakes
    0
  • Alex B
    Hi @gr8lakes,

    ANTS Memory Profiler (AMP) is more geared towards finding memory leaks where the application doesn't crash and so it's not likely to help in this situation - and if it is in unmanaged memory, then we can't profile it anyway, just report on it.  If we're profiling when it happened we might catch something, but there's not a specific functionality within AMP that would help here.

    I suppose you could snapshot and see if objects still exist on the finalizer queue across snapshots ( see this page), which would mean they are obviously not getting disposed of, but whether they lead to an error or not is anyone's guess.

    Kind regards,
    Alex
    Alex B
    0

Add comment

Please sign in to leave a comment.