# Exported component source code bugs

**URL:** <http://forum.squareline.io/t/exported-component-source-code-bugs/1231>\
**Category:** Bugs\
**Created:** [May 11, 2023, 7:35am UTC](http://forum.squareline.io/t/exported-component-source-code-bugs/1231 "2023-05-11T07:35:03Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Schmidt](http://forum.squareline.io/letter_avatar_proxy/v4/letter/s/a3d4f5/32.png) [@Schmidt](http://forum.squareline.io/u/Schmidt)\
**Post date:** [May 11, 2023, 7:35am UTC](http://forum.squareline.io/t/exported-component-source-code-bugs/1231/1 "2023-05-11T07:35:03Z")

</div>

The second argument of the lv\_obj\_set\_style\_bg\_img\_src function is the TemporaryImage variable, which does not contain the name of the actual image file’s table name.

I am looking for the table name of the corresponding image from the .c file under images and replacing it with ui\_img\_xxxxx, but I would like it to be supported when generated.

lv\_obj\_set\_style\_bg\_img\_src(xxx, &TemporaryImage, LV\_PART\_MAIN | LV\_STATE\_DEFAULT);

### Others

- **SquareLine Studio version:** 1.3.0
- **Operating system:** Windows10
- **Target hardware:** NXP i.mxRT

---

<div class="post-metadata">

**Author:** ![Schmidt](http://forum.squareline.io/letter_avatar_proxy/v4/letter/s/a3d4f5/32.png) [@Schmidt](http://forum.squareline.io/u/Schmidt)\
**Post date:** [May 18, 2023, 7:27am UTC](http://forum.squareline.io/t/exported-component-source-code-bugs/1231/2 "2023-05-18T07:27:44Z")

</div>

Further information: the problem is found in text label component .c file.

---

<div class="post-metadata">

**Author:** ![kisvegabor](http://forum.squareline.io/user_avatar/forum.squareline.io/kisvegabor/32/537_2.png) [@kisvegabor](http://forum.squareline.io/u/kisvegabor)\
**Post date:** [May 18, 2023, 9:50am UTC](http://forum.squareline.io/t/exported-component-source-code-bugs/1231/3 "2023-05-18T09:50:01Z")

</div>

Hi,

I couldn’t reproduce it. Could you attach a minimal project and the exported files to demonstrate the issue?

---

<div class="post-metadata">

**Author:** ![Boley](http://forum.squareline.io/letter_avatar_proxy/v4/letter/b/41988e/32.png) [@Boley](http://forum.squareline.io/u/Boley)\
**Post date:** [May 19, 2023, 1:56am UTC](http://forum.squareline.io/t/exported-component-source-code-bugs/1231/4 "2023-05-19T01:56:06Z")

</div>

Hi, thanks. we will email you a project with the error. CJ

---

<div class="post-metadata">

**Author:** ![Schmidt](http://forum.squareline.io/letter_avatar_proxy/v4/letter/s/a3d4f5/32.png) [@Schmidt](http://forum.squareline.io/u/Schmidt)\
**Post date:** [May 19, 2023, 3:52am UTC](http://forum.squareline.io/t/exported-component-source-code-bugs/1231/5 "2023-05-19T03:52:12Z")

</div>

This bug did not occur as long as the component was created in a new project using the latest version of the tool.  
It seems to be a bug that occurs when exporting a component of a project created before SLS 1.3.0 with a newer version.

I have prepared a project to reproduce the bug.  
[UI\_component\_debug.zip](http://forum.squareline.io/uploads/short-url/24MO13QqNPkrwb6e36es38XgG73.zip) (3.2 MB)

---

<div class="post-metadata">

**Author:** ![kisvegabor](http://forum.squareline.io/user_avatar/forum.squareline.io/kisvegabor/32/537_2.png) [@kisvegabor](http://forum.squareline.io/u/kisvegabor)\
**Post date:** [May 19, 2023, 7:47am UTC](http://forum.squareline.io/t/exported-component-source-code-bugs/1231/6 "2023-05-19T07:47:56Z")

</div>

Thank you. I’ve exported the code and found this in the `ui_comp_arrowl.c`:

```c
lv_obj_set_style_bg_img_src(cui_ArrowL, &ui_img_1586088825, LV_PART_MAIN | LV_STATE_PRESSED);

```

So it looks good. Probably the it fixed itself as we have imported the project. As workaround, I think editing and saving the component will fix it as well. Could you try it out?

---

<div class="post-metadata">

**Author:** ![Boley](http://forum.squareline.io/letter_avatar_proxy/v4/letter/b/41988e/32.png) [@Boley](http://forum.squareline.io/u/Boley)\
**Post date:** [May 19, 2023, 8:44am UTC](http://forum.squareline.io/t/exported-component-source-code-bugs/1231/7 "2023-05-19T08:44:43Z")

</div>

Thanks. I think editing and saving the component seems to fix these issues. Will keep an eye on it.
