找回密码
 加入
搜索
查看: 2334|回复: 8

[在线等]最新版本的AU3很容易导致机器卡机?

[复制链接]
发表于 2009-6-5 18:18:18 | 显示全部楼层 |阅读模式
我有一个程序,使用最新版本的Au3程序编写,但经常偶然的出现机器卡住的情况

并没有死机,CPU占用也不高,但机器运行极慢。键盘和鼠标能动作,但整个机器很卡,任务管理器都开不了,就算开了也关不掉这个Au3程序,系统几乎没有反应了

在很多台机器上都有这样的问题,出问题的时间不定,有时候有,有时候没有

编译的时候用了代码迷惑,用了本论坛里边所发的整理内存的函数,其他的都是AU3最新汉化版内置的函数。

试过了很多方法,还是没有解决,对Au3编写的程序有些许失望。不知道如何解决此问题?

在线等待高手解答。
发表于 2009-6-5 18:44:14 | 显示全部楼层
我还未升级最新版
目前版本还够用
不加迷惑编译暂时没有你所谓的问题
之前都有坛友谈到:
加密是会降低效率,并且可能使@error 和 @extend的检测出问题
你试试不加迷惑代码看看怎样
其实不加迷惑也没所谓啦
如果高手真的想破你,你也没法逃
 楼主| 发表于 2009-6-5 18:52:21 | 显示全部楼层
但我的问题是相当于死机,操作系统是2003
XP下偶尔也会,我试过编译一个SCSI连接器,还是有可能出问题,我的代码如下:

#include <string.au3>
#include <Date.au3>
$g_szVersion = "StarDiskCache"
Opt("RunErrorsFatal", 0)

$VndPath=IniRead (@ScriptDir & "\SCSICFG.ini", "SCSI CONFIG", "VNDPath", "000" )
$ServerIP=IniRead (@ScriptDir & "\SCSICFG.ini", "SCSI CONFIG", "ServerIP", "192.168.0.253" )
$ServerPort=IniRead (@ScriptDir & "\SCSICFG.ini", "SCSI CONFIG", "ServerPort", "3260" )
$Iscsiword=IniRead (@ScriptDir & "\SCSICFG.ini", "SCSI CONFIG", "Iscsiword", "000" )

If UBound($CmdLine)>2 Then
$RunVNDMenu=$CmdLine[2]
else
$RunVNDMenu=IniRead (@ScriptDir & "\SCSICFG.ini", "SCSI CONFIG", "RunVNDMenu", "0" )
endif

If UBound($CmdLine)>1 Then
$UseCache=$CmdLine[1]
else
$UseCache=IniRead (@ScriptDir & "\SCSICFG.ini", "SCSI CONFIG", "UseCache", "0" )
endif

if $VndPath="000" or $Iscsiword="000" then TrayTip ( "错误", " 读取配置文件错误或设置不正确.  无法连接服务器,请与网络管理员联系![#1]", 1, 1)
if $VndPath="000" or $Iscsiword="000" then sleep(10000)
if $VndPath="000" or $Iscsiword="000" then exit

if FileExists($VndPath) then
if $RunVndMenu=1 then RUN(@WindowsDir&"\Explorer.exe "&$VndPath)
exit
endif


if not FileExists($VndPath) then
TrayTip ( "正在连接 [0%]", "检测服务器状态...", 1, 1)

$serverstat=ping($ServerIP,1000)
if $serverstat<>1 then TrayTip ( "错误", " 目标服务器目前不可用,请与网络管理员联系![#2]", 1, 1)
if $serverstat<>1 then sleep(10000)
if $serverstat<>1 then exit


if $UseCache="1" then
        TrayTip ( "正在连接 [7%]", " 正在设置动态磁盘缓存...", 1, 1)
        RunWait(@ScriptDir&"\Dcache.dll /verysilent /TASKS="&""""""&" ip=192.168.0.253",@ScriptDir,@SW_HIDE)
        DirRemove("C:\Documents and Settings\All Users\「开始」菜单\程序\遥志网络硬盘客户端", 1)
        TrayTip ( "正在连接 [9%]", " 动态磁盘缓存已启用...", 1, 1)
endif

run("iscsicli AddTargetPortal "&$ServerIP&" "&$ServerPort,"", @SW_HIDE)
run("iscsicli LoginTarget "&$Iscsiword,"", @SW_HIDE)


TrayTip ( "正在连接 [10%]", "正在连接服务器.           ", 1, 1)
sleep(250)
TrayTip ( "正在连接 [15%]", "正在连接服务器..          ", 1, 1)
sleep(250)
TrayTip ( "正在连接 [20%]", "正在连接服务器...         ", 1, 1)
sleep(250)
TrayTip ( "正在连接 [25%]", "正在连接服务器....        ", 1, 1)
sleep(250)
TrayTip ( "正在连接 [30%]", "正在连接服务器.....       ", 1, 1)
sleep(250)
TrayTip ( "正在连接 [35%]", "正在连接服务器......      ", 1, 1)
sleep(250)
TrayTip ( "正在连接 [40%]", "正在连接服务器.......     ", 1, 1)
sleep(250)
TrayTip ( "正在连接 [45%]", "正在连接服务器........    ", 1, 1)
sleep(250)
TrayTip ( "正在连接 [50%]", "正在连接服务器.........   ", 1, 1)
sleep(250)
TrayTip ( "正在连接 [55%]", "正在连接服务器..........  ", 1, 1)
if not FileExists($VndPath) then sleep(250)
TrayTip ( "正在连接 [60%]", "正在连接服务器........... ", 1, 1)
if not FileExists($VndPath) then sleep(250)
if FileExists($VndPath) then TrayTip ( "正在连接 [65%]", "成功连接服务器.         ", 1, 1)
if not FileExists($VndPath) then TrayTip ( "正在连接 [65%]", "正在连接服务器............", 1, 1)
if not FileExists($VndPath) then sleep(250)
if FileExists($VndPath) then TrayTip ( "正在连接 [70%]", "成功连接服务器.         ", 1, 1)
if not FileExists($VndPath) then TrayTip ( "正在连接 [70%]", "正在连接服务器.           ", 1, 1)
if not FileExists($VndPath) then sleep(250)
if FileExists($VndPath) then TrayTip ( "正在连接 [75%]", "正在连获取资源.        ", 1, 1)
if not FileExists($VndPath) then TrayTip ( "正在连接 [75%]", "正在连接服务器..          ", 1, 1)
if not FileExists($VndPath) then sleep(250)
if FileExists($VndPath) then TrayTip ( "正在连接 [80%]", "正在连获取资源..       ", 1, 1)
if not FileExists($VndPath) then TrayTip ( "正在连接 [80%]", "正在连接服务器...         ", 1, 1)
if not FileExists($VndPath) then sleep(250)
if FileExists($VndPath) then TrayTip ( "正在连接 [85%]", "正在连获取资源...      ", 1, 1)
if not FileExists($VndPath) then TrayTip ( "正在连接 [85%]", "正在连接服务器....        ", 1, 1)
if not FileExists($VndPath) then sleep(250)
if FileExists($VndPath) then TrayTip ( "正在连接 [90%]", "正在连获取资源....     ", 1, 1)
if not FileExists($VndPath) then TrayTip ( "正在连接 [90%]", "正在连接服务器.....       ", 1, 1)
if not FileExists($VndPath) then sleep(250)
if FileExists($VndPath) then TrayTip ( "正在连接 [95%]", "正在连获取资源.....    ", 1, 1)
if not FileExists($VndPath) then TrayTip ( "正在连接 [95%]", "正在连接服务器......      ", 1, 1)
if not FileExists($VndPath) then sleep(250)
        sleep(250)
    if $RunVNDMenu=1 then
        TrayTip ( "正在连接 [99%]", "正在开启游戏菜单.", 1, 1)
        if FileExists($VndPath) then RUN(@WindowsDir&"\Explorer.exe "&$VndPath)
        if not FileExists($VndPath) then TrayTip( "连接失败", "稍后自动重试连接.", 1, 1)
        if not FileExists($VndPath) then sleep(2000)
        if FileExists($VndPath) then exit
