sebastian.f
17th July 2009, 08:35
Hello,
I have a very Very tricky bug in my Qt App.
In short, a Qt application on CE loads a DLL which exports a set of functions to create a QWidget.
The Qt application receives commands via a TCP socket from a desktop and does stuff accordingly like show widgets, send events etc.
The program works 100% fine.. about 25% of the time.
Sometimes when I load the program something goes wrong which has two symptoms:
1. The TCP socket stops recieveing data (or at the least doesnt emit any events)
2. The Qt widget created by the DLL doesn't redraw when the user interacts with it.
However, its not just a case of these two objects not working:
1. Though the TCP socket doesn't emit the readyRead() signal it is still capable of consistently sending sensible data to the desktop and does so as expected.
2. The created Qt Widget doesnt redraw but I can interact with it; I can change its value at it behaves as expected - I just can't see what its doing!
Another widget (QPushButton) created outside the DLL works fine.
Placing breakpoints in the DLL confirms that paintEvent() is never getting called when the problem occurs.
I have an application wide event filter and the behaviour of this indicates that the application is indeed processing events fine and not hanging or getting stuck in a loop or anything like that - eventHandler() triggers for all events, BUT it Doesn't trigger when the desktop pc sends data to the TCP socket, this is what leads me to believe it never receives it in the first place.
I can think of no reason for this behaviour; it appears to occur at random as soon as the QWidget is loaded - restart the app and somtimes it will work and the other times it will break.
Is there any way the paintEvent() or readyRead() signals could have been disconnected?
I have a very Very tricky bug in my Qt App.
In short, a Qt application on CE loads a DLL which exports a set of functions to create a QWidget.
The Qt application receives commands via a TCP socket from a desktop and does stuff accordingly like show widgets, send events etc.
The program works 100% fine.. about 25% of the time.
Sometimes when I load the program something goes wrong which has two symptoms:
1. The TCP socket stops recieveing data (or at the least doesnt emit any events)
2. The Qt widget created by the DLL doesn't redraw when the user interacts with it.
However, its not just a case of these two objects not working:
1. Though the TCP socket doesn't emit the readyRead() signal it is still capable of consistently sending sensible data to the desktop and does so as expected.
2. The created Qt Widget doesnt redraw but I can interact with it; I can change its value at it behaves as expected - I just can't see what its doing!
Another widget (QPushButton) created outside the DLL works fine.
Placing breakpoints in the DLL confirms that paintEvent() is never getting called when the problem occurs.
I have an application wide event filter and the behaviour of this indicates that the application is indeed processing events fine and not hanging or getting stuck in a loop or anything like that - eventHandler() triggers for all events, BUT it Doesn't trigger when the desktop pc sends data to the TCP socket, this is what leads me to believe it never receives it in the first place.
I can think of no reason for this behaviour; it appears to occur at random as soon as the QWidget is loaded - restart the app and somtimes it will work and the other times it will break.
Is there any way the paintEvent() or readyRead() signals could have been disconnected?