06-28-2005 06:10 AM
06-28-2005 09:28 AM
06-28-2005 11:46 AM
06-30-2005 01:26 PM
07-01-2005 10:52 AM
I tried to produce a much simplified application as well, in an attempt to simulate the problem without any hardware connections. The first thing I did was to eliminate the external physical network connection and generate simulated data locally, on the same computer that the suspect application runs on. This way I did not need to recompile the main app just yet. The problem disappeared.
It must be related to the timing of the CVI TCP callback mechanism - presumably every once in a while the network card/Windows TCP handler sub-system generates an interrupt at just the wrong time; maybe at some crucial point during the construction of the ring menu? Then the callbacks/threads/whatever get confused and voila - my original problem.
I am reluctant to make structural changes until I know for sure what is going wrong - the program is fine for 99% of the time and I am running out of time on the project! Any suggestions and/or advice would be welcome, but I am off on holiday now so it will be a while before I can try anything else. I'll try 7.1 when I get back.
Thanks.
JR
07-07-2005 10:49 AM
07-25-2005 06:14 AM
Just got back off holiday only to find the hardware has been shipped - it will be quite a while before I can get to try 7.1
Thanks for your efforts.
JR
07-25-2005 07:27 AM
Are you absolutely sure you need the ProcessSystemEvents() call in the timer callback? Have you tried the code without that call?
The ProcessSystemEvents() may cause a new timer event to be generated and executed whilst you are in the callback. So if you are absolutely sure you need ProcessSystemEvents(), you should code your timer callback in such a way that it is not re-entrant. One way is to use a static variable to indicate whether you are already in the callback, e.g. your timer callback could be structured as follows:
static int inTimerCallback = FALSE;
if (!inTimerCallback)
{
inTimerCallback = TRUE;
... Do stuff here...
ProcessSystemEvents();
... Do more stuff here...
inTimerCallback = FALSE;
}
return 0;
07-25-2005 11:14 AM
07-26-2005 08:31 AM