sstaub / NextionX2

Library for Nextion displays
MIT License
13 stars 5 forks source link

Maximum text length limitation #2

Closed AussieMakerGeek closed 2 years ago

AussieMakerGeek commented 2 years ago

Hi, first off, thanks for taking the time to author such a great library! With it I have been almost able to do everything i want BUT

There seems to be a limitation on the amount of characters we can use with item.text() function as well as item.attribute("txt", )

I am trying to write a long (113 char) url to the text attribute of a QRCode object but it would seem there is a limitation of about 30-40 characters. Smaller strings work fine.

Causes a CPU crash and reset...

Platform: ESP32

Stack smashing protect failure!

abort() was called at PC 0x4013820b on core 1

ELF file SHA256: 0000000000000000

Backtrace: 0x40089214:0x3ffb1e10 0x40089491:0x3ffb1e30 0x4013820b:0x3ffb1e50 0x400d0eb1:0x3ffb1e70 0x400d14c9:0x3ffb1ed0 0x400d1a2a:0x4f4e4d4c

Rebooting...

`

AussieMakerGeek commented 2 years ago

I worked it out:

Changing the defines :

#define ATTRIBUTE_TEXT_LENGTH   150
#define ATTRIBUTE_TEXT_LENGTH_X 150

Allowed me to process the longer strings!

Thanks Again.