« Microsoft Totally One-Ups Me After Eight YearsSleep Number Beds »

"Started and then stopped" Service Error


  02:41:58 pm, by Nimble   , 136 words  
Categories: Programming

"Started and then stopped" Service Error

This is a quickie.

I was having one heck of a time trying to figure out what was going on with a legacy service an old coworker had written in Delphi. It kept saying "{X} service on Local Computer started and then stopped".

There seemed to be nothing wrong with the code at all.

The fix in this case was simple, though the cause of the error violated a sacred principle of Delphi events: an empty event handler should always be equivalent to no event handler.

There was an OnExecute handler for the service with its contents commented out. When I started comparing the service with other working services, this was the only non-cosmetic difference left.

I chopped out the event handler from the service completely, and it worked just fine.

Feeling: relief and mild anger

No feedback yet

June 2024
Sun Mon Tue Wed Thu Fri Sat
 << <   > >>
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
Jade Annand's blog of everything except sports (...and who knows? I may break that rule some day)


  XML Feeds

powered by b2evolution