Runtime Error (aka segfault) when using a checkout over bzr+ssh

Bug #430232 reported by John A Meinel
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar Explorer
Invalid
Critical
Unassigned
Bazaar Windows Installers
Fix Released
Critical
Alexander Belchenko
QBzr
Fix Released
Critical
John A Meinel

Bug Description

I'm getting a critical failure when doing just about anything with a lightweight checkout using bzr explorer 0.8 (bzr 2.0rc2-1)

It seems to happen when doing something as simple as F5 while looking at the working tree.

Related branches

John A Meinel (jameinel)
Changed in bzr-explorer:
importance: Undecided → Critical
status: New → Confirmed
Revision history for this message
John A Meinel (jameinel) wrote :

As near as I can tell this is a packaging issue, and is only being triggered on XP.

I have been unable to reproduce it on my Vista laptop. But it happened *consistently* across all of the XP laptops here at Wavesat.

Changed in bzr:
assignee: nobody → John A Meinel (jameinel)
importance: Undecided → Critical
milestone: none → 2.0
status: New → Confirmed
Revision history for this message
John A Meinel (jameinel) wrote :

I just reproduced this on my Vista machine.

It happens when you select "Commit" from the working tree status page. But not when you just preview the status.

Revision history for this message
John A Meinel (jameinel) wrote :

Note that when running from source, the "commit" action just silently does nothing. But when run from the installer, it generates a traceback. I'm hoping the issue can be resolved with the "does nothing" being debugged.

Revision history for this message
John A Meinel (jameinel) wrote :

I'm beginning to think that this is actually a bug in qbzr. Specifically, I turned on diagnostic mode, and I see that it gets to the point to say: "running: bzr qcommit --ui-mode"

If I then try to run this command manually while sitting in the checkout, I get:
Connected (version 2.0, client OpenSSH_5.1p1)
Authentication (publickey) failed.
QWidget: Must construct a QApplication before a QPaintDevice

I'm wondering if it isn't trying to open the branch before it actually finishes initializing the rest of the application, and then trying to pop up the Password prompt dialog, which then fails completely because the QApp isn't initialized.

And on the packaged version, rather than giving the error: Must construct a QApplication before a QPaintDevice
it just segfaults.

Changed in qbzr:
importance: Undecided → Critical
milestone: none → 0.14.2
status: New → Confirmed
Revision history for this message
John A Meinel (jameinel) wrote :

So I've confirmed it is a bug in qbzr. I'm uploading a fix for it now.

However, I'm also noticing that this is a latent bug in a bunch of other locations. Like "qmerge" is going to have the same problem.
=== modified file 'lib/commands.py'
--- lib/commands.py 2009-08-31 09:36:23 +0000
+++ lib/commands.py 2009-09-15 21:56:43 +0000
@@ -341,10 +341,10 @@
     aliases = ['qci']

     def _qbzr_run(self, selected_list=None, message=None, local=False, ui_mode=False):
+ application = QtGui.QApplication(sys.argv)
         tree, selected_list = builtins.tree_files(selected_list)
         if selected_list == ['']:
             selected_list = []
- application = QtGui.QApplication(sys.argv)
         self.main_window = CommitWindow(tree, selected_list, dialog=False,
             message=message, local=local, ui_mode=ui_mode)
         self.main_window.show()

The basic issue is that opening a branch will potentially try to open a dialog to prompt a user for their password, and this is happening *before* the application is created.

I think what we need is to move the "app = QtGui.QApplication" up into the QBzrCommand code, rather than having every qbzr command do it manually.

Revision history for this message
John A Meinel (jameinel) wrote :

I'm not sure whether 'fix-released' or Fix Committed is relevant here, but a fix is in the qbzr 0.14 and trunk branches.

Changed in qbzr:
assignee: nobody → John A Meinel (jameinel)
status: Confirmed → Fix Committed
affects: bzr → bzr-windows-installers
Changed in bzr-windows-installers:
milestone: 2.0 → none
Revision history for this message
John A Meinel (jameinel) wrote :

was a bug in qbzr

Changed in bzr-explorer:
status: Confirmed → Invalid
John A Meinel (jameinel)
Changed in bzr-windows-installers:
milestone: none → 2.0.0
Revision history for this message
Ian Clatworthy (ian-clatworthy) wrote :

I don't believe anything needs to change here in explorer. The bug was in the QBzr layer. I've checked explorer and the commands for its custom dialogs and they all look ok to me.

Revision history for this message
John A Meinel (jameinel) wrote : Re: [Bug 430232] Re: Runtime Error (aka segfault) when using a checkout over bzr+ssh

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ian Clatworthy wrote:
> I don't believe anything needs to change here in explorer. The bug was
> in the QBzr layer. I've checked explorer and the commands for its custom
> dialogs and they all look ok to me.
>

Agreed. I think I tried to mark it as invalid in bzr-explorer.

John
=:->

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkqwTF8ACgkQJdeBCYSNAAPt5gCgnVcT4NVqwWdL3ivi7Tm5RfCo
QAwAoL2S7++kneqdJrSgmY9DWJyH0aVo
=q0uR
-----END PGP SIGNATURE-----

Revision history for this message
Alexander Belchenko (bialix) wrote :

John, Ian:

am I understand correctly that windows-installer scripts should be updated to bundle 0.8.1 release of bzr-explorer to solve this issue?

Revision history for this message
Alexander Belchenko (bialix) wrote :

Err. It was fixed in QBzr 0.14.2. So my question should be read as: am I understand correctly that windows-installer scripts should be updated to bundle 0.14.2 release of qbzr to solve this issue?

Revision history for this message
Alexander Belchenko (bialix) wrote :

I've updated buildout.cfg in my branch to use qbzr 0.14.2 and explorer 0.8.1:
https://code.launchpad.net/~bialix/bzr-windows-installers/trunk

qbzr 0.14.2 release is tagged.

Changed in qbzr:
status: Fix Committed → Fix Released
Changed in bzr-windows-installers:
status: Confirmed → Fix Committed
assignee: John A Meinel (jameinel) → Alexander Belchenko (bialix)
Revision history for this message
John A Meinel (jameinel) wrote :

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Alexander Belchenko wrote:
> I've updated buildout.cfg in my branch to use qbzr 0.14.2 and explorer 0.8.1:
> https://code.launchpad.net/~bialix/bzr-windows-installers/trunk
>
> qbzr 0.14.2 release is tagged.
>
> ** Changed in: qbzr
> Status: Fix Committed => Fix Released
>
> ** Changed in: bzr-windows-installers
> Status: Confirmed => Fix Committed
>
> ** Changed in: bzr-windows-installers
> Assignee: John A Meinel (jameinel) => Alexander Belchenko (bialix)
>

You are correct

  affects bzr-windows-installers
  status fixreleased

It should be in the 2.0.0rc2-2 installer, but also in the 2.0.0rc2-3
installer just uploaded. (Which also has the bzr explorer shortcut, etc
fixes.)

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkqxZOMACgkQJdeBCYSNAAPslwCdHRrEBiywuFLDQzsI+REedQ+8
YFoAn15BNE4r4wnRgsrfugl8o3MdHaDZ
=4Awk
-----END PGP SIGNATURE-----

Changed in bzr-windows-installers:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.