Too many childs add()'ed in container crash application
Hi,
I want to draw grid to a graph, which has many tick lines + tick texts (up to 10 vertical + 10 horizontal).
In addition to this, I have the Graph widget drawn inside the same container:
https://github.com/touchgfx/touchgfx-open-repository/tree/master/widgets/Graph
When I add these grid lines in for loop like such:
for (int i = 0; i < HTICK_COUNT ; i++)
{
remove(htickline[i]);
... add line color, position, width, etc. ...
add(htickline[i]);
}
...
touchgfx::Line htickline[HTICK_COUNT];The application will crash at boot when there is too many children added. In my case, adding 14 lines + 14 texts will halt the program.
Is this supposed to happen? How many childs can I safely add?
I think I can avoid this using canvas painter, but I still want to know is this normal behavior when adding too many childs. Should not be a RAM problem, I have statically allocated these drawables?
EDIT:
might be resource problem. The simulator can run a lot of lines and texts. I'm using stm32-f4-disc1 board, with SINGLE_BUFFERING disabled.
Thanks!
