被防病毒程序阻止的Delphi程序 [英] Delphi programs blocked by antivirus programs

查看:79
本文介绍了被防病毒程序阻止的Delphi程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一段代码试图在一秒钟内将许多文件写入磁盘.但是,如果我已经安装了Kaspersky Anrivirus 2011,它将失败.

I have a piece of code that is trying to write to disk many files in one second. However, it fails wince I have installed Kaspersky Anrivirus 2011.

Stream:= TFileStream.Create(sName, fmCreate); 

如果我禁用扫描仪,则该代码完全适用于Kaspersky 2010,也适用于Kaspersky 2011(无法将其完全从内存中卸载-除非将其卸载).如果(Kaspersky 2011正在运行,并且)我缓慢地写入磁盘,该代码也可以使用.因此,它显然不足以处理我的磁盘请求.

The code totally worked with Kaspersky 2010 and also works with Kaspersky 2011 if I disable its scanners (it cannot be totally unloaded from memory - unless it is uninstalled). The code also works if (Kaspersky 2011 is running and) I write to disk slooooowly. So it obviously is not fast enough to handle my disk requests.

我得到的错误是EFCreateError(无法创建xxx文件blablabla").错误是随机的.大多数文件都写入磁盘.约有10%失败.

The error I get is EFCreateError ('Cannot create xxx file blablabla'). Error is random. Most of the files are written to disk. About 10% fail.

我试图获得支持,但无法在卡巴斯基找到一个真正的人与他交谈.他们所谓的支持"实际上是一个FAQ数据库.当然,它谈到了如何安装产品和相关内容.与编程相关的问题无关.有什么想法吗?

I have tried to get support but is impossible to find a real person at Kaspersky to speak with. Their so called 'support' is actually a FAQ data base. Of course it speaks about how to install the product and related stuff. There is nothing about programing-related issues. Any ideas?

PS:这对整个Delphi社区都有影响!如果我们的所有客户都将KIS 2011用作防病毒软件,则将无法使用Delphi软件.目前,我建议我的用户禁用其防病毒功能,但我需要一个真正的解决方案.

PS: this has repercussions for the entire Delphi community! All our customers will fail to use Delphi software if they are using KIS 2011 as antivirus. For the moment I recommend to my users to disable their antivirus but I need a real solution.

如果拥有KIS 2011的人可以确认问题,那就太好了.只需创建一个微型程序,即可使用TFileStream将200个小文件写入磁盘.

It will be nice if a person with KIS 2011 can confirm the problem. Just create a tiny program that write 200 small files to disk using TFileStream.

更新:

  • 仅当文件不存在且已创建文件时才出现问题(创建而不是覆盖).
  • 类似的报告: https://forums.embarcadero.com/thread.jspa?threadID = 32751& tstart = 15
  • 类似的报告: http://forum.kaspersky.com/index.php?showtopic = 120561
  • 我想到的一个可能的解决方案是检测KIS是否正在运行,如果正在运行,则在每次写入磁盘后设置延迟.还是精打细算,让用户知道可能存在问题.有人知道如何检测服务是否正在运行吗?
  • 我添加了650ms的延迟(每次创建文件后),并且该错误仍然存​​在).因此,与写入磁盘的速度无关,而与写入多少文件无关.
  • 仅卸载了KIS2011.该问题不再出现.
  • 只需重新安装旧版本的KIS2010.该错误仍然存​​在,但很少出现(大约每300个文件,而不是KIS 2011中的约30个文件).
  • 问题已在第二台计算机上确认.
  • 新闻:崩溃出现在TFileStream.Create中,但是它可能是由先前调用的函数TestWriteAccess引起的.如果禁用此功能,则TFileStream.Create不会再失败.好吧,这不会改变太多.无论哪行代码生成错误,当卡巴斯基运行时,程序仍然无法(随机)将文件写入磁盘.
  • 仍在等待来自卡巴斯基的真实人的回复...
  • 从卡巴斯基支持小组获得更多自动化答复(我向多个国家/地区发送了电子邮件以寻求支持).所有人都指向FAQ数据库.
  • 我将自己的状态从卡巴斯基的粉丝(和客户)更改为卡巴斯基的仇恨者,因为我终于从卡巴斯基的支持人员那里得到了一个真实人的回答,这简直而令人讨厌.

要测试该代码,请尝试在循环中使用该代码,以创建1000个文件.该程序将创建一堆文件(随机数),然后在StreamFile:= TFileStream.Create处失败.更新:可通过在创建每个文件后输入一小段延迟来解决此问题.
https://docs.google.com/forms/d/1H3_O1z1iEqf9B9>

To test the code, try to use the code in a loop, to create 1000 files. The program creates a bunch of files (random number) then it fails at StreamFile:= TFileStream.Create. Update: The issue can be fixed by entering a small delay after creating each file.
https://docs.google.com/forms/d/1H3_O1z1iEqfh9ZT9u3B0R1tGEj-Hc9o7rAE0LKPr33Y

2013更新

从今天下午开始(更新后),KIS与Delphi发生冲突.每次我编译项目时,KIS都会使CPU利用率达到100%.我将不得不卸载它.

Starting with this afternoon (after an update) KIS conflicts with Delphi. Every time I compile a project KIS spikes to 100% CPU utilization. I will have to uninstall it.

2017更新

从2017年开始,我所有的Delphi程序的所有误报警报都神奇地消失了.看来像卡巴斯基这样的程序从其病毒列表中删除Delphi生成的可执行文件就足够了;其他所有较小的防病毒程序都紧随其后.

All false positive alarms disappeared magically for all my Delphi programs starting with 2017. It seems that it was enough for a program like Kaspersky remove Delphi-generated executables from its virus list; all other smaller antivirus programs followed.

Delphi 7,Win 7(32),KIS 2011

Delphi 7, Win 7 (32), KIS 2011

推荐答案

不是解决问题的答案,但您应该通知卡巴斯基,他们可能不知道与Delphi库相关的病毒签名.

Not an answer to solve your problem, but you should inform Kaspersky, probably they don't know there is a virus signature associated with a Delphi library.

如果您的程序不太复杂,则可能需要尝试使用Lazarus/FPC.它不如Delphi好,但是我已经使用了几年了,并且在Windows/MacOS/Linux中取得了很好的效果.

And if your program isn't too complex, you might want to try Lazarus/FPC. It's not as good as Delp but I've been using it for several years now, and have got good results in Windows/MacOS/Linux.

这篇关于被防病毒程序阻止的Delphi程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