IronOCR 中 SEHException 和 AVX 支援的故障排除
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;
}
}' Example: Checking AVX support programmatically in C#
Imports System
Friend Class ProcessorFeatures
' Main method to check AVX support
Shared Sub Main()
' Check if the machine's processor supports AVX
If IsAvxSupported() Then
Console.WriteLine("AVX is supported.")
Else
Console.WriteLine("AVX is not supported. Consider updating IronOcr to the latest version that supports non-AVX processors.")
End If
End Sub
' Function to determine if AVX is supported
Private Shared Function IsAvxSupported() As Boolean
Return System.Runtime.Intrinsics.X86.Avx.IsSupported
End Function
End Class在此範例程式碼中,我們使用System.Runtime.Intrinsics.X86.Avx.IsSupported屬性來確定處理器是否支援AVX指令。 如果不支援AVX,建議確保您使用的IronOCR版本包含對不支援AVX處理器的支援。

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