gslc_ElemSetTxtStr not updating text or crash #481
-
I'm trying to update the text of a dynamic text field created in GUISlice Builder. Core 1 register dump: Backtrace:0x400d1856:0x3ffb27a00x400d196b:0x3ffb27d0 0x400d1a2c:0x3ffb2800 0x400dadb9:0x3ffb2820 I'm using a ESP32 with ILI9341 Could someone help me ... ? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
It's definitely an issue of the library for ESP32, if I compile for Arduino Mega the same code run perfectly. |
Beta Was this translation helpful? Give feedback.
-
@claudchtiscali A couple of things, first I suggest you post in issues when you need help. I myself don't check here very often. In this case in looking over your header I noticed no modifiable storage was allocated to your text field.
Note that your gslc_ElemSetTxtStr(&m_gui, pElemCnt, a); statement is attempting to write over constant flash storage (non-writable) memory containing "Spento" memory . It's somewhat scary that Arduino mega allows that...
and when set this way your program works fine with esp32. Given the field ElementRef=m_pElementCnt you don't need to do the lookup call
and can instead directly reference:
|
Beta Was this translation helpful? Give feedback.
-
I feel that for other people I should point out that this issue is common enough that I included a section for it in my faq.pdf supplied with the Builder releases titled: Can you change a Text String at runtime? that explains how to set the text field inside your project. |
Beta Was this translation helpful? Give feedback.
It's definitely an issue of the library for ESP32, if I compile for Arduino Mega the same code run perfectly.
I'll move this topic to "issues"