LVGL Crashes when modifying an asset file

What do you want to achieve?

When I make modifications to an asset in a third party program, LVGL crashes and cannot be restarted.

What have you tried so far?

The problem can be worked around by saving and re-opening the project in Squareline Studio.

Example

I typically design button faces in Inkscape
When I export a button bitmap from Inkscape to the …\assets folder, LVGL crashes within SquareLine Studio

I’m posting a single image because I’m a new user:

Others

I’m using Squareline Studio 1.4.2 on Windows 11

Hi,
In the console panel you can see the reason why LVGL crashes. if the error is not clear, please send a screenshot of the console panel, I can definitely help. You can find a video on how to solve the LVGL crash here, I hope this will also help you solve the problem. https://youtu.be/j-r97h2TFms?si=aSSMWWzfEC2XemcW

Hi,

Thanks for helping me out! I watched the video but I’m not sure how to fix the error.

Information I forgot to mention in my original post but which may be relevant: I am using Version 2.0.0 (I am assuming this is the Squareline project format version) and LVGL 9.1.0. The problem appears to be associated with this, see at the bottom of this post.

The scenario is:

  1. I open a SquarelineStudio project, which displays a bitmap (for instance on a panel component). The bitmap displayed is a .png file in the assets folder of the SquarelineStudio project
  2. I open Inkscape
  3. I export the bitmap from Inkscape, overwriting the .png file in the assets folder

In the console of SquarelineStudio, I get the following error message:

Rebuilding all screens...
Project Loaded
Try to start lvgl server on port: 20085
SERVER: Listening on 127.0.0.1:20085
SERVER: Free memory: 535040512
SERVER: Temp dir: C:/Users/henkj/AppData/Local/Temp/SquareLine Kft_/SquareLine_Studio
SERVER: Client connected from 127.0.0.1:61358
Start full rebuild: Connected to the server
Rebuilding all screens...
SERVER: Load screen_global:ui_scnMain
SERVER: Load screen_global:ui_scnSettings
SERVER: Load screen_global:ui_scnWeekSchedule
Play mode active
SERVER: Save generated source code to: C:/Users/henkj/AppData/Local/Temp/SquareLine Kft_/SquareLine_Studio/codestream.py
SERVER: EVAL FAILED: Traceback (most recent call last):
SERVER: Internal line 395, in <module>
SERVER: lv.image.cache_invalidate_src(None)
SERVER: AttributeError: type object 'image' has no attribute 'cache_invalidate_src'
ERROR: Error: LVGL crashed
Please check the console
Command not send: PKT_IN_TYPE_SCRIPT

When pressing the “Restart LVGL” button on the top of the screen, I get the following additional error messages in the console:

Autosave Done
Try to start lvgl server on port: 20085
SERVER: Listening on 127.0.0.1:20085
SERVER: Free memory: 535040512
SERVER: Temp dir: C:/Users/henkj/AppData/Local/Temp/SquareLine Kft_/SquareLine_Studio
Start full rebuild: Connected to the server
SERVER: Client connected from 127.0.0.1:61960
Rebuilding all screens...
SERVER: Save generated source code to: C:/Users/henkj/AppData/Local/Temp/SquareLine Kft_/SquareLine_Studio/codestream.py
SERVER: EVAL FAILED: Traceback (most recent call last):
SERVER: Internal line 309, in <module>
SERVER: lv.image.cache_invalidate_src(None)
SERVER: AttributeError: type object 'image' has no attribute 'cache_invalidate_src'
ERROR: Error: LVGL crashed
Please check the console

I reproduced the error in a new project with a single screen and a single image widget.

  1. After creating the new project and overwriting the .png file in the assets folder, the error does not occur.
  2. After saving and reopening the project in Squareline Studio, and then overwriting the .png file, the error occurs
  3. After closing and reopening the project, LVGL starts normally.

I then made a copy of the project and saved is as “V1.0.0” and LVGL version “8.3.6”. The problem does not occur. So apparently it is associated with the LVGL 9 version.

HenkJan van der Pol.

Thanks for the log, based on this we will be able to find out what the problem might be.

1 Like