title: "Invalid Binding Handle" while debugging
body: <p>I've assembled my new PC yesterday, and I've decided to give Windows 8 a try. However, today, during the debugging of moderate Qt application, debugger yielded "Invalid Binding Handle" error message on a pretty simple line (it was line that is auto-generated by Qt's moc.exe: </p>
  
  <pre><code> // QWebView *view (...)
   view-&gt;setUrl(QUrl(QString::fromUtf8("about:blank")));
   // Failing in setUrl call, not in QUrl constructor, or in fromUtf8 function.
  </code></pre>
  
  <p>However, running this application without debugger works just fine, both in Release and Debug versions.</p>
  
  <p>I've got some clues on the internet to enable Terminal Services, but it seems that there is no such service in Windows 8. </p>
  
  <p>Does anybody have any clue what should I check?  </p>
  
  <p><strong>Edit</strong></p>
  
  <p>Moving the widget into other application yielded no error, so apparently, widget (which is pretty small - just <code>QWebView</code> and <code>QProgressBar</code>) is fine. But, when I show this widget in my main function:</p>
  
  <pre><code>QApplication app(argc, argv);
  MyWidget w;
  w.show();
  return app.exec();
  </code></pre>
  
  <p>it is still failing with the same error. Examining call stack (which is not very helpful when error appear) and stepping into function calls, I've tracked error down to <code>retval = HeapFree(_crtheap, 0, pBlock);</code> in function <code>_free_base</code>, in file <code>free.c</code> And it seems that function is called from <code>dbgdel.cpp</code>, function <code>_free_dbg( pUserData, pHead-&gt;nBlockUse );</code> and it is called from <code>unlock()</code> function.</p>
  
  <p>Attaching the debugger to already active process is still yielding the same error.</p>
  
  <p>I am linking a lot of 3rd party libraries here, so I will try without them, as I'm run out of ideas...</p>
  
  <p><strong>Edit 2:</strong></p>
  
  <p>If I pass this exception to the program, it seems to be running fine.</p>
  
  <p><strong>Edit 3</strong></p>
  
  <p>Commenting setUrl line raises the same exception somewhere in <code>QWebKit</code>, where <code>strdup</code> function is called...</p>