2021-03-15 07:28 AM
Hi
When switching between screens fast, my UI always ends up freezing. Debugging reveals that it waits forever, waiting for the frame buffer semaphore.
Here is the call stack:
Inspecting other running tasks shows nothing wrong. Only the graphics task should touch the frame buffer semaphore, right? So it should never deadlock?
Environment:
2021-06-21 12:47 AM
Hi @Martin KJELDSEN : Thanks for your quick response. We are using touchgfx version 4.16. We have a similar problem where the method takeFrameBufferSemaphore() waits forever.
2021-06-21 12:49 AM
No problem. Okay, it should have been fixed there. Are you able to share your project in any way? In the middle of 4.17.0 release testing, so won't have much time this week, but - This is the second person who's reported this, so i should take some time to investigate this properly if i can re-construct the issue here at my desk.
2021-06-21 12:50 AM
takeFrameBufferSemaphore() is OS-specific - Which OS are you using?
2021-06-21 12:55 AM
@Martin KJELDSEN : Sorry for not providing complete details. We are using embOS. So takeFrameBufferSemaphore() is OS-specific. Could it be that the OSWrappers is not properly implemented ? Should I quickly share you my OSwrappers.cpp ?
Our project is very huge. So, I will see how can I share you my project.
2021-06-21 12:59 AM
@AKG @vtunr - Here's a small task for you. HAL::lockFrameBuffer() and HAL::unlockFrameBuffer() are virtual. Could you try overwriting these and introduce some counters? At any point in time the lock counter should only be 1 higher than the unlock counter.
And then maybe break if the lock counter becomes 2 higher, and send me a stack trace.
Can you both describe the nature of the application in terms of widgets? If it's easy for you to reproduce then you may start with a blank application (set all widgets invisible from the designer) then add more on gradually. We're investigating here if we have some missing unlocks for some widgets that require direct access to the framebuffer (canvas widgets, texturemappers, etc.)
/Martin
2021-06-21 01:02 AM
Did you create the project usign the generator? The generator generates a CMSIS OS specific OS-driver (cmsis v1 or v2, depending on what you selected). Which should work with fine with embOS.
I'm more thinking it's an internal problem with us, but i'm investigating (see the above post - I tagged you - for details and some home-work for you, if you have the time).
2021-06-21 01:07 AM
@Martin KJELDSEN Thanks for your reply. We started this project long back with touchgfx version 4.9.3. If I am not wrong, there was no generator at that time. So our project was created without using the generator. Thereafter on every newer touhgfx version, we have only tried to upgrade touchgfx.
I can create a project using generator and compare the OSWrapper implementation.
Also I will try out the task you mentioned above. I will get back to you as soon I have any result.
2021-06-21 01:09 AM
Aha, okay. (also, no need to be sorry). The issue was found in 4.9.3 - @vtunr is doing the exact same thing you're doing, just updating the framework, when there may be something additional (through the generator, like DMA2D code) that is missing for you.
2021-06-21 01:30 AM
Have you modified some of the widget .cpp files from 4.9.3 and kept them? Because the bugfixes we did subsequently would then not be present in your modified versions.
2021-06-21 01:31 AM
Also, when did this problem start occuring?
/Martin