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

Crash during automatic push after Merge Commit

James Jensen
created an issue

I have my repository set to push to the default repository (https on bitbucket) after commit. This works fine most of the time, but after I've merged two branches, the Workbench crashes. The merge, commit, and push all appear to have worked correctly, but I have to start up the Hg Workbench again.

Comments (10)

  1. James Jensen reporter

    I'm on 2.1.4, which I believe is still the latest version.

    I should also mention that this behavior occurs consistently for me every time I merge two branches if I have the repository set to push automatically afterward. I have not had any crashes in any other circumstance. Merging and then pushing manually causes no problems.

    Another detail which may or may not be relevant: While I do this, I have the project open in Visual Studio with the Visual Hg plugin installed.

  2. Lior Tal

    I have just tried this on my system (Windows 7 x64).

    Does this occur also when you're auto pushing into a local repository ? or only to BitBucket?

  3. Anonymous

    I haven't tried pushing to a local repository yet. I'll give it a shot when my vacation is over in January. For me and someone at my work, we've noticed the problem when pushing to a BitBucket repository over https.

  4. James Jensen reporter

    Lior Tal: I just tried auto-pushing to a local repository, and it crashed just like before. I'm now running Tortoise Hg v2.2.2, which I downloaded and installed this morning. Here's the debug information I've been able to glean:

    Unhandled exception at 0x67022316 in thgw.exe: 0xC0000005: Access violation reading location 0x0000000000000090.

    Call stack:

    QtCore4.dll!0000000067022316() 	
    [Frames below may be incorrect and/or missing, no symbols loaded for QtCore4.dll]	
    QtCore4.dll!0000000067025459() 	
    QtCore4.dll!0000000067025a67() 	
    msvcr90.dll!0000000072f42fdf() 	
    msvcr90.dll!0000000072f43080() 	
    kernel32.dll!0000000076d3652d() 	
    ntdll.dll!00000000772cc521() 	
    
  5. Wagner Bruna

    I was able to reproduce this on Linux, pushing to a local repository. I get "QThread: Destroyed while thread is still running" right before the hook messages.

    I believe the wizard dialog (and thus the Qt thread object) is being destroyed before the command thread finishes.

    BTW, as a workaround you can dismiss the commit window and commit the merge manually.

  6. Yuya Nishihara

    merge: do not close the wizard if a command is running (fixes #1338)

    The commit page detected completion simply by checking if the merge revision was already committed. But if a command were still running at that point (either a Mercurial commit hook or the autopush feature), the wizard would close too soon, causing a Qt crash (deleting the Qt thread object before its thread finished).

    f41f3ed08d0b

  7. Log in to comment