The window is set as Dialog
Hmm, I've encountered this before, I'm just having a hard time remembering what we did to fix the issue. On your Canvas object, do you have the Window property set to your modal window and on your window object, to you have the Primary Canvas property set to your modal canvas? The only other property I can think of is the Canvas Raise on Entry, which defaults to 'NO'. Try changing this to 'Yes.'
Hope this helps.
I have faced the same problem once on 11g. The symptom was the same as with you. Beside that the form also got frozen. Meaning there was no way one could continue to navigate on form. It all seemed as the focus would go to dialog window but the window was not visible. As with my case there was no particular reason to use Dialog window style so I changed it to Document. If I remember correctly the problem was when I used multiple forms at once (sequentially calling new form).
Thanks CraigB and GregorM for your reply. I manage to solve the problem by splitting the code. I moved the code that I wanted to execute after the display of window into when-button-pressed trigger for the OK button on modal window.