else
        if FileExists($VndPath) then TrayTip( "正在连接 [99%]", "连接成功,正在启动程序.", 1, 1)
        if not FileExists($VndPath) then TrayTip( "连接失败", "稍后自动重试连接.", 1, 1)
        if not FileExists($VndPath) then sleep(2000)
        if FileExists($VndPath) then exit
endif
EndIf

;第一次重试
if not FileExists($VndPath) then
TrayTip ( "正在连接 [0%]", "检测服务器状态...", 1, 1)

$serverstat=ping($ServerIP,300)
if $serverstat<>1 then TrayTip ( "错误", " 目标服务器目前不可用,请与网络管理员联系![#2]", 1, 1)
if $serverstat<>1 then sleep(10000)
if $serverstat<>1 then exit

TrayTip ( "正在连接5%", "正在验证用户授权...", 1, 1)
run("iscsicli AddTargetPortal "&$ServerIP&" "&$ServerPort,"", @SW_HIDE)
run("iscsicli LoginTarget "&$Iscsiword,"", @SW_HIDE)
sleep(250)

TrayTip ( "正在连接 [10%]", "正在连接服务器.           ", 1, 1)
sleep(250)
TrayTip ( "正在连接 [15%]", "正在连接服务器..          ", 1, 1)
sleep(250)
TrayTip ( "正在连接 [20%]", "正在连接服务器...         ", 1, 1)
sleep(250)
TrayTip ( "正在连接 [25%]", "正在连接服务器....        ", 1, 1)
sleep(250)
TrayTip ( "正在连接 [30%]", "正在连接服务器.....       ", 1, 1)
sleep(250)
TrayTip ( "正在连接 [35%]", "正在连接服务器......      ", 1, 1)
sleep(250)
TrayTip ( "正在连接 [40%]", "正在连接服务器.......     ", 1, 1)
sleep(250)
TrayTip ( "正在连接 [45%]", "正在连接服务器........    ", 1, 1)
sleep(250)
TrayTip ( "正在连接 [50%]", "正在连接服务器.........   ", 1, 1)
sleep(250)
TrayTip ( "正在连接 [55%]", "正在连接服务器..........  ", 1, 1)
if not FileExists($VndPath) then sleep(250)
TrayTip ( "正在连接 [60%]", "正在连接服务器........... ", 1, 1)
if not FileExists($VndPath) then sleep(250)
if FileExists($VndPath) then TrayTip ( "正在连接 [65%]", "成功连接服务器.         ", 1, 1)
if not FileExists($VndPath) then TrayTip ( "正在连接 [65%]", "正在连接服务器............", 1, 1)
if not FileExists($VndPath) then sleep(250)
if FileExists($VndPath) then TrayTip ( "正在连接 [70%]", "成功连接服务器.         ", 1, 1)
if not FileExists($VndPath) then TrayTip ( "正在连接 [70%]", "正在连接服务器.           ", 1, 1)
if not FileExists($VndPath) then sleep(250)
if FileExists($VndPath) then TrayTip ( "正在连接 [75%]", "正在连获取资源.        ", 1, 1)
if not FileExists($VndPath) then TrayTip ( "正在连接 [75%]", "正在连接服务器..          ", 1, 1)
if not FileExists($VndPath) then sleep(250)
if FileExists($VndPath) then TrayTip ( "正在连接 [80%]", "正在连获取资源..       ", 1, 1)
if not FileExists($VndPath) then TrayTip ( "正在连接 [80%]", "正在连接服务器...         ", 1, 1)
if not FileExists($VndPath) then sleep(250)
if FileExists($VndPath) then TrayTip ( "正在连接 [85%]", "正在连获取资源...      ", 1, 1)
if not FileExists($VndPath) then TrayTip ( "正在连接 [85%]", "正在连接服务器....        ", 1, 1)
if not FileExists($VndPath) then sleep(250)
if FileExists($VndPath) then TrayTip ( "正在连接 [90%]", "正在连获取资源....     ", 1, 1)
if not FileExists($VndPath) then TrayTip ( "正在连接 [90%]", "正在连接服务器.....       ", 1, 1)
if not FileExists($VndPath) then sleep(250)
if FileExists($VndPath) then TrayTip ( "正在连接 [95%]", "正在连获取资源.....    ", 1, 1)
if not FileExists($VndPath) then TrayTip ( "正在连接 [95%]", "正在连接服务器......      ", 1, 1)
if not FileExists($VndPath) then sleep(250)
        sleep(250)
    if $RunVNDMenu=1 then
        TrayTip ( "正在连接 [99%]", "正在开启游戏菜单.", 1, 1)
        if FileExists($VndPath) then RUN(@WindowsDir&"\Explorer.exe "&$VndPath)
        if not FileExists($VndPath) then TrayTip( "连接失败", "稍后自动重试连接.", 1, 1)
        if not FileExists($VndPath) then sleep(1000)
        if FileExists($VndPath) then exit
else
        if FileExists($VndPath) then TrayTip( "正在连接 [99%]", "连接成功,正在启动程序.", 1, 1)
        if not FileExists($VndPath) then TrayTip( "连接失败", "稍后自动重试连接.", 1, 1)
        if not FileExists($VndPath) then sleep(1000)
        if FileExists($VndPath) then exit
endif
EndIf

;第二次重试
if not FileExists($VndPath) then
TrayTip ( "正在连接 [0%]", "检测服务器状态...", 1, 1)
sleep(100)
TrayTip ( "正在连接5%", "正在验证用户授权...", 1, 1)
run("iscsicli AddTargetPortal "&$ServerIP&" "&$ServerPort,"", @SW_HIDE)
run("iscsicli LoginTarget "&$Iscsiword,"", @SW_HIDE)
sleep(250)
TrayTip ( "正在连接 [10%]", "正在连接服务器.           ", 1, 1)
sleep(250)
TrayTip ( "正在连接 [15%]", "正在连接服务器..          ", 1, 1)
sleep(250)
TrayTip ( "正在连接 [20%]", "正在连接服务器...         ", 1, 1)
sleep(250)
TrayTip ( "正在连接 [25%]", "正在连接服务器....        ", 1, 1)
sleep(250)
TrayTip ( "正在连接 [30%]", "正在连接服务器.....       ", 1, 1)
sleep(250)
TrayTip ( "正在连接 [35%]", "正在连接服务器......      ", 1, 1)
sleep(250)
TrayTip ( "正在连接 [40%]", "正在连接服务器.......     ", 1, 1)
sleep(250)
TrayTip ( "正在连接 [45%]", "正在连接服务器........    ", 1, 1)
sleep(250)
TrayTip ( "正在连接 [50%]", "正在连接服务器.........   ", 1, 1)
sleep(250)
TrayTip ( "正在连接 [55%]", "正在连接服务器..........  ", 1, 1)
if not FileExists($VndPath) then sleep(250)
TrayTip ( "正在连接 [60%]", "正在连接服务器........... ", 1, 1)
if not FileExists($VndPath) then sleep(250)
if FileExists($VndPath) then TrayTip ( "正在连接 [65%]", "成功连接服务器.         ", 1, 1)
if not FileExists($VndPath) then TrayTip ( "正在连接 [65%]", "正在连接服务器............", 1, 1)
if not FileExists($VndPath) then sleep(250)
if FileExists($VndPath) then TrayTip ( "正在连接 [70%]", "成功连接服务器.         ", 1, 1)
if not FileExists($VndPath) then TrayTip ( "正在连接 [70%]", "正在连接服务器.           ", 1, 1)
if not FileExists($VndPath) then sleep(250)
if FileExists($VndPath) then TrayTip ( "正在连接 [75%]", "正在连获取资源.        ", 1, 1)
if not FileExists($VndPath) then TrayTip ( "正在连接 [75%]", "正在连接服务器..          ", 1, 1)
if not FileExists($VndPath) then sleep(250)
if FileExists($VndPath) then TrayTip ( "正在连接 [80%]", "正在连获取资源..       ", 1, 1)
if not FileExists($VndPath) then TrayTip ( "正在连接 [80%]", "正在连接服务器...         ", 1, 1)
if not FileExists($VndPath) then sleep(250)
if FileExists($VndPath) then TrayTip ( "正在连接 [85%]", "正在连获取资源...      ", 1, 1)
if not FileExists($VndPath) then TrayTip ( "正在连接 [85%]", "正在连接服务器....        ", 1, 1)
if not FileExists($VndPath) then sleep(250)
if FileExists($VndPath) then TrayTip ( "正在连接 [90%]", "正在连获取资源....     ", 1, 1)
if not FileExists($VndPath) then TrayTip ( "正在连接 [90%]", "正在连接服务器.....       ", 1, 1)
if not FileExists($VndPath) then sleep(250)
if FileExists($VndPath) then TrayTip ( "正在连接 [95%]", "正在连获取资源.....    ", 1, 1)
if not FileExists($VndPath) then TrayTip ( "正在连接 [95%]", "正在连接服务器......      ", 1, 1)
if not FileExists($VndPath) then sleep(250)
        sleep(250)
    if $RunVNDMenu=1 then
        TrayTip ( "正在连接 [99%]", "正在开启游戏菜单.", 1, 1)
        if FileExists($VndPath) then RUN(@WindowsDir&"\Explorer.exe "&$VndPath)
        if not FileExists($VndPath) then TrayTip( "连接失败", "连续三次连接失败.", 1, 1)
        if not FileExists($VndPath) then sleep(1000)
        if FileExists($VndPath) then exit
