The profiled process has been terminated

Use this forum for questions on how to use .NET Memory Profiler and how to analyse memory usage.
Post Reply
mposehn
Posts: 1
Joined: Wed Jul 20, 2005 8:25 pm

The profiled process has been terminated

Post by mposehn » Wed Jul 20, 2005 9:02 pm

I get this error unexpectedly when running my app under memory profiler.

It's a multi-threaded app that uses some .dlls that are unmanaged code. Is that a problem?

Thanks,
Mike

Andreas Suurkuusk
Posts: 1029
Joined: Wed Mar 02, 2005 7:53 pm

Post by Andreas Suurkuusk » Thu Jul 21, 2005 8:47 pm

Neither multithreading, nor unmanaged code should be a problem for the profiler. If you don't get any message from your application (e.g. an exception), then it's hard to guess why your program is terminating.

The dispose tracker, root referee identification and the heap utilization tracker all add to the complexity of the profiler. I suggest that you try to disable these features (under Tools->Settings), and see if you're able to run your program.

We will soon release a new version of the profiler (v2.6, scheduled to be released in September). This version contains, among other things, improvements for the dispose tracker, and should improve the overall stability of the profiler. If you run your application under .NET Framework 2.0, then root referee identification will also be more reliable, since it does not make use of inproc-debugging (inproc-debugging can cause problems under several circumstances) .
Best regards,

Andreas Suurkuusk
SciTech Software AB

Kiros
Posts: 1
Joined: Fri May 19, 2006 2:12 pm

Post by Kiros » Fri May 19, 2006 2:17 pm

Hello!

I've got the same error, but i get an exeption (and app closes) - InvalidOperationException, DragDrop registration failed. Of course, when I'am runnig app without profiler - all ok. What's wrong?

Andreas Suurkuusk
Posts: 1029
Joined: Wed Mar 02, 2005 7:53 pm

Post by Andreas Suurkuusk » Fri May 19, 2006 9:10 pm

Hi,

Your problem might be caused by a know issue in the profiler. Even if we try to avoid it, the profiler may make a call to CoInititializeEx, which will initialize a COM apartment. If this COM apartment is not compatible with the COM apartment your application expects there might be some problems, e.g. when using the drag-and-drop.

If possible, I recommend that you set the COM apartment of your application by applying the appropriate apartment attribute to your main method (e.g. STAThread).
Best regards,

Andreas Suurkuusk
SciTech Software AB

yossiro1
Posts: 4
Joined: Wed May 24, 2006 11:26 am

Unable to run my application under profiler

Post by yossiro1 » Thu May 25, 2006 6:40 am

Hi,
I got a Microsoft exception while running my app under V2.6 memory profiler.

My app manage multithreds under VS 2005, it is also mixed from managed and unmanaged code.

I try to disable the following options:
1. Enable dispose tracker.
2. Enable root referee identification.

What else could I do?

Thanks

Andreas Suurkuusk
Posts: 1029
Joined: Wed Mar 02, 2005 7:53 pm

Post by Andreas Suurkuusk » Sun May 28, 2006 9:11 pm

Hi,

We have been looking into this problem a little further, but we have not been able to find a solution. We did however find a bug when low impact profiling was enabled, which could cause the profiled process to terminate unexpectedly, but I suspect that this is not causing your problem. We will soon release an updated version containing a fix for this bug.

Anyway, one possible explanation of your problem might be that you run out of memory. The profiler adds a considerable memory and performance overhead. If your application is using a lot of memory, then running it under the profiler will increase the memory pressure, possibly causing OutOfMemoryExceptions and StackOverflowExceptions (or failed memory allocations by the profiler). These exceptions are very hard to handle and might cause your application to terminate unexpectedly. Note that you can run out of virtual address space (especially when profiling) even if you have plenty of memory installed in your system.

Do you think that this is a possible explanation of your problem? Is your application using a large amount of memory? And also, what "Microsoft exception" did you get when your application failed?
Best regards,

Andreas Suurkuusk
SciTech Software AB

yossiro1
Posts: 4
Joined: Wed May 24, 2006 11:26 am

Post by yossiro1 » Mon May 29, 2006 7:24 am

Hi,
First you are right about the large amount of memory which my application allocates.

I saw that you are already released a new version 3.0
Should I try it?

Thanks,
Yossi

Andreas Suurkuusk
Posts: 1029
Joined: Wed Mar 02, 2005 7:53 pm

Post by Andreas Suurkuusk » Mon May 29, 2006 2:58 pm

The .NET Memory Profiler 3.0 version available is only a preview, and I doubt that the version available will work better in your case. However, we will soon release a new preview, which will include an attach-to feature. This feature will allow you to retrieve memory information from a running process without adding any overhead to this process.
Best regards,

Andreas Suurkuusk
SciTech Software AB

yossiro1
Posts: 4
Joined: Wed May 24, 2006 11:26 am

The memory profiler still not working

Post by yossiro1 » Mon Jul 17, 2006 1:17 pm

Hi,
I get the latest version (2.6) which deployed at 08/07/06
And now the process not throw any exception BUT
the memory profiler show up "The process terminate..\n do you want to save ...?" .
What should I do..?
I payed for application that not work well :(

could you help me?

Regards,
Yossi

Andreas Suurkuusk
Posts: 1029
Joined: Wed Mar 02, 2005 7:53 pm

Post by Andreas Suurkuusk » Tue Jul 18, 2006 7:29 am

Do you get the message "The profiled process has been terminated..." message even when your process has not actually terminated?

It is possible that you can provide us with some more information by providing log files from the profiler. To create the log files you must supply the "/log" command line argument to the profiler executable (NetMemProfiler.exe). This will create three log-files in the program directory: ProfilerLog.txt, ProfilerClientLog.txt and AssertLog.txt (AssertLog.txt will probably be empty). After you have created the log-files, you can send them to support@scitech.se (preferably zipped).

You can also try to download the new preview of .NET Memory Profiler 3.0. This preview includes an "attach-to" feature that will allow you to retrieve memory information without affecting the profiled process. You can download the preview from http://memprofiler.com/preview
Best regards,

Andreas Suurkuusk
SciTech Software AB

yossiro1
Posts: 4
Joined: Wed May 24, 2006 11:26 am

Its still not working

Post by yossiro1 » Tue Jul 18, 2006 11:48 am

Hi Andreas,

I add the "/log" argument to the application arguments list but it is
still not work and there isn't any output log files on my computer.

What else can I do?
yossi

Andreas Suurkuusk
Posts: 1029
Joined: Wed Mar 02, 2005 7:53 pm

Post by Andreas Suurkuusk » Wed Jul 19, 2006 8:21 am

Did you supply the /log argument when starting the profiler? To generate log files you must start the profiler using the /log argument. E.g. by using the "Run" command and entering:

Code: Select all

"C:\Program files\SciTech\NetMemProfiler2\NetMemProfiler.exe" /log
You will need to have write rights to the installation folder in order to create the log files. Are you running under an administrative account?
Best regards,

Andreas Suurkuusk
SciTech Software AB

Post Reply

Who is online

Users browsing this forum: No registered users and 18 guests