Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Testapplication with processEvents stalls under valgrind
Qt 6.11 is out! See what's new in the release blog

Testapplication with processEvents stalls under valgrind

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 574 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    swegmann
    wrote on last edited by
    #1

    I have a test application that is running some unit tests on a Qt class that internally uses QThread. Since this class under test talks to a TestDummy class in another thread I understood that I needed a QCoreApplication instance and needed to make sure to call processEvents(). I currently call it once wihtout parameters and then once more with QEventLoop::WaitForMoreEvents.

    Now I noticed that the test application runs nicely under Linux and Windows but when I run it with valgrind under Linux it just stalls, i.e. does not finish until I hit Ctrl-C. I tried running valgrind+gdb+my test application but then it doesn't stall :-(

    I could fix the valgrind issue by using the WaitForMoreEvents with a timeout. But now the test cases in the Windows and Linux versions fail because they don't receive certain expected events from the QThread.

    Does anyone have an idea where this issue could come from? Is there a workable solution that fixes Windows, Linux, Linux+valgrind in one go?

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved