IronOCR 中 SEHException 和 AVX 支援的故障排除

Curtis Chau
Curtis Chau
Updated: 2026年6月29日

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

此問題通常出現在使用不支援AVX的較舊Xeon、Celeron、Pentium或Atom處理器的機器上。

對於不支援AVX的處理器的支援已在IronOCR版本2022.8.7804中新增,請升級到較新的版本。

// 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,建議確保您使用的IronOCR版本包含對不支援AVX處理器的支援。

Curtis Chau擁有Carleton大學的電腦科學學士學位,專精於前端開發,擁有Node.js、TypeScript、JavaScript和React的專業知識。Curtis熱衷於建立直觀且美觀的使用者介面,喜愛使用現代框架並建立結構良好、視覺吸引力的手冊。

閱讀更多

準備開始了嗎?

Nuget Downloads 6,357,159版本:2026.11剛剛發布