Out of memory in workbench when shelving lots of files.
Created originally on Bitbucket by barak-14 (Andre Webster)
I have a Win8 x64 machine with 12GB of RAM installed. I had added Boost to a project in it's source tree as a library a while ago but not used it, and decided to shelve the results to update to the latest version of the repo. After I pushed the >> button the shelve screen became non-responsive (white in windows and non-response in taskmanager). Using taskmanager the memory usage started to skyrocket to 100% - until Windows showed an error about low memory and asked if it could kill the thgw.exe process. (It was the only process showing over 1GB memory usage). I killed all my other apps and let the workbench run for another 30mins until the following bug report screen was displayed:
#!python
#!python
** Mercurial version (3.3.3). TortoiseHg version (3.3.3)
** Command:
** CWD: C:\Program Files\TortoiseHg
** Encoding: cp1252
** Extensions loaded: convert, extdiff, strip, mq, keyword, rebase, largefiles, graphlog, mercurial_keyring
** 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=2, build=9200, platform=2, service_pack='')
** Processor architecture: x64
** Qt-4.8.6 PyQt-4.11.3 QScintilla-2.8.4
Traceback (most recent call last):
File "tortoisehg\hgqt\shelve.pyo", line 448, in refreshCombos
File "tortoisehg\hgqt\shelve.pyo", line 468, in comboAChanged
File "tortoisehg\hgqt\chunks.pyo", line 452, in setContext
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 "mercurial\localrepo.pyo", line 64, in wrapper
File "hgext\largefiles\reposetup.pyo", line 144, in status
File "mercurial\localrepo.pyo", line 1572, in status
File "mercurial\context.pyo", line 312, in status
File "mercurial\context.pyo", line 1553, in _buildstatus
File "mercurial\context.pyo", line 101, in _buildstatus
File "mercurial\context.pyo", line 1498, in _manifestmatches
File "mercurial\manifest.pyo", line 22, in __setitem__
MemoryError
Traceback (most recent call last):
File "tortoisehg\hgqt\shelve.pyo", line 448, in refreshCombos
File "tortoisehg\hgqt\shelve.pyo", line 468, in comboAChanged
File "tortoisehg\hgqt\chunks.pyo", line 452, in setContext
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 "mercurial\localrepo.pyo", line 64, in wrapper
File "hgext\largefiles\reposetup.pyo", line 112, in status
File "hgext\largefiles\lfutil.pyo", line 128, in openlfdirstate
File "mercurial\dirstate.pyo", line 705, in walk
File "mercurial\util.pyo", line 450, in __get__
File "mercurial\dirstate.pyo", line 81, in _map
File "mercurial\dirstate.pyo", line 309, in _read
File "mercurial\scmutil.pyo", line 214, in read
MemoryError
Traceback (most recent call last):
File "tortoisehg\hgqt\shelve.pyo", line 448, in refreshCombos
File "tortoisehg\hgqt\shelve.pyo", line 468, in comboAChanged
File "tortoisehg\hgqt\chunks.pyo", line 452, in setContext
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 "mercurial\localrepo.pyo", line 64, in wrapper
File "hgext\largefiles\reposetup.pyo", line 144, in status
File "mercurial\localrepo.pyo", line 1572, in status
File "mercurial\context.pyo", line 312, in status
File "mercurial\context.pyo", line 1553, in _buildstatus
File "mercurial\context.pyo", line 101, in _buildstatus
File "mercurial\context.pyo", line 1498, in _manifestmatches
File "mercurial\manifest.pyo", line 22, in __setitem__
MemoryError
Traceback (most recent call last):
File "tortoisehg\hgqt\shelve.pyo", line 448, in refreshCombos
File "tortoisehg\hgqt\shelve.pyo", line 468, in comboAChanged
File "tortoisehg\hgqt\chunks.pyo", line 452, in setContext
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 "mercurial\localrepo.pyo", line 64, in wrapper
File "hgext\largefiles\reposetup.pyo", line 144, in status
File "mercurial\localrepo.pyo", line 1572, in status
File "mercurial\context.pyo", line 312, in status
File "mercurial\context.pyo", line 1553, in _buildstatus
File "mercurial\context.pyo", line 101, in _buildstatus
File "mercurial\context.pyo", line 1498, in _manifestmatches
File "mercurial\manifest.pyo", line 22, in __setitem__
MemoryError
Traceback (most recent call last):
File "tortoisehg\hgqt\shelve.pyo", line 228, in moveFilesRight
File "tortoisehg\hgqt\chunks.pyo", line 420, in getChunksForFile
File "mercurial\patch.pyo", line 1666, in diff
File "mercurial\copies.pyo", line 209, in pathcopies
File "mercurial\copies.pyo", line 191, in _backwardrenames
File "mercurial\copies.pyo", line 170, in _forwardcopies
MemoryError
In this instance the number of files was very large (+7000) but I have had similar behaviour with only 50+ files changed, and a colleague with Win7 x64 also had this issue where system memory hit 99% with it all allocated to the workbench.