cancel
Showing results for 
Search instead for 
Did you mean: 

model::tick() and other functions get blocked occasionally

JYi.3
Associate II

The following functions get blocked during application:

  1. void Model::tick() ;
  2. void handleTickEvent() ;
  3. OSWrappers::waitForVSync() ;

However, OSWrappers::signalVSync() works fine. The issue happens occasionally, most of the time, the TouchGFX GUI application is working fine.

What is the root-cause and how to debug / fix this issue?

Thanks

Jianchun

10 REPLIES 10
Alexandre RENOUX
Principal

Hello Jianchun,

To find the root cause we need more information. Please give us information about your setup (TouchGFX version, board, display, how did you create your project, picture of the debug results, etc.)

/Alexandre

Hi Alexandre,

Our touchGFX project (ceribell.com) was created by Jesper Hedegaard 5+ years ago. Martin Kieldsen was working on it for about 1 year, and later took over by Anders Eskildsen. it was based on ST32F769 discovery-board with the same display. Our current TouchGFX version is 4.16.0.

Thanks,

Martin KJELDSEN
Chief III

Hi Jianchun!

Long time no talk :) When did this start happening?

/Martin

Hi Martin,
Nice to talk to you again!
Our application has been used in the field for 3+ years. Thank you very much for the support! We have about 1,000 cases per month and there are up to 4 cases reported that the application / GUI hanged.
We have been fighting this issue for a while and finally we caught it during test / debugging. We don't know how the model::tick() gets blocked occasionally. What we want to do is:
1. find out the root-cause and fix the issue;
2. or restart the tick again when it happens.
Any suggestions?
Thanks
- Jianchun

Item 1 sounds preferable :) I'm not sure i understand what "tick gets blocked" means. Do you mean that the GUI Thread is blocked completely? I remember your model is doing *a lot* of things, communication with lots of threads. Do you have any insight into the stack trace for this, or has is it been too difficult to catch?

/Martin

Option 2) won't really work, i think. The tick is driven by your display controller (which is probably still firing off interrupts). I think you'll be stuck either way if you don't find the root cause since you can't just restart the entire application without upsetting someone :)

Any new changes lately? Could help you pinpoint potential issues. Perhaps thread related. git bisect could help if you can have multiple devices running locally to try and catch the errors.

We have been with this issue for years - since it is so hard to reproduce, we never have a chance to figure it out the root-cause. However, both DSI_IRQHandler(void) and OSWrappers::waitForVSync() get called when it happens

Okay! Then it definitely sounds like the UI thread gets blocked on rare occasions. As discussed through email let's try to debug it when it happens.

/Martin