Guest_imported
New member
- Jan 1, 1970
- 0
Hello all,
I have the following problem:
I am using VB5, Professional Edition.
There is a timer (interval of about .5 sec) on the form, which is always active (displays some tooltips, but this is not relevant). When I close the program, sometimes (not always though) I got a crash due to the fact that timer did not expire and it's associated code was still executing after or while I unloaded the main form (form tried to re-load again as I am referencing it, or some of it's controls, inside Timer code).
I tried to disable the timer or change it's Interval to a very long value in Form_Unload event (to allow the form to unload safely) but it still happens, especially on slow machines. Using flags in timer event and checking them in a waiting loop when I unload the form, did not work either. Now it's harder to reproduce the bug but sometimes it still happens.
This is related to parallel processing, I need a way to know
that program pointer is not in the Timer event any more.
Thanks in advance for any suggestions,
MR - programmer
I have the following problem:
I am using VB5, Professional Edition.
There is a timer (interval of about .5 sec) on the form, which is always active (displays some tooltips, but this is not relevant). When I close the program, sometimes (not always though) I got a crash due to the fact that timer did not expire and it's associated code was still executing after or while I unloaded the main form (form tried to re-load again as I am referencing it, or some of it's controls, inside Timer code).
I tried to disable the timer or change it's Interval to a very long value in Form_Unload event (to allow the form to unload safely) but it still happens, especially on slow machines. Using flags in timer event and checking them in a waiting loop when I unload the form, did not work either. Now it's harder to reproduce the bug but sometimes it still happens.
This is related to parallel processing, I need a way to know
that program pointer is not in the Timer event any more.
Thanks in advance for any suggestions,
MR - programmer