You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Attempting to JIT compile method "(wrapper native-to-managed) int Emgu.CV.CvInvoke:CvErrorHandler (int,intptr,intptr,intptr,int,intptr)" while running in aot-only mode.
#926
Open
hirendh opened this issue
Apr 12, 2024
· 2 comments
We have created cross platform application in .Net MAUI with .Net 8 Latest Version. In app we have used Emgu.CV.runtime.maui.macos.4.8.1.5350.nupkg nuget package. when we use any operation related CvInvoke it's throw exception. Following is code in i got this exception.
Convert SKbitmap to Mat :
Mat source = new Mat();
byte[] bytes;
using (SKImage img = SKImage.FromBitmap(skBitmap))
using (SKData data = img.Encode())
{
bytes = data.ToArray();
}
CvInvoke.Imdecode(bytes, ImreadModes.Unchanged, source);
int channels = skBitmap.BytesPerPixel;
source = new Mat(new System.Drawing.Size(skBitmap.Width, skBitmap.Height), DepthType.Cv8U, channels,
skBitmap.GetPixels(), skBitmap.RowBytes);
throw Exception:
System.TypeInitializationException: TypeInitialization_Type, Emgu.CV.MatInvoke
---> System.TypeInitializationException: TypeInitialization_Type, Emgu.CV.CvInvoke
---> System.ExecutionEngineException: Attempting to JIT compile method '(wrapper native-to-managed) int Emgu.CV.CvInvoke:CvErrorHandler (int,intptr,intptr,intptr,int,intptr)' while running in aot-only mode. See https://docs.microsoft.com/xamarin/ios/internals/limitations for more information.
at Emgu.CV.CvInvoke..cctor()
Exception_EndOfInnerExceptionStack
at Emgu.CV.MatInvoke..cctor()
Exception_EndOfInnerExceptionStack
at Emgu.CV.Mat..ctor()
OS / Platform
Mac OS Sonoma 14.3.1
.Net version
.Net 8
CPU Architecture
ARM64
Emgu CV package used
Emgu.CV (4.8.1.5350)
Emgu.CV.Bitmap (4.8.1.5350)
Emgu.CV.runtime.maui.macos (4.8.1.5350)
This problem is occur in only Mac Platform (net8.0-maccatalyst with arm64).
Expected behavior
Emgu.CV.CvInvoke method work without any exception.
The text was updated successfully, but these errors were encountered:
We have created cross platform application in .Net MAUI with .Net 8 Latest Version. In app we have used Emgu.CV.runtime.maui.macos.4.8.1.5350.nupkg nuget package. when we use any operation related CvInvoke it's throw exception. Following is code in i got this exception.
Convert SKbitmap to Mat :
throw Exception:
OS / Platform
Mac OS Sonoma 14.3.1
.Net version
.Net 8
CPU Architecture
ARM64
Emgu CV package used
Emgu.CV (4.8.1.5350)
Emgu.CV.Bitmap (4.8.1.5350)
Emgu.CV.runtime.maui.macos (4.8.1.5350)
This problem is occur in only Mac Platform (net8.0-maccatalyst with arm64).
Expected behavior
Emgu.CV.CvInvoke method work without any exception.
The text was updated successfully, but these errors were encountered: