Cách khắc phục & lsquo; Ngoại lệ chưa được xử lý đã xảy ra trong Ứng dụng của bạn & rsquo; Lỗi trên Windows?

Lỗi “ Một ngoại lệ win32 không được xử lý đã xảy ra trong lỗi * application_name * 'thường xảy ra khi người dùng cố gắng khởi chạy một ứng dụng được tạo trong Visual Studio. Hầu hết các trường hợp được báo cáo về lỗi này đều liên quan đến Uplay, Internet Explorer và một số trò chơi Legacy ban đầu được tạo cho các phiên bản Windows cũ hơn.

Lưu ý : Đây là cách khắc phục Thư viện thời gian chạy liên quan đến Visual C ++.

Nguyên nhân nào gây ra Lỗi “Ngoại lệ chưa được xử lý đã xảy ra trong ứng dụng của bạn” trên Windows?

Có một số nguyên nhân đơn giản của vấn đề này và vấn đề có thể được giải quyết một cách hiệu quả nếu bạn có thể nhận ra tình huống của mình chỉ dựa trên việc xác định đúng nguyên nhân. Kiểm tra danh sách dưới đây:

  • Phần mềm chống vi-rút của bạn có thể là thủ phạm - Một số công cụ chống vi-rút như Panda Antivirus được biết là nguyên nhân gây ra vấn đề này, vì vậy hãy đảm bảo bạn thay thế chúng.
  • Một số chương trình hoặc phần mềm độc hại có thể đang chạy - Nếu một chương trình đã cài đặt hoặc phần mềm độc hại đang chạy trên máy tính của bạn, bạn có thể muốn loại bỏ nó. Đảm bảo rằng bạn khởi động vào khởi động sạch để xem đó có phải là nguyên nhân chính xác hay không.
  • Cài đặt Microsoft .NET Framework bị hỏng - Nếu tệp lõi của nó bị hỏng, bạn có thể thử sửa chữa cài đặt của nó, cài đặt phiên bản mới hơn hoặc thực hiện quét SFC.
  • Gỡ lỗi tập lệnh được kích hoạt thông qua Sổ đăng ký - Hóa ra, một khóa đăng ký cụ thể có thể góp phần vào sự xuất hiện của vấn đề này. Để xử lý vấn đề này, bạn sẽ cần phải tắt Script Debugging qua các khóa đăng ký.
  • Vi phạm quyền truy cập trong Msvcr92.dll - Bộ đệm nguồn vượt quá hoặc byte cuối cùng không phù hợp cũng là những nguyên nhân tiềm ẩn của vấn đề này. Để giải quyết chúng, bạn sẽ cần cài đặt mọi bản cập nhật Windows đang chờ xử lý.
  • Xóa khóa đăng ký của trình khởi chạy Ubisoft - Nếu bạn gặp lỗi này khi cố khởi chạy Uplay.exe, thì đó là do lỗi với Trình khởi chạy trò chơi Ubisoft. Vấn đề này cũng có thể được giải quyết thông qua sổ đăng ký bằng cách xóa giá trị thuộc về trình khởi chạy này.
  • Tệp hệ thống bị hỏng - Sự không nhất quán của tệp hệ thống cũng có thể tạo ra vấn đề này. Lỗi nhẹ có thể được giải quyết bằng cách quét DISM và SFC đơn giản. Trong những trường hợp nghiêm trọng hơn, cài đặt mới hoặc cài đặt sửa chữa sẽ giúp bạn giải quyết vấn đề.

Giải pháp 1: Cài đặt mọi Windows Update đang chờ xử lý

Một trong những nguyên nhân phổ biến nhất sẽ dẫn đến lỗi " Đã xảy ra ngoại lệ win32 không được xử lý " là ứng dụng được xây dựng cho nền tảng x64 bằng cách sử dụng MSVCR90.DLL kết thúc gọi hàm strncpy.

