Categories
Blog

How to Fix the ‘Unhandled Exception has Occurred in your Application’ Error on Windows?

How to Fix the ‘Unhandled Exception has Occurred in your Application’ Error on Windows?

The error “An unhandled Win32 exception occurred in *application name*” typically occurs when a user tries to start an application created in Visual Studio. Most of the reported cases of this error are related to Uplay, Internet Explorer, and several legacy games originally designed for earlier versions of Windows.

unhandled exception has occurred in your application 1 1

What Causes the “Unhandled Exception has Occurred in your Application” Error on Windows?

There are many simple reasons for this problem, and the problem can be addressed effectively if you can easily identify the correct cause in your scenario by identifying it. Take a look at the list below:

  • Your antivirus may be the culprit – Some antivirus tools such as Panda Antivirus are known to have caused this issue so make sure you replace them.
  • Certain programs or malware may be running – If an installed program or malware is running on your computer, you might want to get rid of it. Make sure you boot into clean boot to see if that is the correct cause.
  • Microsoft .NET Framework installation is corrupt – If the core files are damaged, you can try either repairing the installation, installing a newer version, or performing an SFC scan.
  • Script debugging is enabled via Registry – As it turns out, a specific registry key can contribute to the occurrence of this problem. To take care of this, you need to disable script debugging via registry keys.
  • Access violation in Msvcr92.dll – Exceeding the source buffer or incorrect last byte are also possible causes of this problem. To fix them, you’ll need to install any pending Windows updates.
  • Deleting the Ubisoft launcher registry key – If you see this error when you try to start Uplay.exe, it is due to a bug with the Ubisoft Game Launcher. This problem can also be resolved through the registry by clearing the value of this launcher.
  • System file corruption – System file incompatibility can also cause this problem. Minor damage can be repaired with a simple DISM and SFC scan. In more severe cases, a reinstall or repair installation should help you fix the problem.
  • How do you fix the “Unhandled exception occurred in your application” error on Windows?

Solution 1: Install every pending Windows Update

One of the most common causes of the error “An unhandled Win32 exception has occurred” is an application that was built with the MSVCR90.DLL for the x64 platform and that eventually calls the strncpy function.

In this situation, the application will stop responding to the strncpy function because of an access violation raised in the Msvcr92.DLL file. Source buffer overflow or incorrect last byte are the most likely causes of this problem.

Fortunately, Microsoft is already aware of this problem and has released a hotfix for this problem that fixes it automatically. To take advantage of this, all you need to do is update your operating system version to the latest version available.

Note: This hotfix was moved within a revision of Visual Studio 2008 that Windows updates automatically, so the following steps are universal and should work regardless of your operating system version.

The following is a quick guide to installing the Visual Studio 2008 hotfix and updating your Windows build to the latest version to fix the problem:

  1. Press Windows key + R to open up a Run dialog box. Next, type ‘ms-settings:windowsupdate’ and press Enter to open up the Windows update tab of the Settings app.

  1. Note: In case you encounter this issue on Windows 7 or Windows 8.1. use the ‘wuapp’ command instead.
  2. After you manage to arrive inside the Windows Update screen, start by clicking on Check for updates. Then, start following the on-screen prompts to complete the installation of every Windows Update that is currently waiting to be installed.Check for updates.pngInstalling every pending Windows update
  3. Note: Remember, it is important that you install every update, not just critical updates. Since the revision of Visual Studio includes the hotfix, you may find the update in question under Optional, so make sure you install them all.
  4. If you are prompted to restart before installing any available updates, do so. However, be sure to come back to this screen after the next boot process is complete to complete the installation of the remaining updates.
  5. After each pending update is installed, restart your computer one last time, and then repeat the action that previously caused the error message to see if that resolves the problem.

If you are still facing the error “An unhandled Win32 exception has occurred“, move on to the next method below.

How to Fix the Unhandled Exception has Occurred in your Application Error on Windows 8

How to Fix the Unhandled Exception has Occurred in your Application Error on Windows 10

How to Fix the Unhandled Exception has Occurred in your Application Error on Windows 7

Solution 2: Replace Your Antivirus – How to Fix the ‘Unhandled Exception has Occurred in your Application’ Error on Windows?

Free antivirus tools can be very helpful and do their job of protecting your computer, but sometimes they don’t fix what’s on your computer, among other things. Consider replacing your antivirus if it’s causing problems when it’s on!

  1. Open Control Panel by clicking on Start Menu and searching for it. Alternatively, if you are using Windows 10, you can click on the gear icon to open Settings.
  2. Select “View As – Category” in the upper right corner in the Control Panel and “Installing a program” in the “Programs” section.

uninstall program 1.jpg

 

Uninstall a program in Control Panel

  1. If you are using the Settings app, clicking on Apps will immediately open a list of all installed programs on your PC.
  2. Find your antivirus tool in Control Panel or Settings and click Uninstall.
  3. The uninstall wizard should open, so follow the instructions to uninstall.

uninstall panda antivirus.jpgUninstalling your antivirus

  1. Click Finish when the uninstaller is finished and restart your computer to see if you still see any errors. Make sure to choose a better antivirus option.

