W
weilai2570019
Unregistered / Unconfirmed
GUEST, unregistred user!
请看这些代码你向for循环里的数组都是动态数组每一次给他们负值时我都没有给这些动态数组清空直接就是让他们覆盖的
为什么这段断代码跑了三天都没有问题而第四天会出现地址错误呢
Access violation at address 00401C0A in module 'Clients.exe'. Write of address 00000001
这种错误呢
log_path:=d:
str_path:=log_path+'/regini.ini'; //第一套方案
inifile:=Tinifile.Create(str_path);
for inti:=0 to count-1 do
begin
roadno[inti]:=inifile.ReadString('section'+inttostr(inti),'id','');
roadnoName[inti]:=inifile.ReadString('section'+inttostr(inti),'RoadNo','');
Compress[inti]:=inifile.ReadString('section'+inttostr(inti),'Compress','');
DefaultSrc[inti]:=inifile.ReadString('section'+inttostr(inti),'DefaultSrc','');
Dst[inti]:=inifile.ReadString('section'+inttostr(inti),'Dst','');
Exclude[inti]:=inifile.ReadString('section'+inttostr(inti),'Exclude','');
Include[inti]:=inifile.ReadString('section'+inttostr(inti),'Include','');
Src[inti]:=inifile.ReadString('section'+inttostr(inti),'Src','');
VideoAndImage[inti]:=inifile.ReadString('section'+inttostr(inti),'VideoAndImage','');
StationEnabled[inti]:=inifile.ReadInteger('section'+inttostr(inti),'StationEnabled',0);
Igorn[inti]:=inifile.ReadInteger('section'+inttostr(inti),'Igorn',0);
KeepTime[inti]:=inifile.ReadInteger('section'+inttostr(inti),'KeepTime',0);
inttype[inti]:=inifile.ReadInteger('section'+inttostr(inti),'type',0);
end;
为什么这段断代码跑了三天都没有问题而第四天会出现地址错误呢
Access violation at address 00401C0A in module 'Clients.exe'. Write of address 00000001
这种错误呢
log_path:=d:
str_path:=log_path+'/regini.ini'; //第一套方案
inifile:=Tinifile.Create(str_path);
for inti:=0 to count-1 do
begin
roadno[inti]:=inifile.ReadString('section'+inttostr(inti),'id','');
roadnoName[inti]:=inifile.ReadString('section'+inttostr(inti),'RoadNo','');
Compress[inti]:=inifile.ReadString('section'+inttostr(inti),'Compress','');
DefaultSrc[inti]:=inifile.ReadString('section'+inttostr(inti),'DefaultSrc','');
Dst[inti]:=inifile.ReadString('section'+inttostr(inti),'Dst','');
Exclude[inti]:=inifile.ReadString('section'+inttostr(inti),'Exclude','');
Include[inti]:=inifile.ReadString('section'+inttostr(inti),'Include','');
Src[inti]:=inifile.ReadString('section'+inttostr(inti),'Src','');
VideoAndImage[inti]:=inifile.ReadString('section'+inttostr(inti),'VideoAndImage','');
StationEnabled[inti]:=inifile.ReadInteger('section'+inttostr(inti),'StationEnabled',0);
Igorn[inti]:=inifile.ReadInteger('section'+inttostr(inti),'Igorn',0);
KeepTime[inti]:=inifile.ReadInteger('section'+inttostr(inti),'KeepTime',0);
inttype[inti]:=inifile.ReadInteger('section'+inttostr(inti),'type',0);
end;