Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.7k views
in Technique[技术] by (71.8m points)

delphi - 0x0eedfade kernelbase.dll faulting module in d7 windows service

I have written a windows service in D7. It worked perfectly ok until today when it doesn't want to be launch.

In event log I get the error:

Faulting application name: XServ12.exe, version: 0.0.0.0, time stamp: 0x2a425e19 Faulting module name: KERNELBASE.dll, version: 6.1.7600.16385, time stamp: 0x4a5bdbdf Exception code: 0x0eedfade Fault offset: 0x0000b727 Faulting process id: 0xbb4 Faulting application start time: 0x01cca43b2aee203a

I read somewhere that it maybe the problem with initialization sections of the units. Well, I have removed almost all units form the project and left with: Sysutils, CLasses, Dialogs. When Dialogs.pas unit exists I have still the error when I remove it, the program successfully goes to begin end of the project dpr section.

Furthermore, even if I have all these 3 units and Just manually run exe it launches perfectly ok. Only an error occur when I try to run service from the System Services...

If I reboot the computer, everything is ok. ...

Any ideas?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

0x0eedfade could be an unhandled Delphi exception propagated outside of a Delphi process. If the problem only exists when linking in the Dialogs unit it's possible that its initialization, or initialization of any unit it depends on, raises an exception which is not handled and escapes out of your Delphi process.

It could be related to the fact that a service runs in an isolated session (as described in this document) and doesn't have access to the Windows UI subsystem (station, desktop, windows) anymore. In other words, forget interactive services.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...