什么是“未知软件异常(0xc00000fd)”错误以及如何避免它?

发布于 2024-12-09 22:41:15 字数 749 浏览 1 评论 0原文

我创建了一个名为 code_2 的 AHK 脚本,对其进行编译并将其放入我的 Startup 文件夹中,以便每次打开计算机时它都会自动开始运行。

该脚本检查网站是否有新更新,每当检测到网站上有更新时,它就会使用 UrlDownloadToFile 下载这些更新。

起初,该脚本似乎运行良好,但最近,在脚本运行大约 15 分钟后,我开始从计算机收到以下消息:

C:\Documents and Settings\Administrator\「开始」功能表\程序集\启动\code_2.exe: code_2.exe - 应用程序错误

应用程序发生异常未知软件异常 (0xc00000fd) 位于位置 0x7c92eddc。

请按[确定]终止套餐

请按[取消]进行计划侦错

知道此消息是关于什么的吗? (对不起,这里的中文,但我想如果你知道这条消息的编号,你应该熟悉它的内容。)

无论如何,这是翻译后的消息:

C:\Documents and Settings\Administrator\Start Menu\Programs\Startup\code_2.exe: code_2.exe - 应用程序错误

应用程序中位置 0x7c92eddc 发生异常未知软件异常 (0xc00000fd)。

单击“确定”终止程序
单击取消调试程序

I have created an AHK script named code_2, compiled it and placed it into my Startup folder so that it would automatically start running each time I turn on the computer.

The script checks a website for new updates and whenever an update on the website is detected, it downloads those updates using UrlDownloadToFile.

At first the script seemed to work fine, but recently I started receiving the following messages from my computer after my script has been running for about 15 minutes:

C:\Documents and Settings\Administrator\「開始」功能表\程式集\啟動\code_2.exe:
code_2.exe - 應用程式錯誤

應用程式發生例外 unknown software exception (0xc00000fd) 於位置 0x7c92eddc。

請按 [確定] 終止程式

請按 [取消] 進行程式偵錯

Any idea what this message is all about? (Sorry for the Chinese here, but I'd think that if you know this message by its number, you should be familiar with the contents.)

Anyway, here is the translated message:

C:\Documents and Settings\Administrator\Start Menu\Programs\Startup\code_2.exe: code_2.exe - Application Error

The exception unknown software exception (0xc00000fd) occurred in the application at location 0x7c92eddc.

Click on OK to terminate the program
Click on CANCEL to debug the program

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

美人骨 2024-12-16 22:41:15

我相信 0xc00000fd 是一个堆栈溢出异常(http://support.microsoft.com/kb/315937)。在没有看到你的脚本的情况下,很难确定出了什么问题,但这种事情一般是由于递归太深造成的。我会检查您的脚本中是否有任何递归函数,并确保它们在达到太大深度之前退出。

您实际上可能在堆栈上分配了太多的内存。我不熟悉 AHK,但编译器也可能在堆栈上分配大量数据(可能是局部变量)。如果您定义了大量(或大量)局部变量,则可能会发生这种情况。

堆栈/内存也可能以某种方式被损坏,尽管在使用脚本语言时这种情况似乎不太可能发生。当从脚本语言访问本机 API 时,这种情况可能更常见,具体取决于操作方式。

我在这里建议的最后一种可能性是,您正在调用某些 API 并导致它也分配大量堆栈空间(可能是通过传入错误的参数)。同样,在不了解更多细节的情况下(特别是当它遇到异常时它正在做什么),很难确定。

我还能想到其他一些原因,但可能性更小。

I believe that 0xc00000fd is a stack overflow exception (http://support.microsoft.com/kb/315937). Without seeing your script, it is hard to say for sure what is going wrong, but this sort of thing is generally caused by recursing too deeply. I would check your script for any recursive functions and make sure that they are exiting before reaching too great a depth.

It's possible you're actually allocating too much on the stack. I'm not familiar with AHK, but it's possible the compiler is allocating a large amount of data (probably local variables) on the stack, too. If you define a large number of (or a number of large) local variables, this could happen.

It's also possible that the stack/memory is somehow getting corrupted, although this seems less likely to be the case when using a scripting language. It might be more likely when accessing native API from a scripting language, depending on how that is done.

The last possiblity I'm going to suggest here is that you're calling some API and causing it to allocate a lot of stack space as well, possibly by passing in bad parameters. Again, without knowing more specifics (especially what it's doing when it hits that exception), it's hard to say for sure.

I can think of some other reasons, but they're even less likely.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文