Crash with "stat() argument 1 must be encoded string without NULL bytes"
This happened while the thg window was apparently idle in the background, as far as I remember. I was surprised by finding the "TortoiseHg Bug Report" window even though I hadn't used the thg window for a while.
The tracebacks reference dragEnterEvent in tortoisehg\hgqt\workbench.pyo so I would speculate that I somehow accidentally dragged a file or directory into the thg window.
This is an older version, but the referenced parts of tortoisehg\hgqt\workbench.pyo (dragEnterEvent, find_root) and tortoisehg\util\paths.pyo (find_root) don't seem to have changed since then. (I determined that from briefly comparing the 2.2.2 tag's date with the date from commits from the annotation; I might be mistaken here in some way.)
#325 (closed) and #988 (closed) seem similar to this, but respectively reference other callers in their tracebacks.
(I slightly modified the CWD line of the below; this seems likely to be irrelevant.)
{{{ #!python ** Mercurial version (2.0.2). TortoiseHg version (2.2.2) ** Command: -R prim ** CWD: D:\Coding\Projects[redacted]\prim ** Encoding: cp1252 ** Extensions loaded: record, fold, mq, transplant, eol, fetch, graphlog, children, churn, hgk, convert, purge, hgsubversion, rebase, patchbomb, hggit ** Python version: 2.6.6 (r266:84297, Aug 24 2010, 18:46:32) [MSC v.1500 32 bit (Intel)] ** Windows version: (5, 1, 2600, 2, 'Service Pack 3') ** Processor architecture: x86 ** Qt-4.7.4 PyQt-4.8.6 Traceback (most recent call last): File "tortoisehg\hgqt\workbench.pyo", line 523, in dragEnterEvent File "tortoisehg\hgqt\workbench.pyo", line 518, in find_root File "tortoisehg\util\paths.pyo", line 17, in find_root File "genericpath.pyo", line 41, in isdir TypeError: stat() argument 1 must be encoded string without NULL bytes, not str Traceback (most recent call last): File "tortoisehg\hgqt\workbench.pyo", line 523, in dragEnterEvent File "tortoisehg\hgqt\workbench.pyo", line 518, in find_root File "tortoisehg\util\paths.pyo", line 17, in find_root File "genericpath.pyo", line 41, in isdir TypeError: stat() argument 1 must be encoded string without NULL bytes, not str
}}}