Crash in TouchGFX draw() function (waiting on framebuffer semaphore)
- March 23, 2021
- 9 replies
- 4143 views
I have a page with many textboxes in a swipe container, half of which have wildcards. Occasionally the TouchGFX task will freeze (other RTOS tasks continue as normal). Unfortunately I have not yet found a way to reproduce it, however the symptoms are similar each time.
The UI freezes. I click pause in STM32CubeIDE, I usually end up in a DMA Handler. I step through until the DMA handler completes, and then I land in a TouchGFX textarea draw function.
The stack trace is always something like this:
touchgfx::TextAreaWithOneWildcard::draw(touchgfx::Rect const&) const at 0x8057353
touchgfx::Screen::JSMOC() at 0x......
touchgfx::Screen::JSMOC() at 0x......
touchgfx::Screen::JSMOC() at 0x......
<a number of these JSMOC lines...>
touchgfx::Screen::JSMOC() at 0x......
touchgfx::Screen::startSMOC() at
touchgfx::draw()
touchgfx::Application::draw()
touchgfx::Application::cacheDrawOperations()
touchgfx::HAL::tick()
touchgfx::HAL::backPorchExited() at HAL.hpp:541The topmost function is always a TextArea, TextAreaWithOneWildcard, or TextAreaWithTwoWildcards draw() function.
Edit 2021-04-06: I was able to reproduce the issue where the draw function called was a member of Line.
Regardless of the exact object the draw function was part of, the program counter in the disassembly always stops at one of these two instructions:
08057353: add.w r1, r2, r3, lsl #1
08057357: ldrb.w r2, [r2, r3, lsl #1]When I click step, the program counter doesn't step to the next one, however instead it continues the execution of the program.
Once, the stack trace said the topmost draw function is at address 0x8057356, but the add.w instruction is at 0x8057353 and the ldrb.w instruction was at 0x8057357.
Please see attached for a screenshot of the CubeIDE during one of these crashes. I am running a custom board, however it is based off of the STM32F769-DISCO application template (either v3.0.1 or v3.0.0).
Thanks for any assistance.
