Null Reference Exception on editor save call

Hi, I am following the examples given here and here to programmatically initialize an SFImageEditor object, attach an image, and then save. When the save call executes it is returning a Null Reference Exception "Object reference not set to an instance of an object". As far as I can tell I am matching the provided examples and I can not figure out why this is occurring. Is there a property that needs to be set for the editor to save beyond editor.ImageSource ?


2 Replies

VO Vishal Omprasad Syncfusion Team October 9, 2024 12:10 PM UTC

Hi Z.K,

We have found and fixed the reported scenario “programmatically initializing WPF SfImageEditor object, attaching image and saving throws NullReferenceException” on our end. Currently, the issue fix is in the testing phase. Once the automation is ensured, we will include the issue fix in our upcoming weekly NuGet release update, which is scheduled to roll-out on October 15, 2024. We will let you know once the NuGet release is rolled-out and appreciate your patience until then.

Disclaimer: Inclusion of this solution in the weekly release may change due to other factors including but not limited to QA checks and works reprioritization.

Regarding "Is there a property that needs to be set for the editor to save beyond editor.ImageSource?":

The WPF SfImageEditor control does not require any additional specific properties to be set in order to save the image beyond SfImageEditor.ImageSource.

Regards,
Vishal O.



VO Vishal Omprasad Syncfusion Team October 15, 2024 10:05 AM UTC

Hi Z.K,

We have fixed the reported scenario “programmatically initializing WPF SfImageEditor object, attaching image and saving throws NullReferenceException” on our end and included the fix in the latest weekly NuGet release update version 27.1.53 which is available for download in nuget.org.

Root-cause: Null check was not added, causing NullReferenceException to throw, when saving the image immediately after loading.

We thank you for your support and appreciate your patience in waiting for this update. Please feel free to reach out to us if you would require any further assistance.

Regards,
Vishal O.


Loader.
Up arrow icon