cancel
Showing results for 
Search instead for 
Did you mean: 

TouchGFX Crash with multiple text boxes

justin11
Senior

Hi,

I have a custom board project which I have been running for over a year and im looking to add some features to the layout. The screen is a 240x320 layout and the MCU is a STM32H757. I am running touch GFX 4.20 and it will be difficult for me to upgrade from this due to the ties within the cubide and code base.

Im looking to add a page with multiple test boxes,as i need to update sensor readings to the screen. Originally i built this in custom containers as i would normally, but it kept crashing on creating on the new page. So i have worked back making the page more and more simple untill i found a threashold of it occuring when i have 38 default text boxes on the screen (see pic), the text boxes have no buffers allocated to them and this is on a fresh screen so no functions or code running.

if i lower the number of text boxes to 34 its fine.

is this a limitation of 4.20 ?

I've tried increasing the canvas buffer and rtos heap and task memory but nothing resolves this crash (HardFault exception), i've attached the memory address in the diassembler.

 

 

Screenshot 2024-10-25 185641.png

justin11_0-1729879736002.png

 

8 REPLIES 8
ferro
Senior III

Hi @justin11 , what does function call stack say ?

justin11
Senior

justin11_1-1729891253995.png

 

This is the call stack at the point it crashed

justin11_0-1729891184598.png

 

 

ferro
Senior III

72 == sizeof ( touchgfx::TextArea )

 

 

if i lower the number of text boxes to 34 its fine.

 

72*34 = 2448 bytes

So you are creating them on heap. Does this happen if you add them from an array of lets say 50 TextArea ?

Thanks. This does not look familiar sorry. So is this the only screen you,ve got ? are you adding TextAreas in GfxDesigner so they are in Base class ? You mantioned heap so probably not.

I have other screens (approve 14) as mentioned this is a live project and never had an issue like this.

i did try to delete some screens to lighten the loading but it didn’t help.

i created these text fields via touchgfx, so yes they are in the base class.

>> "i created these text fields via touchgfx, so yes they are in the base class."

Ah Okay, I thought you create screns on heap as you said "I've tried increasing [...] rtos heap and task memory but nothing resolves this"

I am not aware of any limitation on drawables added to a screen. Maybe you exhaust your RAM ?

You could check size of screens. This compiler error will tell you the size

char (*ee)[ sizeof ( Here_name_of_SreenView ) ] = 1;