Message box runs its own event loop, so the chances are an event is happening in your event loop, you are creating message box and then getting another event and creating another message box, etc, as you can receive new events even if you are displaying message box.