1. TortoiseHg
  2. TortoiseHg
  3. thg
  4. Issues
Issue #2071 closed

crash when pushing with mercurial_keyring

Gurce Isikyildiz
created an issue

Hi,

I'm on OpenSuse11.4+KDE, using thg-2.4.2. I managed to install the mercurial_keyring add-on, and it pushes fine from the command-line via kde-wallet, but when I try pushing from within thg, it crashes.

It reminds me of a similar issue mentioned at: https://bitbucket.org/tortoisehg/hgtk/issue/1437/gui-freeze-on-suse-linux-after-using

I pondered grafting the patch mentioned there into "backend.py", but it seems as though code similar to that suggested is already in there in the latest keyring code.

There is similar looking error output at the console as was mentioned in that thread too:

{{{

!python

QPixmap: It is not safe to use pixmaps outside the GUI thread QPixmap: It is not safe to use pixmaps outside the GUI thread QPixmap: It is not safe to use pixmaps outside the GUI thread QPixmap: It is not safe to use pixmaps outside the GUI thread QPixmap: It is not safe to use pixmaps outside the GUI thread QPixmap: It is not safe to use pixmaps outside the GUI thread QPixmap: It is not safe to use pixmaps outside the GUI thread }}}

I don't know a great deal about python, but I did my best to google around for how to get some sort of trace info.

Via the method mentioned here (which seems to produce a lot of output!): http://stackoverflow.com/questions/2663841/python-tracing-a-segmentation-fault

I managed to capture the activity towards the point of the crash:

line, /home/gurce/tortoisehg-2.4.2/tortoisehg/hgqt/repoview.py:330 line, /home/gurce/tortoisehg-2.4.2/tortoisehg/hgqt/repoview.py:337 QPixmap: It is not safe to use pixmaps outside the GUI thread QPixmap: It is not safe to use pixmaps outside the GUI thread return, /home/gurce/tortoisehg-2.4.2/tortoisehg/hgqt/repoview.py:337

Thanks for any help on this.

