473,394 Members | 1,944 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Can't run app with remote desktop

Hi all,

This is a long shot, but I figure it doesn't hurt to ask... I have some
applications that work fine when I run them on my PC at work, but "fail to
initialize (0x000005)" when I'm attached to that PC from home via Remote
Desktop.

These applications are all console apps written in native C++. The common
thread (at this point I've done no serious investigation) seems to be that
they all call into a C++/CLI library that, in turn, calls into other managed
assemblies. But that could have nothing to do with the problem.

Has anyone ever seen anything like this? Any suggestions on how to begin
debugging this?

TIA - Bob

Jul 6 '08 #1
6 5047
Hi Bob,

Can you tell me your OS version? If it is Vista, do you enable UAC, do you
run your application elevated?

This sounds like an interesting issue. With current information, it is hard
for me to say the root cause, but I suspect it may has something to do with
the environment variables or user profile paths. When you login through
remote desktop, it may have different environment variables or profile
which may cause the application initialization failure. However, I am not
certain yet, we need to perform some troubleshooting to get close to the
root cause.

I assume you are getting a "The application failed to initialize
properly(0x0000005)" error dialog, yes? Based on my experience, the error
is usually caused by the initialization failure in DllMain of certain DLL
linked by your application directly or indirectly.

To troubleshoot this issue, we have several ideas. First, you may use the
Dependency Walker tool(depends.exe) to launch your application during
remote desktop logon. Try to find any dll that is reported as missing. This
may provide some useful information.

Second, you may use Process Explorer's "Find Window's Process" icon tool to
examine the owning process of the error dialog. We need to find out if the
error dialog is popped up by the failing application process or the
launching process(such as explorer.exe). I assume it is the failing process
first. Then, you may use the windbg to attach the failing process and
examine its stack trace. You may paste the stack trace here for analysis.

From kernel space perspective, the console&remote desktop are different
user sessions, so they will have different session view in kernel space.
The main difference are the GUI/GDI graphic functions. Is your application
very dependant on the GUI/GDI operations? Is it possible that the desktop
heap is exhausted? You may use "Desktop Heap Monitor tool" to check this.
See the article below for more details:
http://blogs.msdn.com/ntdebugging/ar...eap-overview.a
spx

Finally, you may use Process Monitor to examine the file system&registry
activity of your application startup period. You may filter the "SUCCESS"
result and pay more attention to the "NOT FOUND" or other failure records.

I will wait for more information from you. Thanks.

Best regards,
Jeffrey Tan
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Jul 7 '08 #2
Can you tell me your OS version? If it is Vista, do you enable UAC, do you
run your application elevated?
Hi Jeffrey! The work PC is XP Pro SP-3, joined to a domain, logged in as a
non-privileged domain user. The home PC is a virtual PC running XP Pro SP-3
with fast user switching enabled. (I need to use a virtual PC at home
because my home PC has Vista, and the corporate VPN doesn't work with Vista.
So I run a virtual PC with XP and it works like a champ.)
This sounds like an interesting issue. With current information, it is
hard
for me to say the root cause, but I suspect it may has something to do
with
the environment variables or user profile paths. When you login through
remote desktop, it may have different environment variables or profile
which may cause the application initialization failure. However, I am not
certain yet, we need to perform some troubleshooting to get close to the
root cause.
That makes me realize that I have a great tool at work for digging into this
problem. We have a tool called AppSight that, among other things, lets you
run an application and it logs all kinds of stuff, such as resource usage
and file and registry accesses. But it's real strength in this scenario is
that is can compare a successfull run with a failed run and very quickly
point out the differences between the two. I haven't used this tool in a
long time, so I need to set it up, but this could be just the sort of thing
that this tool excells in helping with. (Or not...)
I assume you are getting a "The application failed to initialize
properly (0x0000005)" error dialog, yes?
Yes
To troubleshoot this issue, we have several ideas...
Thanks. I'll start digging into your suggestions and I'll post the results
back to this NG. Who knows, maybe I've stumbled across a generic problem
that others may be interested in. If nothing else, someone may be
interested in following the detective novel as it unfolds.

Since this is a problem that only affects me when I work from home, it may
take me a while (a day or two) to get some time to try the things you've
suggested.

Bob

Jul 7 '08 #3
Hi Bob ,

Thanks for your feedback.

Oh, I have not heard about AppSight before; but based on your description,
it works very similar with Microsoft sysinternals Process Monitor tool,
which can also monitor the file system&registry activities:
http://technet.microsoft.com/en-us/s.../bb896645.aspx

Anyway, you can choose either one that is convenient for you.

Sure, when you have time to check this issue again, please feel free to
post, thanks.

Best regards,
Jeffrey Tan
Microsoft Online Community Support
=========================================
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsoft.com.

This posting is provided "AS IS" with no warranties, and confers no rights.

Jul 8 '08 #4
I finally got around to gathering some data and discovered that the problem
has mysteriously gone away. Oh well... if it comes back I'll try the things
you suggested to try to track it down.
Oh, I have not heard about AppSight before; but based on your description,
it works very similar with Microsoft sysinternals Process Monitor tool,
which can also monitor the file system&registry activities:
Actually, AppSight (www.identify.com) is much much more than Process
Monitor. It's a tool that monitors a running program and gathers all sorts
of information about it without the need to add instrumentation code of any
sort to it. AppSight includes a small program called "Black Box" that is
configured by a manifest of sorts that they call a profile. A profile can
instruct the Black Box to hang out in the background waiting for a specified
program to fail, at which time it uses debugger hooks to gather stack dump
and environment info. It can hook system calls and tell you when the
program called what. If you have a PDB file for the application, you can
tell it to watch specific lines of code and gather specific variables each
time the line of code is executed. It can watch the display and grab a
screen snapshot each time a significant event occurs. As I mentioned
previously, it can monitor system resources. All of this info is gathered
on a customer computer and the results are stored automagically in a file
that can be sent back to the shop for detailed analysis. Basically, it's a
souped up debugger that gives you a post-mortem history of what the
application and its environment did leading up to an interesting event
(typically a program failure).

It's also gawdawful expensive, and, at least as of a year ago when I last
used it for anything, the analysis tool was annoyingly buggy. They target
large customers with equally large IT budgets. But it's very impressive, as
is their customer support.

Bob

Jul 11 '08 #5
Hi Bob ,

Thank you for sharing the story of AppSight. Oh, I was not aware it before.
It seems that this commercial tool extends the idea of profiling and
instrument to a higher level.

Anyway, if you can reproduce this issue again, please feel free to post,
thanks.

Best regards,
Jeffrey Tan
Microsoft Online Community Support
=========================================
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsoft.com.

This posting is provided "AS IS" with no warranties, and confers no rights.

Jul 14 '08 #6
Hi Bob ,

Thank you for sharing the story of AppSight. Oh, I was not aware it before.
It seems that this commercial tool extends the idea of profiling and
instrument to a higher level.

Anyway, if you can reproduce this issue again, please feel free to post,
thanks.

Best regards,
Jeffrey Tan
Microsoft Online Community Support
=========================================
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsoft.com.

This posting is provided "AS IS" with no warranties, and confers no rights.

Jul 14 '08 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Clay Johnson | last post by:
Are there any API's to the Remote Desktop in Windows XP? Thanks, Clay Johnson-
3
by: Elp | last post by:
Hi, I have developped a Windows applcation (in C#) that allows, among other things, users to view and control the desktop of a remote Windows XP Pro machine. I have actually simply embedded the...
2
by: Kevin Boyle | last post by:
Hello all, Does anyone have any tutorials on interfacing .NET and remote desktop. I am just learning C# so I don't want to have to deal with anything too complicated and was hoping there were...
9
by: Tim | last post by:
Hi Guys, I was wondering if there is a way to detect from with a C# app if it is being started in a remote session? i.e. someone has connected via remote desktop or terminal services... ...
0
by: Bahman | last post by:
Hello! Our aspx application does not run inside browser in remote desktop. It doesn't update. It is static. It runs fine in regular browser window. In comparison, the sharepoint services...
0
by: =?Utf-8?B?U2VudGhpbCBTdWJyYW1hbmlhbg==?= | last post by:
Our requirement is to run the vb dot net application in minimize mode with system tray icon in the remote machine (remote desktop). When we running in the remote desktop window is showing in...
15
by: =?Utf-8?B?TVNU?= | last post by:
To demonstrate my problem, I have a very simple VB Windows application. It has a text box that is used to display a counter, a button to reset the counter, and a timer that increments the counter...
4
by: chris | last post by:
Hi guys I have a Frontend and Backend DB that works well on my LAN. I use a INI file Path, to access a mapped network connection back to the Backend Data file. Path=F:\Server\Data.mdb I...
0
by: Andy | last post by:
Hello all, I have a user using Remote Desktop connection, who is getting an error when trying to print. When my program starts, he get's an error 2205, the default printer isn't set up...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.