Often this problem is caused by not taking order of program flow into consideration.
Make sure that you set up your observer fully, including adding all listeners and starting any and all processes before setting the dialog visible. If you do any of this after showing the dialog, it will be blocked until the dialog returns.
For more specific help, consider creating and posting a minimal example program.