Testapplication with processEvents stalls under valgrind



  • 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?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.