Try debugging your program. Set some breakpoints and see where it loops infinitly.

What the #@* is this?
Qt Code:
  1. return (void)NULL;
To copy to clipboard, switch view to plain text mode 

By the way: asking the same question on multiple forums is considered rude by me.