# Debugging exceptions - opencv save image to disk

**URL:** <https://forums.unrealengine.com/t/debugging-exceptions-opencv-save-image-to-disk/2086942>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine, CPP, question\
**Created:** [October 25, 2024, 6:46am UTC](https://forums.unrealengine.com/t/debugging-exceptions-opencv-save-image-to-disk/2086942 "2024-10-25T06:46:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![behram\_patel](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@behram\_patel](https://forums.unrealengine.com/u/behram_patel)\
**Post date:** [October 25, 2024, 6:46am UTC](https://forums.unrealengine.com/t/debugging-exceptions-opencv-save-image-to-disk/2086942/1 "2024-10-25T06:46:26Z")

</div>

**Update 01**  
The exception was thrown because i was trying to save as a jpg file. I saved the image as a png file and it worked. Thanks to this thread [Does the OpenCV included with UE5 come with JPEG compatibility?](https://forums.unrealengine.com/t/does-the-opencv-included-with-ue5-come-with-jpeg-compatibility/1498336).

I still need to learn how I’d go about debugging this via the call stack. So my question still stands  
**End Update 01**

**debugging exceptions** -  
Hi ,  
I’m getting an Exception Unhandled error when I press the play button in the editor.  
I’m using the inbuilt opencv plugin to Read an image , apply a blur to it and (try to) save it back to disk.

The exception occurs when I try to save the image back to disk.  
`Unhandled exception at 0x00007FFDAA12CB69 in UnrealEditor.exe: Microsoft C++ exception: cv::Exception at memory location 0x000000D6AF178860`

Attached a pic of the function and call stack . Thanks for any help in understanding how to debug such errors.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/d/5/8d5efcc723a7e3f279288303bde18dc906a17e3a.png)

b