Trong trường hợp này, vi phạm quyền truy cập được kích hoạt trong tệp Msvcr92.DLL rất có thể sẽ khiến ứng dụng ngừng phản hồi trong hàm strncpy. Bộ đệm nguồn vượt quá hoặc byte cuối cùng không đúng là những nguyên nhân có thể gây ra sự cố này.

May mắn thay, Microsoft đã biết về vấn đề này và đã phát hành một hotfix cho vấn đề này sẽ tự động giải quyết nó. Để tận dụng lợi thế của nó, tất cả những gì bạn cần làm là cập nhật phiên bản hệ điều hành của mình lên phiên bản mới nhất hiện có.

Lưu ý: Hotfix này được đẩy trong bản sửa đổi của Visual Studio 2008, mà Windows sẽ tự động cập nhật, vì vậy các bước dưới đây là phổ biến và sẽ hoạt động bất kể phiên bản hệ điều hành của bạn.

Dưới đây là hướng dẫn nhanh về cách cập nhật bản dựng Windows của bạn lên phiên bản mới nhất để cài đặt hotfix cho Visual Studio 2008 và giải quyết sự cố:

  1. Nhấn phím Windows + R để mở hộp thoại Chạy . Tiếp theo, nhập 'ms-settings: windowsupdate' và nhấn Enter để mở tab cập nhật Windows của ứng dụng Cài đặt .

    Lưu ý: Trong trường hợp bạn gặp sự cố này trên Windows 7 hoặc Windows 8.1. sử dụng lệnh 'wuapp' để thay thế.

  2. Sau khi bạn truy cập vào bên trong màn hình Windows Update, hãy bắt đầu bằng cách nhấp vào Kiểm tra bản cập nhật . Sau đó, hãy bắt đầu làm theo lời nhắc trên màn hình để hoàn tất cài đặt mọi Windows Update hiện đang chờ cài đặt.

    Lưu ý: Hãy nhớ rằng điều quan trọng là bạn phải cài đặt mọi bản cập nhật, không chỉ những bản cập nhật quan trọng. Vì hotfix được bao gồm trong bản sửa đổi của Visual Studio, bạn có thể tìm thấy bản cập nhật được đề cập trong Tùy chọn, vì vậy hãy đảm bảo cài đặt tất cả chúng.

  3. Trong trường hợp bạn được nhắc khởi động lại trước khi có cơ hội cài đặt mọi bản cập nhật có sẵn, hãy làm như vậy. Nhưng hãy đảm bảo quay lại cùng màn hình này sau khi khởi động tiếp theo hoàn tất để hoàn tất cài đặt các bản cập nhật còn lại.
  4. Khi mọi bản cập nhật đang chờ xử lý được cài đặt, hãy khởi động lại máy tính của bạn lần cuối và sau đó lặp lại hành động trước đó đã gây ra thông báo lỗi để xem sự cố đã được khắc phục chưa.

Trong trường hợp bạn vẫn gặp phải lỗi " Đã xảy ra ngoại lệ win32 không được xử lý ", hãy chuyển xuống phương pháp tiếp theo bên dưới.

Giải pháp 2: Thay thế phần mềm chống vi-rút của bạn

