Managed C++ Application crashed before reaching WinMain()

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I have a Managed C++ application. When one of my users runs it, the Common
Language Runtime Debuggin Services generated this message:

Application has generated an exception that could not be handled.
Process Id = 0x26b0, Thread Id=0x2604
....

When I added logging in WinMain() function, the log was empty. This means
that it crashed before reaching WinMain(). Some other users can get it to
work by disabling anti-spyware software but this one just keep crashing. Any
idea on how to get more information on why it crashed?

Thanks,
 
Hi Herbert,
I have a Managed C++ application. When one of my users runs it, the
Common Language Runtime Debuggin Services generated this message:
......

Do you have any more detail information about this exception?

How about this user account's priviledge level, is there anything different
with other user's(belongs to different group)?

And, is your program a pure .NET program, what's your machine's system,
WIn2K or WinXP?
How about the anti-spyware software you mentioned, do you mean when it is
activated, some other users would got the same exception when running that
program?


Thanks!

Best regards,

Gary Chang
Microsoft Community Support
--------------------
Get Secure! ¡§C www.microsoft.com/security
Register to Access MSDN Managed Newsgroups!
http://support.microsoft.com/default.aspx?scid=/servicedesks/msdn/nospam.asp
&SD=msdn

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

My users are shareware users so it is not easy to get information. This user
has Win XP Pro with SP2 and has admin priviledge. He had the beta version of
Microsoft Anti-spyware software installed. However, he told me that it still
did not work after he uninstalled it. If he goes back to a previous build, it
works.

My .net app has some "It just works" access to native code (libraries from
ActiveSync). The application works on most PCs. I installed it on several
test machines and on virtual PCs and they all worked. Now, what are the
possible reasons that cause it to crash on some machines?

Thanks,
Herbert
 
Hi Herbert,
My users are shareware users so it is not easy to get information. This user
has Win XP Pro with SP2 and has admin priviledge. He had the beta version of
Microsoft Anti-spyware software installed. However, he told me that it still
did not work after he uninstalled it. If he goes back to a previous build, it
works.

Does this problem occur after he installed the Windows XP SP2 or just after
he installed our Anti-spyware software?

Do you have tested your application in a XP SP2 system with the beta
version of Microsoft Anti-spyware software installed?



Thanks!

Best regards,

Gary Chang
Microsoft Community Support
--------------------
Get Secure! ¡§C www.microsoft.com/security
Register to Access MSDN Managed Newsgroups!
http://support.microsoft.com/default.aspx?scid=/servicedesks/msdn/nospam.asp
&SD=msdn

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

The problem occured when he installed a newer build of my application. If he
installs an older build, it would run fine. All I did was some bug fixes and
re-compile the application.

I have tested my new build on a XP SP2 with Microsoft anti-spyware computer
and it ran fine.

How can I trap the exception? Would Application.ThreadException event helps?

Thanks,
Herbert
 
Hi,

I believe he has XP SP2 for a while and I don't know when he installed
Microsoft anti-spyware.

Regards,
Herbert
 
Hi Herbert,
I have tested my new build on a XP SP2 with Microsoft anti-spyware computer
and it ran fine.

How can I trap the exception? Would Application.ThreadException event
helps?

If you cannot repro on your machine, maybe your customer's system would be
a little more complicated:(

I think trap the Application.ThreadException event would help, but you need
your customer to cooperate with you on this problem...


Thanks!

Best regards,

Gary Chang
Microsoft Community Support
--------------------
Get Secure! ¡§C www.microsoft.com/security
Register to Access MSDN Managed Newsgroups!
http://support.microsoft.com/default.aspx?scid=/servicedesks/msdn/nospam.asp
&SD=msdn

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

I still cannot trap the error even after adding both
Application.OnThreadException and AppDomain.UnhandledException event
handlers. Apparently, it only happens on certain computer configurations. One
of the users with the crash problem has VS.NET 2003 installed. Is there
anything he can find out by debugging the crash?

I have tried running the application on various Windows 2000 and Windows XP
machines (and virtual machines). I just cannot reproduce the error.

Thanks,
Herbert
 
Hi,

There are 2 users who got a FileNotFoundException instead of a crash.
However, I can't trap the error. It seemed that it happened before reaching
WinMain().

Thanks,
Herbert
 
Hi Herbert,
I still cannot trap the error even after adding both
Application.OnThreadException and AppDomain.UnhandledException
event handlers. Apparently, it only happens on certain computer
configurations. One of the users with the crash problem has VS.NET 2003
installed. Is there anything he can find out by debugging the crash?

If you couldn't repro the crash on your machine, it may be your program's
bug, also it could be your customer's system setting has something conflict
with your app, but you need the detail debugging information to verify it.

So I think the best approach to find the problem is debugging your program
inside the VS.NET on your customer's system if it is possible:(


Thanks for your understanding!

Best regards,

Gary Chang
Microsoft Community Support
--------------------
Get Secure! ¡§C www.microsoft.com/security
Register to Access MSDN Managed Newsgroups!
http://support.microsoft.com/default.aspx?scid=/servicedesks/msdn/nospam.asp
&SD=msdn

This posting is provided "AS IS" with no warranties, and confers no rights.
 
I have seen these kind of issues when there is some collision in the
versions of assemblies. For example you may have compiled your project to
refer to V1.1 of some assembly, but not the client has screwed up their
istallations has older version of assembly. I would check if the machines
having problem, have service pack of .Net installed or not. Also check what
is the minimium requirement of your applications and then check if the
client machines meets that requirement. I am talking about assembly version
requirements not the hardware requirements.
Another thing to check would be, if your application is using PInvoke to
call into some Win32 APIs or thid party APIs, does the client have those
DLLs.
 
Back
Top