title: QMutex::lock: Deadlock detected in thread 0xfe8(Main Thread ?)
body: <p>I am running my Program in GDB. My Program needs to create 16 threads for its work. and all these works fine. at the end I get the Error <code>QMutex::lock: Deadlock detected in thread 0xfe8</code>
  here is the GDB Output</p>
  
  <pre><code>(gdb) run
  Starting program: C:\dgrfb.run\client/DGRFB.exe
  [New thread 4076.0xfe8]
  [New thread 4076.0x368]
  warning: &gt;&gt; Socket State Changed:  QAbstractSocket::HostLookupState
  warning: &gt;&gt; Socket State Changed:  QAbstractSocket::ConnectingState
  [New thread 4076.0x4b8]
  warning: &gt;&gt; Socket State Changed:  QAbstractSocket::ConnectedState
  [New thread 4076.0x49c]
  warning: Rect Area 0 2 DG::UpdateThread(0xa0d5220)
  warning: Rect Area 0 3 DG::UpdateThread(0xa0d5548)
  warning: Rect Area 1 0 DG::UpdateThread(0xa0d5870)
  warning: Rect Area 1 1 DG::UpdateThread(0xa0d5b98)
  warning: Rect Area 1 2 DG::UpdateThread(0xa0d5ec0)
  warning: Rect Area 1 3 DG::UpdateThread(0xa0d61e8)
  warning: Rect Area 2 0 DG::UpdateThread(0xa0d6510)
  warning: Rect Area 2 1 DG::UpdateThread(0xa0d6838)
  warning: Rect Area 2 2 DG::UpdateThread(0xa0d6b60)
  warning: Rect Area 2 3 DG::UpdateThread(0xa0d6e88)
  [New thread 4076.0x540]
  warning: Rect Area 3 0 DG::UpdateThread(0xa0d71b0)
  warning: Rect Area 3 1 DG::UpdateThread(0xa0d7568)
  warning: Rect Area 3 2 DG::UpdateThread(0xa0d7cc0)
  warning: Rect Area 3 3 DG::UpdateThread(0xa0d7fe8)
  [New thread 4076.0x670]
  [New thread 4076.0x6dc]
  [New thread 4076.0x674]
  [New thread 4076.0x3ac]
  [New thread 4076.0x684]
  [New thread 4076.0x434]
  [New thread 4076.0x44c]
  [New thread 4076.0x7e8]
  [New thread 4076.0x408]
  [New thread 4076.0x7e0]
  [New thread 4076.0x42c]
  [New thread 4076.0x814]
  [New thread 4076.0x6f8]
  [New thread 4076.0x8a4]
  warning: QThread(0x3d58d8) tick
  warning: Rect #  0 0 100 56
  warning:                 Unmatched true
  warning:                 Updating  0 0
  warning: QMutex::lock: Deadlock detected in thread 0xfe8
  </code></pre>
  
  <p>Now Which thread <code>0xfe8</code> is ? Is it the Main Thread ?
  First I thought I've called the same <code>mutex.lock()</code> twice. or <code>func_a()</code> and <code>func_b()</code> are using the same mutex. thats causing the deadlock. But Not found any of such scenario.So Wheare to startthe investigation ?</p>