求教,程序异常关闭! 这段时间一直受到程序自动关闭的困扰。程序运行过程中,经常会出退什么提示信息也没有,就自动关闭了。请教各位大虾,在什么情况下会引起程序的异常关闭呢?我程序中,基本上都是有异常处理代码的。但是还是一直这样。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 先谢谢楼上,因为程序是服务端,我创建了一个内存映像文件,然后在另一个程序中监控程序中断的位置,但是中断的位置,但是这个中断的位置,我感觉不出会引起程序关闭,而且我都是做了try..except处理的。可否再指点一下? 贴出代码:try if (BaseObject.m_btRaceServer <> RC_PLAYOBJECT) then begin shared.GlobalVal[497] := 1079; nCheckCode := 38; str := BaseObject.GetShowName; shared.GlobalVal[497] := 1080; str := str +'|'+inttostr(BaseObject.m_Abil.Level); shared.GlobalVal[497] := 1081; nCheckCode := 39; shared.GlobalVal[497] := 1082; SendMsg(BaseObject, RM_TURN, BaseObject.m_btDirection, BaseObject.m_nCurrX, BaseObject.m_nCurrY, 0, str); end else begin shared.GlobalVal[497] := 1083; nCheckCode := 40; str := BaseObject.GetShowName; nCheckCode := 41; shared.GlobalVal[497] := 1084; if (m_btPermission > 3) and (TPlayObject(BaseObject).m_boDouli or m_pEnvir.boHidePlayName) then begin shared.GlobalVal[497] := 1085; SendMsg(BaseObject, RM_TURN, BaseObject.m_btDirection, BaseObject.m_nCurrX, BaseObject.m_nCurrY, 0, BaseObject.m_sCharName) end else begin shared.GlobalVal[497] := 1086; SendMsg(BaseObject, RM_TURN, BaseObject.m_btDirection, BaseObject.m_nCurrX, BaseObject.m_nCurrY, 0, str); end; end; shared.GlobalVal[497] := 1087; Except shared.GlobalVal[497] := 1088; end; 中断在shared.GlobalVal[497] := 1079;的下一行BaseObject是一个类,请问一下,如果这个类为被Free了,但是没有置为NIL,会引起程序自动关闭这样的后果吗? try if (BaseObject<>nil) and (BaseObject.m_btRaceServer <> RC_PLAYOBJECT) then beginBaseObject在释放里用FreeandNil(BaseObject). sql数据库链接出错 疑难杂症 delphi Socket api Send 整型值 Application.CreateForm主要做那些工作? 关于在Delphi中做票据打印 对象实例化 使用ADO如何得到一个数据库中是否存在某个表,别提SESSION~~ 怎样判断一个set中含有某一项? 关于treeview显示的问题 我用query要统计表中一行所有的值,该怎么做呢? 大虾,小虾, 抢分的时候到了: 求购一个Tcp/ip广播/接收广播的源程序(不许用元件),UDP广播不算! 如何获取网页中的北京时间 请问delphi里经常会见到别人使用Set8087CW(Saved8087CW)
try
if (BaseObject.m_btRaceServer <> RC_PLAYOBJECT) then begin
shared.GlobalVal[497] := 1079;
nCheckCode := 38;
str := BaseObject.GetShowName;
shared.GlobalVal[497] := 1080;
str := str +'|'+inttostr(BaseObject.m_Abil.Level);
shared.GlobalVal[497] := 1081;
nCheckCode := 39;
shared.GlobalVal[497] := 1082;
SendMsg(BaseObject, RM_TURN, BaseObject.m_btDirection, BaseObject.m_nCurrX, BaseObject.m_nCurrY, 0, str);
end else begin
shared.GlobalVal[497] := 1083;
nCheckCode := 40;
str := BaseObject.GetShowName;
nCheckCode := 41;
shared.GlobalVal[497] := 1084;
if (m_btPermission > 3) and (TPlayObject(BaseObject).m_boDouli or m_pEnvir.boHidePlayName) then begin
shared.GlobalVal[497] := 1085;
SendMsg(BaseObject, RM_TURN, BaseObject.m_btDirection, BaseObject.m_nCurrX, BaseObject.m_nCurrY, 0, BaseObject.m_sCharName)
end else begin
shared.GlobalVal[497] := 1086;
SendMsg(BaseObject, RM_TURN, BaseObject.m_btDirection, BaseObject.m_nCurrX, BaseObject.m_nCurrY, 0, str);
end;
end;
shared.GlobalVal[497] := 1087;
Except
shared.GlobalVal[497] := 1088;
end;
shared.GlobalVal[497] := 1079;的下一行BaseObject是一个类,请问一下,如果这个类为被Free了,但是没有置为NIL,会引起程序自动关闭这样的后果吗?
if (BaseObject<>nil) and (BaseObject.m_btRaceServer <> RC_PLAYOBJECT) then beginBaseObject在释放里用FreeandNil(BaseObject).