Solution 3: Deleting the Launcher Registry value (if applicable)

If you get an “Unhandled Win32 Exception” error when trying to run Uplay.exe or any other Ubisoft application, it’s most likely caused by a bug with your Ubisoft game launcher.

As it turns out, this seems to be a widespread problem on Windows 10, especially among users who have both Steam and Uplay installed at the same time.

Several affected users that we were having difficulty resolving this issue have managed to resolve it by using Registry Editor to find the string registry value associated with the launcher and remove it. This supposedly removes conflicts so that both applications can function properly on the same computer.

Here is a quick guide on how to delete the registry value associated with Uplay Launcher:

  1. Press Windows Key + R to open the Run dialog box. Type “regedit” in the text box and press Enter to open Registry Editor. When prompted by the User Account Control (UAC) prompt, enter Yes to grant administrator rights.Open Regiedit.jpg 
  2. Once you are in Registry Editor, navigate to the following location in the left pane of the window: Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Ubisoft
  3. Note: You can either navigate there manually or you can paste the location directly into the navigation bar at the top and press Enter to get there instantly.
  4. After you manage to land in the correct location, move down to the right-hand section of the screen, right-click on Launcher and choose to Delete to get rid of it.delete
  5. Note: In case you can delete the key, here’s how to take ownership of registry keys.
  6. Note: After you delete it, the launcher will be forced to create a new Launcher string value with fresh data, which should resolve the issue.
  7.  Once the key has been deleted, close Registry Editor and restart your computer.
  8. At the next computer startup, repeat the action that was previously causing the “An unhandled win32 exception occurred‘ error and see if the problem is resolved.

In case the same issue is persisting, move down to the next potential fix below.

Solution 4: Reset Internet Explorer (if applicable)

Another potential instance with the potential of creating this issue is a series of corrupted Internet Explorer (IE). If you’re encountering the “An unhandled win32 exception occurred in iexplore.exe’ error chances are it appears after a failing script.

To fix this issue, you should reset your Internet Explorer settings via the Internet Options menu. This operation was confirmed to be successful by a lot of users that were dealing with this error.

Here’s a quick guide on resetting Internet Explorer in order to resolve the “An unhandled win32 exception occurred‘ error:

  1. Ensure that Internet Explorer, Edge or any other associated instance is turned off and no background process is running.
  2. Press Windows key + R to open up a Run dialog box. Inside the text box, type ‘inetcpl.cpl’ and press Enter to open up the Internet Options menu.Run dialog: inetcpl.cpl
  3. Run dialog: inetcpl.cpl
  4. Note: If you are prompted by the UAC (User Account Control), click Yes to grant administrative privileges.
  5. After you manage to get inside the Internet Properties screen, select the Advanced tab from the horizontal menu at the top. Next, go to the Reset Internet Explorer settings and click on the Reset button.resetting the INternet Explorer settings.png
  6. Resetting the Internet Explorer settings
  7. Once you see the confirmation screen, ensure that the box associated with Delete personal settings is checked, then click on the Reset button.reset personal settings.png
  8. Resetting the personal settings of Internet Explorer
  9. Wait until the operation is complete, then restart your machine and see if the issue is resolved at the next computer startup.

In case the same “An unhandled win32 exception occurred in iexplore.exe’ error is still occurring, move down to the next method below.

PRO TIP: If the issue is with your computer or a laptop/notebook you should try using Restoro Repair which can scan the repositories and replace corrupt and missing files. This works in most cases, where the issue is originated due to a system corruption. 

Solution 5: Disable Script Debugging and associated Registry Keys (if applicable)

If you’re encountering the issue with Internet Explorer on a machine that has VS installed on it, the issue can also occur due when Script Debugging is enabled and the registry entries end up containing corrupted data.

Several affected users that encountered this issue have confirmed that the issue was resolved after they accessed the Internet Options menu to disable Script Debugging and then deleted the associated keys using Registry Editor.

Here’s a quick guide on doing this in order to fix the “An unhandled win32 exception occurred in iexplorer.exe’ error:

  1. Press Windows key + R to open up a Run dialog box. Next, inside the text box, type ‘inetcpl.cpl’ and press Enter to open up the Internet Options menu. If you are prompted by the User Account Control (UAC), click Yes to grant administrative privileges.inetcpl.jpg
  2. Opening the Internet Properties screen
  3. Once you manage to find yourself inside the Internet Properties screen, use the menu at the top to select the Advanced tab.
  4. Inside the Internet Properties screen, scroll down through the Settings menu and check the box associated with Disable script debugging (Internet Explorer).disable script debugging.png
  5. Disable
  6. Once the modification is enforced, hit Apply to save the changes, then close the Internet Properties window.
  7. Press Windows key + R once again to open up another dialog box. This time, type ‘regedit’ and press Enter to open up Registry Editor. You will need to grant admin access, so click Yes when prompted by the User Account Control window.regedit.png
  8. Opening the Registry Editor
  9. Inside the Registry Editor, navigate to the following location using the left-hand menu:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug (32 – Bit Machine) HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\AeDebug (64 – Bit Machine)
  10. Note: The location of the file we need to delete is different depending on the Windows version that you’re using. If you have a 32 – bit Windows version use the first location, else, use the second.
  11. Once you arrive to the correct location, move down to the right-section, right-click on Debugger and choose Delete from the context menu.deleting the debugger value
  12. Deleting the Debugger registry value
  13. Once this key is deleted, navigate to this second location:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\ (32 – Bit Machine) HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework (64 – Bit Machine)
  14. Note: Access the registry key associated with your Windows bit version that you’re using.
  15. When you arrive at the correct location, move over to the right-hand section and delete the DbgManagedDebugger value by right-clicking on it and choosing Delete from the context menu.deleting the DbgManagedDebugger
  16. Deleting the DbManagedDebugger
  17. After you manage to delete the value, close the Registry Editor and restart your computer.
  18. Once the next startup is complete, see if the same issue is still occurring.

