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
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:
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
I open Inkscape
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.
After creating the new project and overwriting the .png file in the assets folder, the error does not occur.
After saving and reopening the project in Squareline Studio, and then overwriting the .png file, the error occurs
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.