Windows – How to fix “Preview Handler Surrogate has stopped working” error

crashwindows 7

I have been getting this error at least once a day. Once it happens, I usually just close and ignore the notification. I restart my computer in the morning sometimes, and it happens again. I encounter weird window behavior once this happens, such as clicking on the window in the task bar and it not maximizing, or maximizing behind all other windows. Also, ALT+TAB doesn't work sometimes.

  • Windows 7 64 bit 6.1.7601 SP1
  • The application affected is prevhost.exe
  • The fault module is StackHash_32ff

1

2

Best Answer

As this page explains in detail:

StackHash is not a real module. It is a constructed name because the Instruction Pointer was pointing to a known module at the time of the crash. The number after the StackHash_ is a semi-unique number calculated at the time of the crash such that if the same crash occurred on multiple PCs then they have a reasonable chance to be correlated.

Some of the reasons for StackHash crashes include:

  • The application itself has a fault causing it to call a function in a piece of memory that does not contain any code as in the example above.
  • A virus checker, virtual drive S/W, security systems (or other application) has injected a piece of code into the address space of the application that crashes for some reason. In this case there is no identifiable module so a StackHash_XXXX will be created.
  • A virus has infected the machine and the virus code is executing in the context of the faulting application.
  • There is a bug in the operating system or other shared component on the system.
  • The application has become corrupted either by a disk error or virus.

What to do if you get a StackHash crash?

  1. First configure Problems Reports and Solutions in Control panel to Check for Solutions automatically and Automatically send more information. Then check if there are fixes available for your application. If there are then download and install them.
  2. Make sure your Window Operating system has all the latest service packs, security updates and other fixes installed.
  3. Most applications have a Check for Updates feature. Use it to make sure you have the latest version of the S/W. Alternatively visit the company website and check for new versions and patches.
  4. Run an up-to-date anti-virus and anti-malware checker on the machine and fix any issues. If a virus is detected in the application then you may need to reinstall the application.
  5. Re-install the application. Through Control Panel \ Programs \ Uninstall a program. Right click the application and click Uninstall / Change. This should launch the installer which may give the option to Repair the installation. If not then you will need to uninstall and reinstall - make sure you have the original installation discs available before uninstalling.
  6. Disable any Virtual Drive software that may be hooking in to the application. If the problem goes away, contact the developer of the Virtual Drive software.
  7. Disable any Virus checkers on your machine (temporarily) and run the application again. If the problem goes away, contact the developer of the Virus Checking software.
  8. Check if the problem is reproducible (after a reboot). If it is, then attempt to narrow down the exact steps that cause the fault, write them down and contact the support department for the company that developed the application providing as much information about the crash and what you have done so far to attempt to resolve the issue.

If nothing helps, here's a workaround you can try:

  1. Go to Control Panel / System and Security / System
  2. Select Advanced System Settings from the links on the left
  3. In the Advanced tab of the System Properties dialog, click the Settings button from the Performance section at the top of the screen
  4. Click the Data Execution Prevention tab
  5. Select the option Turn on DEP for all programs and services except those I select
  6. Browse to locate the executable file for the application you were trying to start when you received the StackHash or AppCrash error
  7. Select the application related to the StackHash or Appcrash error and click Open to add it to your DEP Exceptions list
  8. OK your way out

I also recommend testing your RAM thoroughly (preferably a single stick at a time) using either Memtest86 or Memtest86+.

Related Question