全國最多中醫師線上諮詢網站-台灣中醫網
發文 回覆 瀏覽次數:3914
推到 Plurk!
推到 Facebook!

EPrivilege 的 Exception 是如何發生的呢?

缺席
dllee
站務副站長


發表:321
回覆:2519
積分:1711
註冊:2002-04-15

發送簡訊給我
#1 引用回覆 回覆 發表時間:2004-02-05 17:28:41 IP:220.139.xxx.xxx 訂閱
最近在測試程式時,發生一個以前沒有遇到過的 Exception,    Exception! ClassName=EPrivilege, Message=EPrivilege    查了一下 BCB 的 Online Help,
EPrivilege is the exception class for processor privilege violations.    Unit    sysutils    Description    EPrivilege is thrown when an application tries to execute a 
processor instruction that is invalid for the current processor 
privilege level.    As a descendant of EExternal, EPrivilege saves the Windows exception 
record (if there is one) in its ExceptionRecord data structure.
對我而言,實在是很難想像,原本都可以 RUN 的 CODE ,現在會出現此 Exception?! 處理器是有什麼優先權的指令嗎? 我們在寫程式時要如何避免呢? 沒空更新的網頁... http://dllee.ktop.com.tw C及指標教學,計算機概論,資訊管理導論... http://dllee.adsldns.org 介紹Shells,LiteStep,GeoShell....
------
http://www.ViewMove.com
dllee
站務副站長


發表:321
回覆:2519
積分:1711
註冊:2002-04-15

發送簡訊給我
#2 引用回覆 回覆 發表時間:2007-09-27 09:25:20 IP:220.134.xxx.xxx 訂閱
老問題又發生了  還是不知道原因也不知道如何解決 EPrivilege 的 Exception!!!
找到幾篇相關的問題有人回應的網路文章:

http://www.tek-tips.com/viewthread.cfm?qid=497533

11 Mar 03 12:20

Hallo.
I have a piece of code that has been working fine - like a dream, in fact. I was very pleased.
All
of a sudden, after a couple of totally unrelated alterations to another
class, I start getting EPrivilege & sometimes EStackOverflow
exceptions.
I cannot for the life of me figure out why!
Has anyone else out there come accross something similar?
& found a workaround, or something?
PLEASE lemme know if you have!
Cheers,
Douglas J Livesey

13 Mar 03 0:13
months ago i had the same
problem than you, so i solve it changing the place where I declare the
variables. I don't know why but 2 variables were using the same memory
position.

Check it with the debugger.

In a moment I'll tell you how to know if this happen

-----------------------
ok, sorry for too late
when you declare 2 variables for example
int X
int Y
will take diferent memory position if you declare the same variables but in diferente order (I don't know why)
int Y
// you can add code here if you want another block
int X
but how to know what memory block are this values?
when
u are debugging your aplicattion open the evaluate and Modify window
(pressing ctrl F7) ther u can check teh memory position and its
values.

=======================

http://topic.csdn.net/t/20030514/08/1780192.htm

5 楼sun_is_shining(流云)回复于 2003-05-14 19:47:23 得分 0

说详细一点,就是线程优先级不够(我的理解),某些特殊的指令不能运行(out dx al)。也就是有没有办法在win2000profession版下编程修改程序的优先级
------ dllee: 可是我在程式中沒用到 Out 的組語, 如果是 VCL 用到, 那... 我也不知道是那個用到???
=======================

找到好多是看不懂的文字 ...
原本我的系統也跑了很多年了,但最近回報機台發生 Exception,回傳 Log 才發現又是 EPrivilege 的 Exception...

VMASK - ViewMove Automation Software KernelVMIO-Server/SECS/GEMdllee's blogdllee's StatPlus
------
http://www.ViewMove.com
系統時間:2024-11-24 10:47:05
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!