Closed AndrewKaplanovsky closed 8 years ago
@AndrewKaplanovsky Which versions of the Accord, Shim and Shim.Drawing libraries are you using? It's been a while since I updated the references in these projects, this might play a role.
I will look closer into this issue when time permits.
Hi Anders,
In the app I'm developing: Accord 3.0.2.60302 Shim 2.2.0 Shim.Drawing 3.0.0
In accord-samples that I downloaded from GH, FaceDetection: Accord 3.0.2.50804 Shim 1.0.2.50909 Shim.Drawing 2.2.5.50526
In both cases I get the same error:
When I create a new Stream, I see that its length is zero
After the Bitmap is saved into the stream, its length is still zero
After that the app fails with the 'System.AccessViolationException' trying to display the processed image.
Thank you, Andrew
OK, I have looked a little closer into this issue, and it seems like there is a problem with Bitmap.Save
for the Universal (8.1) platform. I will attempt a bug fix as soon as possible. In the mean time, many thanks for reporting, @AndrewKaplanovsky !
@anders9ustafsson, thank you so much for your help! I'll wait for the fix.
@AndrewKaplanovsky I have implemented a fix and verified that it works. In a short while I will publish a new Shim.Drawing release with the bug fix included.
@anders9ustafsson, thank you very much!
@anders9ustafsson Hi Anders, sorry for disturbing you, but when it is possible to expect the fixed version of the Shim.Drawing dll for the Universal platform published?
@AndrewKaplanovsky I am sorry about the delay, quite a few things have gotten in the way. I'll see what I can do within the next couple of days, but I am afraid I cannot promise anything for sure.
@AndrewKaplanovsky I have now published version 3.0.1 of Shim.Drawing on NuGet, with the fix for Image.Save
on Windows Universal. Please give it a try and see if it works sufficiently for you.
Anders, thank you very much, it works now!
Hi,
When I try to run the face detection example, I get this error:
An unhandled exception of type 'System.AccessViolationException' occurred in Xamarin.Forms.Platform.WinRT.DLL
Additional information: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
I tried to run the following solutions:
Both raise the same error.
Project FaceDetection, MainPage.xaml.cs, private void OnDetectButtonClicked(object sender, EventArgs args):
if (objects.Length > 0) { var marker = new RectanglesMarker(objects, Color.FromArgb(0xff, 0xff, 0x00, 0xff));
}
Regards, Andrew Kaplanovsky