We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

ImageEditor crashes with large images

Thread ID:

Created:

Updated:

Platform:

Replies:

147862 Sep 26,2019 05:55 AM UTC Dec 26,2019 04:01 AM UTC UWP 12
loading
Tags: SfImageEditor
Frank Effenberger
Asked On September 26, 2019 05:55 AM UTC

Hi,

I'm using the ImageEditor and it works fine for small pictures. But if I use for example an image with 5184x3888 pixels (180dpi, 5,6MB) my app crashes with the following exception:

"{System.ArgumentException: Offset and length were out of bounds for the array or count is greater than the number of elements from index to the end of the source collection.
   at System.IO.UnmanagedMemoryStream.Write(Byte[] buffer, Int32 offset, Int32 count)
   at Syncfusion.UI.Xaml.ImageEditor.BitmapExtension.MergeShapeViewAndImage(WriteableBitmap originalBitmap, WriteableBitmap shapeViewBitmap)
   at Syncfusion.UI.Xaml.ImageEditor.SfImageEditor.getMergedBitmap()
   at Syncfusion.UI.Xaml.ImageEditor.SfImageEditor.getCurrentStream()
   at Syncfusion.UI.Xaml.ImageEditor.SfImageEditor.SaveImage(String format, Size size)
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.<ThrowAsync>b__7_0(Object state)
   at System.Threading.WinRTSynchronizationContextBase.Invoker.InvokeCore()}"

StackTrace:
"   at System.IO.UnmanagedMemoryStream.Write(Byte[] buffer, Int32 offset, Int32 count)\r\n   at Syncfusion.UI.Xaml.ImageEditor.BitmapExtension.MergeShapeViewAndImage(WriteableBitmap originalBitmap, WriteableBitmap shapeViewBitmap)\r\n   at Syncfusion.UI.Xaml.ImageEditor.SfImageEditor.getMergedBitmap()\r\n   at Syncfusion.UI.Xaml.ImageEditor.SfImageEditor.getCurrentStream()\r\n   at Syncfusion.UI.Xaml.ImageEditor.SfImageEditor.SaveImage(String format, Size size)\r\n   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.<ThrowAsync>b__7_0(Object state)\r\n   at System.Threading.WinRTSynchronizationContextBase.Invoker.InvokeCore()"

Do you have any ideas how to fix this problem?

Regards,
Frank Effenberger


Vignesh Ramesh [Syncfusion]
Replied On September 30, 2019 02:13 PM UTC

Hi Frank, 

Greetings from Syncfusion. 

We have checked the reported problem with the image having 5760x3840 pixels (5.0MB) but we cannot reproduce the issue. So, could you please share the tested image and system configurations like OS version, RAM size, VS version, etc. This would help us to proceed further. 

Regards, 
Vignesh. 


Frank Effenberger
Replied On October 1, 2019 05:03 AM UTC

Hi Vignesh,

OS Version: Windows 10 Pro (1809) 64 Bit
RAM-Size: 8GB
Visual Studio Version: Professional 2017, 15.9.13

Regards,
Frank.

Attachment: TestImage_a47e7022.7z

Vignesh Ramesh [Syncfusion]
Replied On October 3, 2019 02:05 PM UTC

Hi Frank, 

Thanks for the response. 

We can reproduce the reported crash with the provided image. Currently we are validating in our side and update you the status on 7th October 2019. We appreciate your patience until then. 

Regards, 
Vignesh. 


Frank Effenberger
Replied On October 8, 2019 08:31 AM UTC

Hi Vignesh,

are there any news regarding the problem?

Regards,
Frank.

Vignesh Ramesh [Syncfusion]
Replied On October 8, 2019 05:58 PM UTC

Hi Frank, 

Sorry for the delay. 

We have checked the issue in our source level. But we are not sure about it is due to our source level issue or framework level issue. Still we are checking the exact root cause of the issue and update you further details on 10th October 2019. We appreciate your patience until then. 

Regards, 
Vignesh. 


Bharathiraja K [Syncfusion]
Replied On October 10, 2019 06:25 PM UTC

Hi Frank,

 

Thanks for your patience. Further analysis with our source, we found that loading large size of image (5184 x 3888) caused insufficient memory exception and it is looks like there is some limitation in framework level. We have raised question in MSDN forum regarding this in the below link.

 

https://social.msdn.microsoft.com/Forums/en-US/98671f24-0a7a-4f5f-bc3c-d8b94a7b4b0f/insufficient-memory-to-continue-the-execution-of-the-program-while-calling

 

We will inform you further details once we get update from MSDN forum. Until that, we suggest you resize the image to (4584, 3438) or according to your machine configuration and save image.

 

Regards,

Bharathi.


Frank Effenberger
Replied On October 11, 2019 03:48 AM UTC

Thank you for your commitment.

Regards,
Frank.

Rachel A [Syncfusion]
Replied On October 11, 2019 11:04 AM UTC

  
Hi Frank, 
 
We are glad to hear from you and will update once we get proper solution. Appreciate your patience until then. 
Thanks, 
Rachel. 


Frank Effenberger
Replied On October 24, 2019 04:48 AM UTC

Hi Rachel,

are there any news regarding the problem?

Regards,
Frank

Bharathiraja K [Syncfusion]
Replied On October 28, 2019 07:17 PM UTC

Hi Frank, 
 
Sorry for the delay in response. We are unable to find the exact root cause of the issue whether it is framework level limitation or source level. So, we are still analyzing this issue with source and public forum. We will update you once we found the solution or root cause of the issue. Please change the image size and use as we suggest in our previous update until then.  
 
Thanks, 
Bharathi. 


Frank Effenberger
Replied On December 20, 2019 06:29 AM UTC

Hi Bharathi,

are there any news regarding the problem?

Regards,
Frank

Bharathiraja K [Syncfusion]
Replied On December 26, 2019 04:01 AM UTC

Hi Frank, 
 
We have checked the problem with source using the suggested solution from MSDN. But, while converting a bitmap image from array of bytes, it takes huge memory and throws out of memory exception. We are unable to handle this in our source since the issues occurs when using framework method to convert to a bit map. So, please use the previous suggested solution.  
 
Regards, 
Bharathi. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon