2017年12月5日 星期二

[BCB] EEFFACE例外處理

本來舊的WebCam給我的是320*240解析度的圖像,但新的WebCam給我640*480,當時我的電腦是連接舊的,結果程式一發出去在外面的機器都不能用,因為他們都裝設新的,所以我先換一台,裝好driver,裝driver時出現這個錯誤:

Driver是這個:

按掉很多次後幸好他可以繼續裝,裝好之後打開他給的範例程式,運作正常:


開啟程式也沒問題,但IDE在Debug模式下會瘋狂報錯,一出現就當掉只能重開:



查網路上的說法是說這是程式拋出BCB6外的exception,Delphin遇到這種外部例外都這樣歸類處理,也就是IDE無法處理
"
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.
"
(https://stackoverflow.com/questions/2197351/external-exception-eefface-in-delphi/7949748#7949748?newreg=c1729bc078ba43e98c2ae1a59b876913)
解決辦法
1.改regEdit

"
同事安裝了中信公司網銀客戶端後無法運行,報「External exception EEFFACE」錯誤,而另一個同事就使用正常。我檢查了很久也沒找到原因,後來去網上搜了一下,發現報這個錯誤的情況還真不少,總體來說都是用 C++ Builder 程序編譯的軟件才會報錯。C++ Builder 某些版本的問題加上程序設計的缺陷導致此問題發生。下面給出兩個通用的解決辦法:
1、安裝一個補丁包後重新編譯源程序。參見:http://www.respower.com/~earlye/programming/TranslateStandardExceptions.htm
2、修改註冊表:
假設出錯的應用程序名為「Project1.exe」,打開註冊表,找到如下主鍵:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options]
新建一個「Project1.exe」項,然後再其下創建一個字符串值,鍵值名為「DisableHeapLookAside」,內容設為「1」即可(有時候留空也有效)。

"
(http://www.mympc.org/news/2/2010-3-19_17365125942.html)

"
Error message: 'External Exception EEFFACE'
This message occurs under Windows 2000 and NT 4.0 with Service Pack 4 and higher, as the result of a bug in the Borland Database Engine (BDE). In order to avoid this message ask your network administrator to adjust the Windows NT Registry as follows:
1.Use regedt32.exe to open the key
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows
NT\CurrentVersion\Image File
Execution Options.
2.With this key selected, add a key with the name photobase.exe. Class can remain
empty.
3.Select this key and add the following value: DisableHeapLookAside; data type
REG_SZ; string "1" (without quotation marks).
Another solution is to change to Windows 95 or Windows 98, or to use Sybase SQL Anywhere or Oracle as a database system.
"  (http://forum.worldstart.com/showthread.php?t=50073)

2.IDE 按F8(RUN but Stop) 不要按F9(RUN) 有機會成功進debug模式


至少可以用了,呼

額外參考資料:
【轉】遇到 External Exception EEFFACE 錯誤的解決辦法
(http://www.cnblogs.com/zhujiecode/articles/2620489.html)

沒有留言:

張貼留言