In case the “An unhandled win32 exception occurred’ error is still occurring, move down to the next method below.

Solution 6: Install the Latest Version of NET Framework and Repair it

Net Framework on your computer is important, and many modern games and programs depend on whether you have it installed. Before repairing, please follow the steps below to get the latest version on your computer.

Navigate to this link and click on the red download button to download the latest version of Microsoft .NET Framework. When the download is complete, find and run the downloaded file. Note that you need constant access to the Internet. Follow the on-screen instructions to proceed with the installation.

  1. After installing the latest version, it’s time to check its integrity. On your keyboard, use the Windows Key + R key combination to open the Run dialog box.
  2. Type in control.exe and click OK in order to open it.

control panel run.jpg

 

Running Control Panel

  1. Click the Uninstall a Program option and click Turn Windows features on or off. Make sure you locate the .NET Framework 4.x.x entry and make sure it’s enabled. ‘x.x’ marks the latest version available for your operating system.
  2. If the checkbox next to .NET Framework 4.x.x is not enabled, enable it by clicking the box. Click OK to close the Windows Feature window and reboot the computer.

enable net framework.jpg

 

Enabling the latest version of .NET Framework

  1. If .Net Framework 4.x.x is already enabled, you can repair .Net Framework by clearing the box and rebooting the computer. After the computer has restarted, re-enable .Net Framework and restart the computer again.

Solution 7: Perform a Clean Boot – How to Fix the ‘Unhandled Exception has Occurred in your Application’ Error on Windows?

There are many other programs and services that can affect the proper functionality of the Microsoft .NET Framework Suite. In most cases, the cause is the installed antivirus and you can try disabling it to see if the error persists.However, to make sure nothing is interfering with the installation, we recommend performing a clean restart, which will disable starting all non-Microsoft programs and services. This way, you can easily guess which program is causing this error!

  1. Use the Windows + R key combination on your keyboard. In the Run dialog box type MSCONFIG and click OK.
  2. Click on the Boot tab and uncheck the Safe Boot option (if checked).

msconfig run.jpg

 

Running MSCONFIG

  1. Under the General tab in the same window, click to select the Selective startup option, and then click to clear the Load startup items check box to make sure it’s not checked.
  2. Under the Services tab, click to select the Hide all Microsoft services check box, and then click Disable all.

disable all services.jpg

 

Disabling all non-Microsoft services

  1. On the Startup tab, click Open Task Manager. In the Task Manager window under the Startup tab, right click on each startup item which is enabled and select Disable.

disable startup items.jpg

 

Disabling all startup items

  1. After this, you will need to perform some of the most boring processes and that is enabling the Startup items one by one and restarting your computer. After that, you need to check whether the problem appears again. You will need to repeat the same process even for the Services which you have disabled in Step 4.
  2. Once you locate the problematic startup item or service, you can undertake action in order to solve the problem. If it is a program, you can reinstall it or repair If it is a service, you can disable it, etc.

Solution 8: Use SFC to Scan for Memory Leaks

Microsoft .NET Framework corruption has been reported to be related to faulty system files. These problems are rooted in system files and the only way to solve them is to run System File Checker (SFC). It will scan your system files for errors and possibly repair or replace them. To do so, just follow the steps below! How to fix Unhandled exception occurring in your application error on Windows 10.

  1. Find “Command Prompt” by either typing it directly into the Start menu or by pressing the search key right next to it. Right-click on the first entry to be displayed as a search result and select the context menu entry “Run as administrator“.
  2. You can also use the Windows logo key + R keyboard shortcut to bring up the Run dialog box. Type “cmd” in the dialog box that appears and use the keyboard shortcut Ctrl+Shift+Enter for Admin Prompt.

 

Running Command Prompt as an administrator

  1. Type in the following commands in the window and make sure you press Enter after typing each one. Wait for the “Operation completed successfully” message or something similar to know that the method worked.

sfc /scannow

  1. Try to restart your computer and check to see if the Unhandled Exception has Occurred in your Application error continues to appear on your computer.

How to Fix the Unhandled Exception has Occurred in your Application Error on Windows 7.