I’ve taken over an application where a tileview is used to display a number of notifications about system events. These are dynamic and may be removed upon user acknowledgment.
I am seeing an issue sometimes when removing the last tile, at which point the code is supposed to switch to a different screen, but it sometimes the application crashes before this happens. The crash looks like a use-after-free through the tileview .tile_act pointer – I end up with a SIGSEGV because .tile_act is pointing at a tile where the .spec_attr pointer is 5. The .tile_act pointer looks correct, which is why I’m assuming it’s a stale pointer.
The code clearly assumes that the tileview handles removing all tiles, and I’m guessing this is incorrect. The documentation and examples all seem to be for a more static usage than what this application tries to do.
Before I start making big changes to rework everything, I wonder if someone can provide any insight.
Environment
- MCU/MPU/Board: Custom i.MX6ULL running Linux
- LVGL version: 9.2 (but the tileview code is mostly unchanged since then)