Comments (7)

  1. Gurce Isikyildiz reporter

    oops, forgot to put that last bit inside the code tag (and couldn't find an 'edit' option here:() So here it is again, I'll add a few more lines, since I've got more space in a new post:

    line, /usr/lib/python2.7/site-packages/mercurial/context.py:28
    return, /usr/lib/python2.7/site-packages/mercurial/context.py:28
    return, /usr/lib/python2.7/site-packages/mercurial/localrepo.py:235
    line, /home/gurce/tortoisehg-2.4.2/tortoisehg/hgqt/thgrepo.py:306
    QPixmap: It is not safe to use pixmaps outside the GUI thread
    call, /home/gurce/tortoisehg-2.4.2/tortoisehg/hgqt/thgrepo.py:588
    line, /home/gurce/tortoisehg-2.4.2/tortoisehg/hgqt/thgrepo.py:590
    line, /home/gurce/tortoisehg-2.4.2/tortoisehg/hgqt/thgrepo.py:591
    line, /home/gurce/tortoisehg-2.4.2/tortoisehg/hgqt/thgrepo.py:592
    return, /home/gurce/tortoisehg-2.4.2/tortoisehg/hgqt/thgrepo.py:592
    line, /home/gurce/tortoisehg-2.4.2/tortoisehg/hgqt/thgrepo.py:307
    return, /home/gurce/tortoisehg-2.4.2/tortoisehg/hgqt/thgrepo.py:307
    return, /usr/lib/python2.7/site-packages/mercurial/localrepo.py:630
    line, /home/gurce/tortoisehg-2.4.2/tortoisehg/hgqt/repomodel.py:528
    line, /home/gurce/tortoisehg-2.4.2/tortoisehg/hgqt/repomodel.py:529
    call, /home/gurce/tortoisehg-2.4.2/tortoisehg/hgqt/thgrepo.py:633
    line, /home/gurce/tortoisehg-2.4.2/tortoisehg/hgqt/thgrepo.py:634
    return, /home/gurce/tortoisehg-2.4.2/tortoisehg/hgqt/thgrepo.py:634
    line, /home/gurce/tortoisehg-2.4.2/tortoisehg/hgqt/repomodel.py:531
    line, /home/gurce/tortoisehg-2.4.2/tortoisehg/hgqt/repomodel.py:533
    line, /home/gurce/tortoisehg-2.4.2/tortoisehg/hgqt/repomodel.py:534
    return, /home/gurce/tortoisehg-2.4.2/tortoisehg/hgqt/repomodel.py:534
    QPixmap: It is not safe to use pixmaps outside the GUI thread
    call, /home/gurce/tortoisehg-2.4.2/tortoisehg/hgqt/repoview.py:329
    QPixmap: It is not safe to use pixmaps outside the GUI thread
    line, /home/gurce/tortoisehg-2.4.2/tortoisehg/hgqt/repoview.py:330
    line, /home/gurce/tortoisehg-2.4.2/tortoisehg/hgqt/repoview.py:337
    QPixmap: It is not safe to use pixmaps outside the GUI thread
    QPixmap: It is not safe to use pixmaps outside the GUI thread
    return, /home/gurce/tortoisehg-2.4.2/tortoisehg/hgqt/repoview.py:337
    
  2. Gurce Isikyildiz reporter

    For what it's worth, I also tried another method mentioned online, of getting the backtrace via gdb with:

    • gdb python
    • thg --debugger --nofork
    • c (to continue)
    • back (to see the run-time backtrace)

    Upon the crash, I see the following backtrace:

    #0  0xb5f9fce6 in ?? () from /usr/lib/libQtGui.so.4
    #1  0xb5f4b0ec in QWidgetPrivate::setWindowIcon_sys(bool) () from /usr/lib/libQtGui.so.4
    #2  0xb5ef43af in QWidget::create(unsigned long, bool, bool) () from /usr/lib/libQtGui.so.4
    #3  0xb5ef4e03 in QWidgetPrivate::createWinId(unsigned long) () from /usr/lib/libQtGui.so.4
    #4  0xb5efea79 in QWidget::winId() const () from /usr/lib/libQtGui.so.4
    #5  0xb6d067bd in ?? () from /usr/lib/python2.7/site-packages/PyQt4/QtGui.so
    #6  0xb7ecf781 in PyCFunction_Call () from /usr/lib/libpython2.7.so.1.0
    #7  0xb7edf345 in PyEval_EvalFrameEx () from /usr/lib/libpython2.7.so.1.0
    
  3. Steve Borho

    Yuck, we would essentially need to implement our own keyring extension and forward the requests to the UI thread.

    Maybe this will be somewhat feasible after the keyring extension is merged into core, which is in progress (albietly slowly)

  4. Yuya Nishihara

    cmdcore: add worker to run command in separate command-server process

    Currently it can run repository commands with no user interaction.

    Known issues:

    • ui.interactive is off for now (will be implemented soon)
    • progress won't be cleared on abort due to lack of final pos=None messages
    • command-server process isn't shut down cleanly when repository closed
    • command-server won't reload settings (need to restart on configChanged)
    • "hg clone" will fail if cwd has no repository
    • "ui.error" label isn't available
    • MQ status may corrupt if changed by another process because command-server does not invalidate repo.mq (fixed by hg e3d1df48fcc6)

    CmdThread will eventually be superseded by CmdServer:

    • TortoiseHg 3.0 will provide the experimental command-server client, which can be enabled by thg --config tortoisehg.cmdworker=server
    • 3.1 will use "server" by default
    • 3.2 will remove CmdThread completely

    refs #1507, #1661, #2071, #2614, #3343, #3370, #3637

    → <<cset d02cfaed8676>>

  5. Yuya Nishihara

    cmdcore: enable command-server client by default in 3.1

    As I said in d02cfaed8676, CmdThread will be removed in 3.2.

    refs #1507 - "Stop button for pull hangs" should be fixed on Unix, but not on Windows due to the limitation of winsock.

    refs #3381 - "Locked folders/files on Windows" is partially solved since Mercurial commands are run in separate chdir-ed process.

    closes #484, #1661, #2071, #2614, #3343, #3370, #3637, #3670

    → <<cset 38985e4f9bd0>>

  6. Log in to comment