dlg.AskQuestion()

Stupid mistake but bit if an empty sting is passed into the buttons variable a prompt with no method of exit happens.