程序退出时出错:

Iamfish 2004-07-07 10:13:29
提示信息如下:
---------------------------
Debugger Exception Notification
---------------------------
Project FYManageSystem.exe raised exception class EAssertionFailed with message 'Assertion failure (c:\program files\borland\delphi6\Lib\Classes.pas, line 9376)'. Process stopped. Use Step or Run to continue.
---------------------------
OK Help
---------------------------

请问可能是哪方面的错误?

procedure TComponent.FreeNotification(AComponent: TComponent);
begin
if (Owner = nil) or (AComponent.Owner <> Owner) then
begin
// Never acquire a reference to a component that is being deleted.
assert(not (csDestroying in (ComponentState + AComponent.ComponentState))); //9376行,出错的那一行.这个Classes.pas用的是Delphi6 RT Update3的
if not Assigned(FFreeNotifies) then FFreeNotifies := TList.Create;
if FFreeNotifies.IndexOf(AComponent) < 0 then
begin
FFreeNotifies.Add(AComponent);
AComponent.FreeNotification(Self);
end;
end;
Include(FComponentState, csFreeNotification);
end;
...全文
88 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
tonylk 2004-07-07
  • 打赏
  • 举报
回复
但不调试程序,大致确定问题出现的位置。

把可能会出错的代码分别屏蔽掉再看结果。
Iamfish 2004-07-07
  • 打赏
  • 举报
回复
Classes.pas是Delphi6自带的单元.

我知道是由于我的代码出错.

Assertion failure 一般会是哪方面的错误引起的?
江山易改 2004-07-07
  • 打赏
  • 举报
回复
assert(not (csDestroying in (ComponentState + AComponent.ComponentState)));
鬼知道你调用的这个定义是什么
csDestroying
Iamfish 2004-07-07
  • 打赏
  • 举报
回复
应该不是Classes.pas的问题,因为我有别一个程序编译可以通过.

5,388

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 开发及应用
社区管理员
  • VCL组件开发及应用社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