Event Clicked: UI crash, change order of CHANGE SCREEN and DELETE SCREEN and then it works

If i have an Event for a button ‘CLICKED’ with the following ordering:
CHANGE SCREEN
DELETE SCREEN

UI will crash (and reboot) when button is pressed.

But if the order is flipped to:
DELETE SCREEN
CHANGE SCREEN

Everything is good, runs fine.

Squareline v1.6.0 - Using the free version.
Uploaded to a CrowlPanel 7"
Compiled with Arduino IDE v 2.3.8

If more info is needed, just ask…

And here the error from the serial output:

Guru Meditation Error: Core  1 panic'ed (LoadProhibited). Exception was unhandled.

Core  1 register dump:
PC      : 0x42008d01  PS      : 0x00060e30  A0      : 0x8200b966  A1      : 0x3fceba40  
A2      : 0x3fcf7780  A3      : 0x3fca3728  A4      : 0x00000000  A5      : 0x3fcebc44  
A6      : 0x00000007  A7      : 0x00000001  A8      : 0x82008d01  A9      : 0x3fceba20  
A10     : 0x00000000  A11     : 0x3fca5520  A12     : 0x00000000  A13     : 0x3fcee1d8  
A14     : 0x42003a50  A15     : 0x00000003  SAR     : 0x00000020  EXCCAUSE: 0x0000001c  
EXCVADDR: 0x00000004  LBEG    : 0x4201f248  LEND    : 0x4201f2dc  LCOUNT  : 0x00000001  


Backtrace: 0x42008cfe:0x3fceba40 0x4200b963:0x3fceba60 0x4200beb5:0x3fceba90 0x4200c35f:0x3fcebab0 0x42008bcd:0x3fcebad0 0x42008c11:0x3fcebb00 0x42005527:0x3fcebb20 0x42002697:0x3fcebbe0 0x42002df9:0x3fcebc00 0x42005962:0x3fcebc20 0x420059be:0x3fcebc40 0x42005ece:0x3fcebc80 0x420064b4:0x3fcebca0 0x4201faf0:0x3fcebcf0 0x42002388:0x3fcebd20 0x4202cb3d:0x3fcebd40

ELF file SHA256: 9e104b7f93617ee5

Rebooting...

ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0xc (RTC_SW_CPU_RST),boot:0x8 (SPI_FAST_FLASH_BOOT)
Saved PC:0x4205539e
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x10 (RTCWDT_RTC_RST),boot:0x8 (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce3808,len:0x4bc
load:0x403c9700,len:0xbd8
load:0x403cc700,len:0x2a0c
entry 0x403c98d0
E (277) gpio: gpio_set_level(227): GPIO output gpio_num error
E (278) gpio: gpio_set_level(227): GPIO output gpio_num error
E (288) gpio: gpio_set_level(227): GPIO output gpio_num error
E (289) gpio: gpio_set_level(227): GPIO output gpio_num error
E (294) gpio: gpio_set_level(227): GPIO output gpio_num error

Others

  • SquareLine Studio version: 1.6.0
  • Operating system: Windows
  • Target hardware: CrowlPanel 7in

Which screen are you on, which screen are you changing to, which screen are you deleting, which transition is used to change screen, and are any delays used?

Same scenario no matter what screen i was at, same setting for both orders:

So as an example:

On ‘screen one’.
Click button event as follow:
DELETE SCREEN - current ‘Screen One’
CHANGE SCREEN - ‘Screen Two’
“Fade Mode” = NONE
Duration= 0
Delay = 0

That worked fine.

With same settings but order flipped:
CHANGE SCREEN
DELETE SCREEN
crash

I’m not sure why, but SquareLine events run in reverse order. Ex: function call [F1, F2, F3], gets executed as [F3(), F2(), F1()]. @SquareLine_Support , have you guys noticed that?

I’m still surprised that’s crashing though. It should get run as “Change to Screen Two immediately, then Delete former Screen One” (this could be a problem with animations - you don’t want to delete screen one before you’re done using it, but that’s not happening here).

Have you tried marking Screen One as a temporary screen, so that SquareLine can manage the lifecycle? That’s worked well for me.