« Microsoft Totally One-Ups Me After Eight Years | Sleep Number Beds » |
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