If your code is as you wrote, there is no issue with that call. I might suggest looking at your threading model. Do you have a working
thread or a thread pool that is doing asynchronous work that generates this dialog? If so, that may be where your problem lies.
What exactly do you mean "Hung up" GUI?