这个错误问题如何处理?????????????
"0x004047d4" 指令引用的"0x00a22268" 内存.该内存不能为"read".
要终止程序,请单击"确定".
要调试程序,请单击"取消".
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
"0x004047d4" 指令引用的"0x00a22268" 内存.该内存不能为"read".
要终止程序,请单击"确定".
要调试程序,请单击"取消".
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Application Error
Exception EAccessViolation in module STINFOCJS.exe at 000047D4.
Access violation at address 0040447D4 in module 'STINFOCJS.exe'. Read of address 00A22268.
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
这种在Delphi的开发中普遍存在.
这种内存访问错误,往往是访问了已经Free掉的对象,或是访问还没有生成的对象.
如果这个地址为 0000000, 则一般为访问还没有创建的对象.
如果这个地址不为0 ,而是一个地址, 那可能是要访问的对象已经Free掉. 或是要访问的对象是局部变量, 但还没有创建.
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
不是很明白这句话?
这样 if assigned() then
begin
end;
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
begin
aa.Free;
end
aa := nil;
tryexceptend;对可能出现异常的地方进行捕获
[警告] Unit1.pas(247): Unsafe type 'PChar'
[提示] Unit1.pas(489): Value assigned to 'sl' never used
[警告] Unit1.pas(781): Unsafe type 'PChar'
[警告] Unit1.pas(781): Unsafe type 'PChar'
这个警告只是编译器告诉你用到了指针类型的操作而已。
在菜单 project -- options 中的 compile message 中,将 unsafe 开头那三项去掉就可以
这个,主要是,如果你的程序,想要升级到 .net, 就必须注意处理,如果不想,没什么关系
[警告] Unit1.pas(526): Variable 'ms' might not have been initialized
[警告] Unit1.pas(452): Variable 'Sl' might not have been initialized
[警告] Unit1.pas(526): Variable 'ms' might not have been initialized
是我的在引用变量时没有初始化............
但是我初始化这两个变量后,还是有如下这些错误:
将这个文件<加壳>后就出错了