1. TortoiseHg
  2. TortoiseHg
  3. thg
  4. Issues
Issue #2256 resolved

Crash on Shelve

created an issue

Shelved a lot of files ~500, this error message appeared.

Afterwards, all files were "on the right", and at the same time they all showed up "on the left" as deleted. I reverted the deleted status and currently assume the shelve hold the correct changes still.

** Mercurial version (2.3.2).  TortoiseHg version (2.5.1)
** Command: --nofork workbench
** CWD: V:\Development
** Encoding: cp1252
** Extensions loaded: hgsubversion, rebase
** Python version: 2.7.3 (default, Apr 10 2012, 23:24:47) [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.0 PyQt-4.9.1
Traceback (most recent call last):
  File "tortoisehg\hgqt\reporegistry.pyo", line 781, in repoChanged
  File "tortoisehg\hgqt\repotreemodel.pyo", line 354, in loadSubrepos
RuntimeError: underlying C/C++ object has been deleted

Somehow the paste didn't get displayed correctly, manually added some line breaks for easier reading.

Comments (6)

  1. Yuya Nishihara

    This happens because loadSubrepos invokes another event-loop with no guard for reentrancy.

    How to reproduce:

    1. insert slight delay in for-loop of loadSubrepos
    2. touch subreporoot/.hg/store/00changelog.i, which triggers repoChanged
    3. refresh repository list during repoChanged of 2

    Call tree:

                    RepoRegistryView.reloadModel  # by menu or modifiedSettings
                processEvents  # here self (= oldmodel) is deleted
                # bang!
  2. Log in to comment