Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Vista General Discussion > A problem caused the application to stop working correctly.

Reply
Thread Tools Display Modes

A problem caused the application to stop working correctly.

 
 
atong99
Guest
Posts: n/a

 
      05-22-2009

I have a service which will load two regular dlls. It starts fine.

However, I modifed the code a little bit in the dlls (add some logs),
rebuilt and overwrote the old dlls. When I restarted the service I
encountered an error:

The service seems starting initially, but quickly it was shut down. I
have the message pops up from Windows Vista.

" XXXService stopped working and was closed

A problem caused the application to stop working correctly. Windows
will notify you if a solution is available."


If I did the same on XP everything was fine.


How can I solve this issue ?


--
atong99
 
Reply With Quote
 
 
 
 
zachd [MSFT]
Guest
Posts: n/a

 
      05-22-2009

What happens when you run it under a debugger so that you can JIT debug it?

--
Speaking for myself only.
See http://zachd.com/pss/pss.html for some helpful WMP info.
This posting is provided "AS IS" with no warranties, and confers no rights.
--
"atong99" <> wrote in message
news:...
>
> I have a service which will load two regular dlls. It starts fine.
>
> However, I modifed the code a little bit in the dlls (add some logs),
> rebuilt and overwrote the old dlls. When I restarted the service I
> encountered an error:
>
> The service seems starting initially, but quickly it was shut down. I
> have the message pops up from Windows Vista.
>
> " XXXService stopped working and was closed
>
> A problem caused the application to stop working correctly. Windows
> will notify you if a solution is available."
>
>
> If I did the same on XP everything was fine.
>
>
> How can I solve this issue ?
>
>
> --
> atong99



 
Reply With Quote
 
atong99
Guest
Posts: n/a

 
      05-26-2009

I simplified the issue. It is not easy to run the debugger. Somehow
Vista shuts down my service.


--
atong99
 
Reply With Quote
 
Andrew McLaren
Guest
Posts: n/a

 
      05-26-2009
"atong99" <> wrote ...
> I simplified the issue. It is not easy to run the debugger. Somehow
> Vista shuts down my service.


I don't want to be unhelpful but ... we can't see your code, we can't see
your machine, we don't know what changes you made to cause the error, we
don't know what programming language or environment you're using, we don't
know what the service does or what security context it runs in, etc. So I
wonder what your expectations are, regarding the help we can provide? Some
magic switch or hotfix, which will make your service run? :-)

The error message indicates the Service Control Manager had to terminate the
service. It sounds like the service is starting, but then it hits an
unhandled exception (so hopefully, OnStart() is at least returning).

ZachD is correct - to debug this problem, you need to, well, debug the
problem. Running in the debugger can be a bit awkward but it is certainly
not impossible, nearly every service needs to be debugged sooner or later.
If you google for "how to debug windows services" you'll find many MSDN
articles, blogs etc about how other developers have worked around this
before. Here's a good start:

http://blogs.msdn.com/field_notes/ar...e-onstart.aspx

If a service runs okay on XP but fails on Vista, there are likely to be two
main causes:

- the service hits a security or permissions problem in the more secure
environment of Vista eg it cannot write to a protected location like
C:\Program Files, or C:\Windows. The 0xC000005 bubbles up and is unhandled.

- the service tries to interact with the user session, whereas in Vista it
will be running in Session 0, and the Interactive user will be in Session 1
or higher.

There could be many other problems, but these seem to be the most common
issues migrating to Vista.

For programming issues, you'll probably get better results from one of the
MSDN forums; this microsoft.public.windows.vista.general newsgroup is mainly
for end-users. Take a look at
http://social.msdn.microsoft.com/For...y/visualstudio. There's
lots of helpful folks there but, be warned: you'll need to ask your question
in a way that let's people help you!

Hope it helps,

Andrew
--
amclar at optusnet dot com dot au

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
A problem with your video hardware caused Windows to stop working correctly Cyberwolf Windows Vista Hardware 1 09-03-2008 04:10 AM
Re: Hotfix update caused IE7 to stop working PA Bear [MS MVP] Windows Update 1 04-11-2008 08:44 PM
A problem caused the program to stop working correctly.... nizza35 Windows Vista Installation 1 03-09-2008 05:39 PM
A problem with your video hardware caused Windows to stop working correctly. Rookie27 Windows Vista Hardware 20 09-03-2007 07:51 AM
A problem with your video hardware caused Windows to stop working. Jukola Windows Vista General Discussion 3 07-22-2007 02:36 PM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59