在Amazon Workspace上运行(Windows 7,Windows Server 2008)。
我正在运行这个简单的AutoHotKey脚本,它在某些位置点击鼠标,在我的机器上过夜,第二天早上,我收到了一条崩溃消息。有谁知道为什么会这样?
代码:
afterPlayedMiddle()
{
Random, randomPlayEndPosition, 1386, 1391
MouseClick, left, %randomPlayEndPosition%, 379
Sleep, 12000
skipPlay()
Return
}
skipPlay()
{
FileAppend,
(
1
), D:\Users\me\Desktop\log.txt
Random, randomSkipSecondsPosition, 1208, 1326
Random, randomPlayMiddleLength, 31000, 40000
MouseClick, left, %randomSkipSecondsPosition%, 379
Sleep, %randomPlayMiddleLength%
afterPlayedMiddle()
Return
}
skipPlay()
错误详情:
Problem signature:
Problem Event Name: APPCRASH
Application Name: AutoHotkey.exe
Application Version: 1.1.24.4
Application Timestamp: 5854e399
Fault Module Name: AutoHotkey.exe
Fault Module Version: 1.1.24.4
Fault Module Timestamp: 5854e399
Exception Code: c00000fd
Exception Offset: 0000000000037550
OS Version: 6.1.7601.2.1.0.400.8
Locale ID: 1033
Additional Information 1: 0939
Additional Information 2: 09391397756772fac27d80fc3911da27
Additional Information 3: 3aa0
Additional Information 4: 3aa056cf1d0cfdd807c97dd254e25a74
Read our privacy statement online:
http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409
If the online privacy statement is not available, please read our privacy statement offline:
C:\Windows\system32\en-US\erofflps.txt
答案 0 :(得分:1)
你的程序耗尽了堆栈内存。
错误代码c00000fd
,它是STATUS_STACK_OVERFLOW
的定义。
您以递归方式调用函数,而不返回。可以通过以下程序复制此崩溃:
afterPlayedMiddle()
{
skipPlay()
Return
}
skipPlay()
{
afterPlayedMiddle()
Return
}
skipPlay()
您必须以不同方式构建代码。我建议循环调用这两个函数。