Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I turn off the fault tolerant heap?

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?

like image 256
MJW Avatar asked Feb 16 '11 18:02

MJW


4 Answers

To disable it for a single application

Go to the HKEY_LOCAL_MACHINE and HKEY_CURRENT_USER versions of Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\your_application.exe and delete the Fault­Tolerant­Heap entry.

From here (actually here)

like image 177
Lars Truijens Avatar answered Nov 07 '22 04:11

Lars Truijens


Set this registry value to 0: HKEY_LOCAL_MACHINE\Software\Microsoft\FTH\Enabled

like image 8
Aaron Klotz Avatar answered Nov 07 '22 03:11

Aaron Klotz


You can add the name of your executable to the ExclusionList.

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\FTH\ExclusionList

Works for me.

like image 5
Joren Boulanger Avatar answered Nov 07 '22 05:11

Joren Boulanger


You can edit the application manifest to excluding your program from PCA

see also:How to reset Program Compatibility Assistant for testing

like image 2
Sheng Jiang 蒋晟 Avatar answered Nov 07 '22 04:11

Sheng Jiang 蒋晟