Main thread events blocked during 3 minutes, fence timeout

  • Hello,

    I am working in a Qt 5.6 multithreading application with armstone a9r2, build over buildroot V3.0.The application has up-to 5 threads.


    Since some days ago the application we are developing has a problem that seems related to graphics part (it appears randomly only if QLabel::SetPixmap or QPixmap.scaled are called at 2 times/second).

    Sometimes main thread gets blocked and don’t react to signal-slot events, but other threads continue working as expected.

    Ocasionally screen gets black or screen gets painted totally incorrect with a large triangle and random straight lines, only during a fraction of a second.

    After 3 minutes the main thread gets unblocked and continues to work properly.


    Maximum use of cpu time is 3%, so I think it cannot be a saturation of timer calls, too much painting objects, etc.


    In console I get several time this message:

    [ 1] Fence Wait TimeOut!

    [ 2] Reset Fence!

    [ 3] Fence Wait TimeOut!

    [ 4] Reset Fence!



    I am using EGLFS for graphics.

    When I run the application the command line are “Application -plugin tslib”

    and system variables:

    QT_QPA_EGLFS_DISABLE_INPUT=1

    QT_QPA_EGLFS_PHYSICAL_HEIGHT=130

    QT_QPA_EGLFS_PHYSICAL_WIDTH=216

    TSLIB_TSDEVICE=/dev/input/event0

    QT_QPA_EGLFS_FB=/dev/fb0


    I tried using “Application -platform minimum” without graphics, to see what happens. And the application does not get blocked at all after several hours.



    Could you help us to find a solution, please?


    Thanks

  • Hello,

    I don't know how your logic works or how you have organized the exercises whith the threads.

    As far as I know (what Qt sais..) the GUI should only run in the main thread (the first started one) and should only be manipulated from this thread.

    Maybe that could be an issue in your case?

    Yes Signals and Slots should be independent but I'm not sure what the intention of Qt is within multithreading context.


    In a small project I did, I connected via signal from another thread to a slot in the main thread. This slot was then updating the GUI.

    In this case I had no problems.


    Best Regards

    PH

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.