facebook / watchman

Watches files and records, or triggers actions, when they change.
https://facebook.github.io/watchman/
MIT License
12.73k stars 991 forks source link

hgwatchman crash on Windows x64 using TortoiseHG #155

Closed ziriax closed 9 years ago

ziriax commented 9 years ago

I started testing watchman on Windows.

I worked fine initially, but after a while (after trying to rebase), I had a crash:

#!python
** Mercurial version (3.5.1).  TortoiseHg version (3.5.1)
** Command: 
** CWD: C:\Windows\system32
** Encoding: cp1252
** Extensions loaded: histedit, mercurial_keyring, purge, rebase, shelve, strip, win32lfn, hgwatchman
** Python version: 2.7.9 (default, Dec 10 2014, 12:28:03) [MSC v.1500 64 bit (AMD64)]
** Windows version: sys.getwindowsversion(major=6, minor=1, build=7601, platform=2, service_pack='Service Pack 1')
** Processor architecture: x64
** Qt-4.8.6 PyQt-4.11.3 QScintilla-2.8.4
Traceback (most recent call last):
  File "tortoisehg\hgqt\repowidget.pyo", line 747, in onRevisionSelected
  File "tortoisehg\hgqt\revdetails.pyo", line 272, in onRevisionSelected
  File "tortoisehg\hgqt\revdetails.pyo", line 284, in _setContextToFileList
  File "tortoisehg\hgqt\manifestmodel.pyo", line 279, in setRawContext
  File "tortoisehg\hgqt\manifestmodel.pyo", line 267, in setRev
  File "tortoisehg\hgqt\manifestmodel.pyo", line 378, in _repopulateNodes
  File "tortoisehg\hgqt\manifestmodel.pyo", line 406, in _populateNodes
  File "tortoisehg\hgqt\manifestmodel.pyo", line 585, in _populaterepo
  File "c:/dev/3rdParty/hgwatchman\hgwatchman\__init__.py", line 431, in status
  File "c:/dev/3rdParty/hgwatchman\hgwatchman\__init__.py", line 314, in overridestatus
  File "mercurial\localrepo.pyo", line 1696, in status
  File "mercurial\context.pyo", line 324, in status
  File "mercurial\context.pyo", line 1592, in _buildstatus
  File "mercurial\context.pyo", line 1561, in _dirstatestatus
  File "mercurial\dirstate.pyo", line 966, in status
  File "c:/dev/3rdParty/hgwatchman\hgwatchman\__init__.py", line 365, in walk
  File "c:/dev/3rdParty/hgwatchman\hgwatchman\__init__.py", line 159, in overridewalk
  File "c:/dev/3rdParty/hgwatchman\hgwatchman\client.py", line 79, in command
  File "c:/dev/3rdParty/hgwatchman\hgwatchman\client.py", line 68, in _command
  File "c:/dev/3rdParty/hgwatchman\hgwatchman\pywatchman\__init__.py", line 372, in query
  File "c:/dev/3rdParty/hgwatchman\hgwatchman\pywatchman\__init__.py", line 247, in send
  File "c:/dev/3rdParty/hgwatchman\hgwatchman\pywatchman\__init__.py", line 155, in write
OSError: [Errno 22] Invalid argument
wez commented 9 years ago

Can you locate the Watchman log file and put it up in a gist?

I'm not at a windows system at the moment so can't verify the exact path, but it should be in your %TEMP% dir; https://facebook.github.io/watchman/docs/troubleshooting.html#where-are-the-logs is up to date for unix systems but not windows systems; the concepts are the same. I think you want to look at %TEMP%\.watchman.USER.log where USER is your windows username.

ziriax commented 9 years ago

I'm so sorry but my IT support reinstalled my PC last week, so I don't have the log anymore.

If the crash occurs again, I'll provide the log

wez commented 9 years ago

OK, I'll close this out for now; please re-open if it happens again!

ziriax commented 9 years ago

So far it did not crash again. Too bad that TortoiseHG spends most of its time in updating the UI; even though "hg status" now returns instantaneously, it still takes 3 seconds for TortoiseHG. That is 2 seconds less than without watchman, but still slow :-)