Các công cụ chống vi-rút miễn phí có thể khá hữu ích và chúng có thể thực hiện công việc bảo vệ máy tính của bạn nhưng đôi khi chúng không hòa hợp với những thứ khác trên máy tính của bạn. Hãy xem xét thay thế phần mềm chống vi-rút của bạn nếu nó gây ra sự cố này khi đang bật!

  1. Nhấp vào menu Bắt đầu và mở Bảng điều khiển bằng cách tìm kiếm nó. Ngoài ra, bạn có thể nhấp vào biểu tượng bánh răng để mở cài đặt nếu bạn đang sử dụng Windows 10.
  2. Trong Control Panel, chọn View as - Category ở góc trên cùng bên phải và nhấp vào Gỡ cài đặt Chương trình trong phần Chương trình.
  1. Nếu bạn đang sử dụng ứng dụng Cài đặt, nhấp vào Ứng dụng sẽ ngay lập tức mở ra danh sách tất cả các chương trình đã cài đặt trên PC của bạn.
  2. Tìm công cụ chống vi-rút của bạn trong Bảng điều khiển hoặc Cài đặt và nhấp vào Gỡ cài đặt .
  3. Trình hướng dẫn gỡ cài đặt của nó sẽ mở ra, vì vậy hãy làm theo hướng dẫn để gỡ cài đặt nó.
  1. Nhấp vào Kết thúc khi trình gỡ cài đặt hoàn tất quá trình và khởi động lại máy tính của bạn để xem liệu lỗi có còn xuất hiện hay không. Đảm bảo rằng bạn chọn một tùy chọn chống vi-rút tốt hơn .

Giải pháp 3: Xóa giá trị Đăng ký Trình khởi chạy (nếu có)

Nếu bạn gặp phải lỗi " Đã xảy ra ngoại lệ win32 không được xử lý " khi cố khởi chạy Uplay.exe hoặc một ứng dụng khác thuộc Ubisoft, rất có thể đó là do lỗi với Trình khởi chạy trò chơi Ubisoft của họ.

Hóa ra, đây dường như là một vấn đề phổ biến trên Windows 10, đặc biệt là giữa những người dùng đã cài đặt cả Steam và Uplay cùng một lúc.

Một số người dùng bị ảnh hưởng mà chúng tôi đang cố gắng giải quyết vấn đề này đã tìm cách khắc phục sự cố bằng cách sử dụng Trình chỉnh sửa sổ đăng ký để tìm giá trị đăng ký chuỗi thuộc về trình khởi chạy và xóa nó. Điều này được cho là loại bỏ xung đột, cho phép cả hai ứng dụng hoạt động bình thường trong cùng một máy.

Dưới đây là hướng dẫn nhanh về cách xóa giá trị Đăng ký được liên kết với trình khởi chạy Uplay:

  1. Nhấn phím Windows + R để mở hộp thoại Chạy . Bên trong hộp văn bản, nhập 'regedit' và nhấn Enter để mở Trình chỉnh sửa sổ đăng ký . Khi bạn được nhắc bởi lời nhắc UAC (Kiểm soát tài khoản người dùng) , hãy nhập để cấp đặc quyền quản trị.
  2. Khi bạn đang ở trong Registry Editor , hãy sử dụng phần bên trái của cửa sổ để điều hướng đến vị trí sau:
    Máy tính \ HKEY_LOCAL_MACHINE \ SOFTWARE \ WOW6432Node \ Ubisoft

    Lưu ý: Bạn có thể điều hướng đến đó theo cách thủ công hoặc bạn có thể dán vị trí trực tiếp vào thanh điều hướng ở trên cùng và nhấn Enter để đến đó ngay lập tức.

  3. Sau khi bạn hạ cánh đúng vị trí, hãy di chuyển xuống phần bên phải của màn hình, nhấp chuột phải vào Trình khởi chạy và chọn Xóa để thoát khỏi nó.

    Lưu ý: Trong trường hợp bạn có thể xóa khóa, đây là cách giành quyền sở hữu khóa đăng ký.

    Lưu ý: Sau khi bạn xóa nó, trình khởi chạy sẽ buộc phải tạo giá trị chuỗi Trình khởi chạy mới với dữ liệu mới, điều này sẽ giải quyết vấn đề.

  4. Sau khi khóa đã bị xóa, hãy đóng Registry Editor và khởi động lại máy tính của bạn.
  5. Ở lần khởi động máy tính tiếp theo, hãy lặp lại hành động trước đó gây ra lỗi " Đã xảy ra ngoại lệ win32 không được xử lý " và xem sự cố có được giải quyết hay không.

Trong trường hợp sự cố tương tự vẫn tiếp diễn, hãy chuyển xuống phần sửa chữa tiềm năng tiếp theo bên dưới.

Giải pháp 4: Đặt lại Internet Explorer (nếu có)

Một trường hợp tiềm ẩn khác có khả năng gây ra sự cố này là một loạt các trình duyệt Internet Explorer (IE) bị hỏng. Nếu bạn gặp phải lỗi “Một ngoại lệ win32 không được xử lý đã xảy ra trong iexplore.exe” thì rất có thể nó xuất hiện sau một tập lệnh bị lỗi.

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

    Note: If you are prompted by the UAC (User Account Control), click Yes to grant administrative privileges.

  3. 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 Explorersettings and click on the Reset button.
  4. Once you see the confirmation screen, ensure that the box associated with Delete personal settings is checked, then click on the Reset button.
  5. 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.

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.
  2. Once you manage to find yourself inside the Internet Properties screen, use the menu at the top to select the Advanced tab.
  3. Inside the Internet Properties screen, scroll down through the Settings menu and check the box associated with Disable script debugging (Internet Explorer).
  4. Once the modification is enforced, hit Apply to save the changes, then close the Internet Properties window.
  5. 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.
  6. 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)

    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.

  7. Once you arrive to the correct location, move down to the right-section, right-click on Debugger and choose Delete from the context menu.
  8. 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)

    Note: Access the registry key associated with your Windows bit version that you’re using.

  9. 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.
  10. After you manage to delete the value, close the Registry Editor and restart your computer.
  11. 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

Having NET Framework installed on your computer is vital and plenty of modern games and programs depend on you having it installed. Before repairing it, follow the steps below in order to install the latest version on your computer.

Navigate to this link and click the red download button in order to download the latest version of the Microsoft .NET Framework. After the download has finished, locate the file you downloaded and run it. Note that you will need to have constant access to the Internet. Follow the instructions on-screen 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.
  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.
  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

There are various other programs and services which can affect the proper functionality of the Microsoft .NET Framework suite. In most cases, the cause is the antivirus you have installed and you can try disabling it to see if the error persists. However, to make sure nothing can interfere with the installation, we recommend you perform a clean boot which will disable all non-Microsoft programs and services from starting up. This way, you can easily deduct just which program causes this error to happen!

  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).
  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.
  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.
  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

It has been reported that the Microsoft .NET Framework corruption is related to faulty system files. These problems are rooted deep inside the system files and the only way to try to resolve them is by running the System File Checker (SFC). It will scan your system files for errors and possible repair or replace them. Follow the steps below in order to do so!

  1. Search for “Command Prompt” by typing it either right in the Start menu or by pressing the search button right next to it. Right-click the first entry which will pop up as a search result and select the “Run as administrator” context menu entry.
  2. Additionally, you can also use the Windows Logo Key + R key combination in order to bring up the Run dialog box. Type in “cmd” in the dialog box which appears and use the Ctrl + Shift + Enter key combination for admin Command Prompt.
  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.

Solution 9: Performing a Clean Install

If none of the methods presented below have managed to help you in resolving the issue, it’s very likely that you’re dealing with some kind of Windows inconsistency that cannot be resolved conventionally.

If this scenario is applicable, you should be able to fix the issue by resetting every component associated with your Windows installation. If you want to go this route, you have two ways forward. It all boils down to the procedure that you want to follow:

  • Repair install (in-place repair) – This procedure is the best approach when you need to refresh every OS component, but some users might end up considering it a little too tedious for their taste. Keep in mind that you will need a compatible installation media in order to enforce this fix, but the major advantage is that all your personal data (including games, applications and personal media) will be preserved even if you don’t back up your computer.
  • Clean install – If you’re looking for the simplest solution, this is the way to go. You will not need an installation media to enforce it (it’s all done through the Windows GUI). But unless you back up your data in advance, be prepared for total data loss.