IronOCR 中 SEHException 和 AVX 支援故障排除

Curtis Chau
Curtis Chau
已更新: 2026年4月22日

未處理的例外:System.Runtime.InteropServices.SEHException

使用缺乏 AVX 支援的舊款 Xeon、Celeron、Pentium 或 Atom 處理器的機器經常會遇到這個問題。

IronOCR版本2022.8.7804中添加了對非AVX處理器的支持,因此請升級至更新的版本。

// Example: Checking AVX support programmatically in C#
using System;

class ProcessorFeatures
{
    // Main method to check AVX support
    static void Main()
    {
        // Check if the machine's processor supports AVX
        if (IsAvxSupported())
        {
            Console.WriteLine("AVX is supported.");
        }
        else
        {
            Console.WriteLine("AVX is not supported. Consider updating IronOcr to the latest version that supports non-AVX processors.");
        }
    }

    // Function to determine if AVX is supported
    static bool IsAvxSupported()
    {
        return System.Runtime.Intrinsics.X86.Avx.IsSupported;
    }
}

在此範例程式碼中,我們使用System.Runtime.Intrinsics.X86.Avx.IsSupported屬性來判斷處理器是否支持AVX指令。 如果不支援AVX,建議確保您使用的是包含對非-AVX 處理器支援的 IronOCR 版本。

Curtis Chau 擁有卡爾頓大學計算機科學學士學位,專注於前端開發,擅長於 Node.js、TypeScript、JavaScript 和 React。Curtis 熱衷於創建直觀且美觀的用戶界面,喜歡使用現代框架並打造結構良好、視覺吸引人的手冊。

閱讀更多

準備好開始了嗎?

NuGet 下載次數 6,411,693版本:2026.11剛剛發布