Solución de problemas de SEHException y compatibilidad con AVX en IronOCR
Excepción no controlada: System.Runtime.InteropServices.SEHException

Este problema se encuentra comúnmente en máquinas que usan procesadores Xeon, Celeron, Pentium o Atom más antiguos que carecen de soporte AVX.
El soporte para procesadores que no sean AVX se agregó en la versión 2022.8.7804 de IronOCR, por lo que actualice a una versión posterior.
// 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#
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 ClassEn este código de ejemplo, utilizamos la propiedad System.Runtime.Intrinsics.X86.Avx.IsSupported para determinar si el procesador admite instrucciones AVX. Si AVX no es compatible, es aconsejable asegurarse de que está utilizando una versión de IronOcr que incluya soporte para procesadores que no sean AVX.






