# macOS app crash when changeParameter is called for setting background image

**URL:** https://forum.deepar.ai/t/macos-app-crash-when-changeparameter-is-called-for-setting-background-image/307
**Category:** SDK
**Tags:** background
**Created:** [May 17, 2023, 6:30pm UTC](https://forum.deepar.ai/t/macos-app-crash-when-changeparameter-is-called-for-setting-background-image/307 "2023-05-17T18:30:51Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![saqibomer](https://avatars.discourse-cdn.com/v4/letter/s/9fc29f/32.png) [@saqibomer](https://forum.deepar.ai/u/saqibomer)
#### Post date: [May 17, 2023, 6:30pm UTC](https://forum.deepar.ai/t/macos-app-crash-when-changeparameter-is-called-for-setting-background-image/307/1 "2023-05-17T18:30:51Z")

</div>

Hello, I used quickstart-macos-objc code. I added background\_segmentaion.deepar effect in app. I switch to this effect and call changeParameter to set a background image. Everything works perfect, but when I change image for third time, sdk crashes.

Here is how I switch effect:

> [self.deepAR switchEffectWithSlot:@“effect” path:[[NSBundle mainBundle] pathForResource:@“background\_segmentation.deepar” ofType:@“”]];

After this on click of a button I call this.

> [self.deepAR changeParameter:@“Background” component:@“MeshRenderer” parameter:@“s\_texColor” image:image];

---

<div class="post-metadata">

### Author: ![jelena](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.deepar.ai/jelena/32/14_2.png) [@jelena](https://forum.deepar.ai/u/jelena)
#### Post date: [May 17, 2023, 7:41pm UTC](https://forum.deepar.ai/t/macos-app-crash-when-changeparameter-is-called-for-setting-background-image/307/2 "2023-05-17T19:41:46Z")

</div>

Thank you for the notes on reproducing the issue i will test it out
