I'm opening this bug reported by Martin Berg on comp.lang.rexx.
He has a very large ooDialog application. In his orignal message he say he has 660 ooDialog elements and gets an access violation. If he only adds 560 elements he does not get the crash. (I am assuming by elements he means dialog controls, but I may be mis-interpreting what he says.)
He has provided, what I believe is a smaller program, that still produces the crash. Rony has reproduced the crash as have I.
What I see appears to be a classic race condition.
In a relase build, if I start and stop his application a number of times, I will get an access violation about every 4th or 5th time. Rony also reports that he has to start the application a number of times before he gets a crash.
However, if I build a debug version of the intepreter, I can no longer reproduce the crash. This is on my main system.
On another system, the application crashes every single time with a release build. With a debug build it crashes 4 out of 5 times.
Unhandled exception at 0x5d0bee91 in rexx.exe: 0xC0000005: Access violation reading location 0x00000170.
The crash is always on the same machine instruction
5D0BEE91 test byte ptr [esi+30h],4
This address is within comctl32.dll
The point of execution in ooRexx is:
if ((!dlgAdm->ChildDlg) || (!dlgAdm->AktChild))
-> return IsDialogMessage(dlgAdm->TheDlg, lpmsg);
This is line 974 of oovuser.c
At the time the statement executes, TheDlg is a valid handle to a dialog and lpmsg is a valid point to a valid message structure. IsDialogMessage is a Windows function and the ooDialog code is textbook example correct.
It is tempting to say the bug is Microsoft's, but it probably isn't. <grin>