Cannot connect to Local application

Questions about YourKit .NET Profiler
jharter
Posts: 3
Joined: Fri Jan 26, 2007 8:31 pm

Post by jharter »

I am now able to profile applications. I will point out that when I tried to take a snapshot, it complained that a path wasn't found. It was looking for a Snapshots directory. I manually created the directory and everything seemed fine from there.

Jim
Vladimir Kondratyev
Posts: 1624
Joined: Tue Aug 10, 2004 7:52 pm

Post by Vladimir Kondratyev »

The problem with "Snapshot" directory is already fixed. The bug fix version 2.0.1 will be released today.

Best regards,
Vladimir Kondratyev
YourKit, LLC
http://www.yourkit.com
"Don't get lost in data, get information!"
DJarrin
Posts: 15
Joined: Thu Mar 08, 2007 3:31 pm

There's no application running at localhost

Post by DJarrin »

I am memory profiling a WinForms application. The application shows a Login Dialog and after the login is authenticated the application main window appears.

When the Login Dialog is up I can take a memory snapshot just fine. In fact I can take additional snapshots without problems.

However, after login when the main window appears I can no longer take memory snapshots. The error dialog indicates that there's no application running at localhost or that the profiler agent is incompatible with the current version of the profiler.

Note that even if I do not take a snapshot of the Login Dialog, once the main window comes up I can no longer take a memory snapshot. CPU snapshots work fine every time.

I am using YourKit version v2.0.50727 on Windows XP 5.1.

Here is the last entry in the YourKit log:

2007-03-08 10:01:50.914 INFO com.yourkit.util.n :
java.lang.Exception: There's no application running at localhost with profiler agent configured to listen on port 1054
or profiler agent is incompatible with current version of profiler
at com.yourkit.api.ControllerImpl.a(a:142)
at com.yourkit.api.ControllerImpl.a(a:297)
at com.yourkit.api.ControllerImpl.captureMemorySnapshot(a:169)
at com.yourkit.ui.n.e$19.a(a:46)
at com.yourkit.ui.af$b.run(a:12)
:idea: Caused by: java.lang.IllegalArgumentException: taskCompleted should be not less than 46; taskCompleted=13
at com.yourkit.ui.ak.if(a:55)
at com.yourkit.ui.n.e$19$1.update(a:2)
at com.yourkit.api.ControllerImpl.if(a:40)
at com.yourkit.api.ControllerImpl.a(a:322)
at com.yourkit.api.ControllerImpl$18.perform(a:8)
at com.yourkit.api.ControllerImpl.a(a:315)
... 3 more
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Post by Anton Katilin »

Hello,
I am using YourKit version v2.0.50727 on Windows XP 5.1.
This rather seems a .NET framework version.

What is the version of the profiler (Help | About)?
DJarrin
Posts: 15
Joined: Thu Mar 08, 2007 3:31 pm

Post by DJarrin »

Sorry! You are correct. That is the .NET version.

The Profiler version is 2.0.2 built on January 31, 2007.

An additional detail... This morning I decided to launch the profiler from the Visual Studio IDE (through the plugin) and I am able to take memory snapshots where I could not do it running the application directly from the Profiler. Very strange.

I hesitated providing this additional info because I know how it goes... "The customer has a workaround, never mind his original complaint." :(

Visual Studio takes a lot of memory as it is that is why I would like to have the option to launch my application directly from the the Profiler.
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Post by Anton Katilin »

I hesitated providing this additional info because I know how it goes... "The customer has a workaround, never mind his original complaint."
Yes, could you please provide additional info :)

Actually, when the profiler starts profiled application itself and when it is done from VS via plugin, there's no change in the options added to enable profiling.

So I may think there's a difference in how VS launches application (Profile action does the same as Debug but adds few options to load with profiler agent), and how the application runs itself. Possibly VS uses some debug-aware dlls instead.

In particular, did you run from the profiler UI the .exe from Debug or Release folders?
DJarrin
Posts: 15
Joined: Thu Mar 08, 2007 3:31 pm

Post by DJarrin »

I ran it in debug mode.
DJarrin
Posts: 15
Joined: Thu Mar 08, 2007 3:31 pm

Post by DJarrin »

I have yet another interesting detail...

I decided to stop my debugging session and closed the profiler. Made some code changes and attempted to run the Profiler again. Well, this time the Visual Studio plugin launches the application but not the profiler (along with it.)

I am now truly dead in the water. :cry:
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Post by Anton Katilin »

Do you have this problem profiling other applications?

E.g., could you please try demo from the profiler UI's Welcome screen.
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Post by Anton Katilin »

I decided to stop my debugging session and closed the profiler. Made some code changes and attempted to run the Profiler again. Well, this time the Visual Studio plugin launches the application but not the profiler (along with it.)
Do you mean it doesn't launch the profiler UI?

In either case, the profiler UI can be launched separately, and then you can connect to running profiled applications.
DJarrin
Posts: 15
Joined: Thu Mar 08, 2007 3:31 pm

Post by DJarrin »

Yes, the plugin did not launch the Profiler UI, only my application.
...the profiler UI can be launched separately, and then you can connect to running profiled applications.

I tried it. The Profiler tells me that there are no running applications that can be profiled when I attempt to attached to a "locally" running application. I tried the "remote" application option as well, just for kicks, but no luck. I got a similar error message.

Finally, I closed Visual Studio and restarted it. Clicked on the "start profiler" button and this time the profiler UI came on along with my application. Everything looked good UNTIL I tried to take a memory snapshot. I got the same error message that started this whole conversation. :roll:
DJarrin
Posts: 15
Joined: Thu Mar 08, 2007 3:31 pm

Post by DJarrin »

Sorry about my misuse of the "Quotes" markers in my previous message.

The following should have been outside the quotation:

I tried it. The Profiler tells me that there are no running applications that can be profiled when I attempt to attached to a "locally" running application. I tried the "remote" application option as well, just for kicks, but no luck. I got a similar error message.

Finally, I closed Visual Studio and restarted it. Clicked on the "start profiler" button and this time the profiler UI came on along with my application. Everything looked good UNTIL I tried to take a memory snapshot. I got the same error message that started this whole conversation.
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Post by Anton Katilin »

Could you please see if there are logs in <user home>\.ynp\logs ?

We didn't manage to reproduce the problem here, but we think of possible reason. We'll make a build with change that possible can fix the issue soon (I hope today).
DJarrin
Posts: 15
Joined: Thu Mar 08, 2007 3:31 pm

Post by DJarrin »

Sounds encouraging. :)

I would like to attach the log file or perhaps email it to you instead of copying it here... It might be too long. What do you suggest?
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Post by Anton Katilin »

Could you please post it at [email protected]
Post Reply