This question was quickly and quite undeservedly down-voted and closed as "not a real question" because a few power users interpreted "how can I track down where a seemingly random, hard to reproduce freeze occurs" as "what's wrong with the code that I didn't post."
This is just extremely irritating. The question was absolutely clear and is certainly answerable. In fact, by the time the question was closed it had an accepted answer that the OP had verified as solving his problem!
So, can we please get this question reopened? Keeping it closed discourages users with similar issues from looking at the question and answers, and sends the message that this is an ambiguous question, which it's not. The closure also sends the message that the only appropriate questions for Stack Overflow are questions with broken code attached, which is completely wrong.