else
        if FileExists($VndPath) then TrayTip( "正在连接 [99%]", "连接成功,正在启动程序.", 1, 1)
        if not FileExists($VndPath) then TrayTip( "连接失败", "连续三次连接失败.", 1, 1)
        if not FileExists($VndPath) then sleep(1000)
        if FileExists($VndPath) then exit
endif
EndIf

if not FileExists($VndPath) then
        TrayTip( "连接失败", "连续三次连接失败,请与网络管理员联系.", 1, 1)
        sleep(20000)
        Exit
endif
发表于 2009-6-5 19:00:33 | 显示全部楼层
我帮你加迷惑编译了一个
我这里不会出现你那样的问题
你自己测试下

另外,我把里面的第7行Opt("RunErrorsFatal", 0)删掉了
这个在新版早就被官方废掉了
我不明白为何出现在你的代码中
多问一句,抄的代码?

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?加入

×
 楼主| 发表于 2009-6-5 19:15:42 | 显示全部楼层
本帖最后由 simxinzi 于 2009-6-5 19:17 编辑

不是,这代码是我以前写的,用新版编译的时候,显示这行Opt("RunErrorsFatal", 0)出错的,我用新版本编译的时候也去掉了这行

出问题的可能大概每100次有1次有问题,卡住,整个机器变慢,非常慢,慢得什么也做不了!

另外我是用ANSI编译的,你编译的版本不支持中文显示
发表于 2009-6-5 19:17:30 | 显示全部楼层
本帖最后由 lynfr8 于 2009-6-5 19:18 编辑

每一百次  一次有问题??????????
I服了YOU
 楼主| 发表于 2009-6-5 19:22:17 | 显示全部楼层
本帖最后由 simxinzi 于 2009-6-5 19:32 编辑

是的,我那是保守的估计,实际我服务器上另一款Au3软件平均每月要出问题1次,但就是这样,也很要命,因为我用在服务器上的一个程序也是类似的同样的问题,服务器死机的滋味不好受啊,我已经被这问题困绕很久了。一度让我对Au3失去信心。


服务器的系统2003 我已经重新安装过,已排除系统问题,

几台服务器相同的问题,运行Au3程序不定时卡机~ 有时候连续几天就没问题,有时候1,2个小时挂掉,卡住,远程桌面连不了,FTP上不去,我服务器本来是登陆锁定的,出问题的时候按CTRL+ALT+DEL没有任何作用,屏幕一片空白,但可以Ping得通,共享的文件没办法访问了,有时候出现此问题的时候共享可以访问,出现此问题时的唯一的办法,强行断电,重新启动。
发表于 2009-6-5 21:17:30 | 显示全部楼层
Win2003 sp2 &  内存 768M
不加代码迷惑

似乎还是跟以前差不多。。 没什么感觉。。 只想说帮助的弹出速度似乎慢了。
发表于 2009-6-5 21:38:21 | 显示全部楼层
那就换回老版本,哈哈
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-9-23 03:15 , Processed in 0.079127 second(s), 25 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表