Troubleshooting SEHException and AVX Support in IronOCR

This article was translated from English: Does it need improvement?
Translated
View the article in English

Exception non gérée : System.Runtime.InteropServices.SEHException

File G7IUWBgksH related to Troubleshooting SEHException and AVX Support in IronOCR

Ce problème est généralement rencontré sur les machines utilisant d'anciens processeurs Xeon, Celeron, Pentium ou Atom qui ne prennent pas en charge AVX.

La prise en charge des processeurs non-AVX a été ajoutée dans la version d'IronOcr 2022.8.7804, veuillez donc procéder à une mise à niveau vers une version ultérieure.

// 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 Class
$vbLabelText   $csharpLabel

Dans cet exemple de code, nous utilisons la propriété System.Runtime.Intrinsics.X86.Avx.IsSupported pour déterminer si le processeur prend en charge les instructions AVX. Si AVX n'est pas pris en charge, il est conseillé de s'assurer que vous utilisez une version d'IronOcr qui inclut la prise en charge des processeurs non-AVX.

Curtis Chau
Rédacteur technique

Curtis Chau détient un baccalauréat en informatique (Université de Carleton) et se spécialise dans le développement front-end avec expertise en Node.js, TypeScript, JavaScript et React. Passionné par la création d'interfaces utilisateur intuitives et esthétiquement plaisantes, Curtis aime travailler avec des frameworks modernes ...

Lire la suite
Prêt à commencer?
Nuget Téléchargements 5,044,537 | Version : 2025.11 vient de sortir