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 拥有卡尔顿大学的计算机科学学士学位,专注于前端开发,精通 Node.js、TypeScript、JavaScript 和 React。他热衷于打造直观且美观的用户界面,喜欢使用现代框架并创建结构良好、视觉吸引力强的手册。
...
阅读更多