Yes the "labeled common variable has been freed" continues to live on in my application. This is I think the one bug that I haven't managed to get rid off. Although its now familiar I wouldn't mind being freed if it.
It occurs with a message of "$$$SYSPROG*CLOSE.WINDOW.OIWIN*,Line 1. The labeled common variable has been freed and is no longer valid" and is called from (stack) RUN_EVENT Line No 1 which is called from QMANAGER Line No 77 called for DIALOG_BOX Line No 1 then from my code that opens the dialog window. Error occurs when the dialog window is closed.
It only happens from time-to-time. There could be 100 or 100s of seemingly identical openings and closings of the window without problem, then one will crash.
I am under the impression that this "freed common" error occurs when an event returns to find that the window has closed and gone (along with common vars). In my case - am I right in assuming (from the error message) that it is the window CLOSE event that is generating the error. Wouldn't a CLOSE event always return to a window that has already gone?
I close this dialog with a CALL POST_EVENT(WinID,"CLOSE",1) near the end of my OK button code. I would have under stand that this will cause the close event to run after my OK button routine had already returned.
Can anyone see where I am going wrong on thisÂ….
Thanks in advance
PS OI version=7.22 (Single And Multi User) OS=WinXP
Kevin,
The POST_EVENT is going to occur at any point that the system is idle and not necessarily at the end of your OK button's code. Can you move the POST_EVENT to the end of your OK button's code and then replace it with a SEND_EVENT(window, "CLOSE")?
Sean
Surely using Send Event will cause the Freed common message always.
I have always user the call to Post Event in this way to avoid the Freed common message, although without the ,1 at the end.
Colin
Sounds as through my understanding is basically correct. Colin I will try it without the "1" on the close to see how it goes. Thanks