External Exception EEFFACE in Delphi

自作多情 提交于 2019-11-28 11:55:45

This is clearly something happening in the Delphi evaluator (which is part of the compiler). The odd thing is that if it is, in fact, going through writeobj.c, something is certainly not quite right. If you can reproduce this with a test case, please report it in QualityCentral (http://qc.embarcadero.com).

EEFFACE is the SEH exception code used by C++, which is "leaking" out to some Delphi code (in this case the IDE itself). When the exception code is not a Delphi generated exception or a hardware related exception, Delphi simply maps it to EExternalException.

This is not an exact answer but may help you with overcoming the error by describing my experience with it.

I received this error regularly when I went to Windows Vista and 7. The same code never received that error message on Windows XP. I could put a break point on the first line of the dpr file and found that it always seemed to occur when creating the splash screen to my applications. I tried various other ways to do splash screens but they always eventually resulted in getting an EEFFACE error when debugging.

So to overcome this issue, I now put

if DebugHook = 0 then

when I create and access the splash screen. The splash screen to my applications do not appear now when I'm debugging but at least I don't get that EEFFACE error anymore.

It seems that "External exception" isn't a Delphi's bug, I had this exception times ago and it was probably a problem with the motherboard, or with the hardware, because the program worked well at other machine.

Recently I've run into this and it's somehow related to the Delphi IDE. The following code ends up in this exception on the ShellExecute line:

url:='https://translate.google.com/#hu/en/%C3%A1';
ShellExecute(0,PChar('open'),PChar(url),nil,nil,SW_SHOWNORMAL);

But this is not:

url:='https://translate.google.com/#hu/en/%C3%A1';
ShowMessage(url);    
ShellExecute(0,PChar('open'),PChar(url),nil,nil,SW_SHOWNORMAL);

But if I run my app outside of IDE everything is fine without the ShowMessage extra line. I don't know if it helps, but maybe in other cases where debugging is needed maybe this "trick" could help.

System: DELL Optiplex, intel Core2Duo, Win7 x64, Delphi 7

Saperien

I've been struggling with EEFFACE for weeks. Finally found that the cause was this instruction:

PDFForgePDF.CopyPDFFile(pdffile,pdfcreatorfile,1,1);

the contents of variables pdffile and pdfcreatorfile were the same....

Maybe this can help some poor bugger like myself...

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!