如何关闭容错堆?
最近,当启动我的应用程序时,我开始在 Visual Studio 2005 输出窗口中看到这一行:
FTH:(7156):***应用于当前进程的容错堆填充程序。这通常是由于之前的崩溃造成的。 ***
我已尝试使用此处的说明关闭容错堆:
http://msdn.microsoft.com/en-us/ Library/dd744764(VS.85).aspx
我运行的是 Windows 7 64 位版本,因此我对 32 位和 64 位注册表进行了更改,并运行“Rundll32.exe fthsvc.dll,FthSysprepSpecialize”命令使用 Rundll32.exe 的 32 位和 64 位版本。
但是,重新启动后,在尝试调试我的应用程序时,我仍然获得容错堆!
这是一个真正的问题,因为它掩盖了我试图重现的错误,并且还会降低性能。
有人对如何禁用容错堆有任何其他建议吗?
I've recently started seeing this line in my Visual Studio 2005 output window when launching my application:
FTH: (7156): *** Fault tolerant heap shim applied to current process. This is usually due to previous crashes. ***
I've tried turning off the fault tolerant heap using the instructions here:
http://msdn.microsoft.com/en-us/library/dd744764(VS.85).aspx
I'm running Windows 7 64-bit edition, so I have made the changes to both the 32-bit and 64-bit registries, and run the "Rundll32.exe fthsvc.dll,FthSysprepSpecialize" command using both the 32-bit and 64-bit versions of Rundll32.exe.
However, after rebooting I am still getting the fault tolerant heap when trying to debug my application!
This is a real problem since it masks the bug I am trying to reproduce, and it also kills performance.
Does anyone have any other suggestions how to disable the fault tolerant heap?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(10)
您可以按照以下步骤清除 FTH 跟踪的应用程序列表,而无需停止该服务:
窗口 ->容错堆。
您将通过右键单击找到名为“操作”的文件并选择“清除日志”,
然后你可以再次运行你的程序,警告消息就会消失,
它与我一起工作,无需重新启动操作系统。
you can clear the list of applications tracked by FTH without stopping this service by following these steps:
Windows -> Fault-Tolerant-Heap.
you will find file named operational by right click and choose clear log,
then you can run you program again and warning message will disappear,
it worked with me without restarting operating system.
“Rundll32.exe fthsvc.dll,FthSysprepSpecialize”看起来只清除当前标记的应用程序列表。如果您的应用程序仍然引起异常,FTH 仍应介入并接管。
如前所述:
将此注册表值设置为 0:
HKEY_LOCAL_MACHINE\Software\Microsoft\FTH\Enabled
这应该禁用整个系统的 FTH。
"Rundll32.exe fthsvc.dll,FthSysprepSpecialize" looks to only clear the list of currently flagged applications. if your application still causes oddities, the FTH should still step in and take over.
as already mentioned:
Set this registry value to 0:
HKEY_LOCAL_MACHINE\Software\Microsoft\FTH\Enabled
this should disable FTH for the whole system.
我还必须重命名该文件,因为与此项关联的注册表项没有适用的数据。我希望如果您的应用程序行为不当,它们就会填充。但就我而言,我是在 Visual Studio 中调试我自己的应用程序。因此,在这种情况下,无论 FTH 服务是否正在运行,都是我的进程以某种方式加载 FTH。事实上,我没有列出任何以前被标记为行为不当的应用程序。
但我必须遵循以下说明:
http://billroper.livejournal.com/960825.html
因为在我获得所有权并确保我拥有完全控制权之前,它不会让我重命名该文件。
I had to rename the file as well because the registry entries associated with this key were empty of applicable data. I expect that they populate if you have a misbehaving application. But in my case I was debugging my own application within Visual Studio. So in that case, it was my process that was somehow loading the FTH whether the FTH Service was running or not. And in fact I had no applications listed that were previously tagged as misbehaving.
But I had to follow these instructions:
http://billroper.livejournal.com/960825.html
because it wouldn't let me rename the file until I took ownership and made sure I had full control.
使用 (Microsoft::VisualStudio::CppUnitTestFramework) 运行单元测试时,我遇到了类似的问题。
不知何故,我违反了一些堆分配,下次尝试调试时,我收到了消息:“容错堆填充程序应用于当前进程。这通常是由于以前的崩溃。”并且调试环境冻结了。
为了让它再次工作,我必须删除测试用例,重新编译并再次添加它并重新编译,然后我可以设置断点并单步进入测试。
I had similar issue when running a Unit test using (Microsoft::VisualStudio::CppUnitTestFramework).
Somehow I had violated some heap allocation, and next time I tried to debug I received the message : "Fault tolerant heap shim applied to current process. This is usually due to previous crashes. " and the debug environment froze.
To get it to work again, I had to remove test case, recompile and add it again and recompile, then I could set breakpoint and step into the test.
也遇到了这个。重命名/删除 Windows\AppPatch 中的 AcXtrnal.dll 似乎对我有用。我喜欢这个 Microsoft 建议的操作(我首先执行的操作)没有任何作用。
Also ran into this. Renaming/deleting AcXtrnal.dll inside Windows\AppPatch seems to work for me. I like how this Microsoft recommended action (which I did first) does nothing.
为单个应用程序禁用它
从此处(实际上此处)
To disable it for a single application
From here (actually here)
将此注册表值设置为
0
:HKEY_LOCAL_MACHINE\Software\Microsoft\FTH\Enabled
Set this registry value to
0
:HKEY_LOCAL_MACHINE\Software\Microsoft\FTH\Enabled
您可以将可执行文件的名称添加到排除列表中。
对我有用。
You can add the name of your executable to the ExclusionList.
Works for me.
在 Windows 10 上,注册表位置为:
您可以从以下位置的列表中删除可执行文件:
或者您可以从提升的命令提示符运行此命令
您可能需要重新启动计算机
On Windows 10 the registry location is:
You can remove you executable from the list in:
or you can run this command from an elevated command prompt
You may need to reboot your machine
您可以将应用程序清单编辑为从 PCA 中排除您的程序
另请参阅:如何重置程序兼容性助手以进行测试
You can edit the application manifest to excluding your program from PCA
see also:How to reset Program Compatibility Assistant for testing