Bazaar Explorer crashes with [Errno 9] Bad file descriptor

Bug #556992 reported by Alexey Chabunin
36
This bug affects 6 people
Affects Status Importance Assigned to Milestone
Bazaar Explorer
Invalid
Undecided
Unassigned
TortoiseBZR
Fix Released
Medium
Unassigned

Bug Description

Setup: Windows 7, bzr 2.1.1, Bazaar Explorer 1.0.1
Summary: If Bazaar Explorer is opened via right-click within a child branch (a brach that has a parent), it produces an error message when closing. It doesn't happen if Explorer is opened via 'bzr explorer'.
How to recreate a problem:
1. Create a standalone branch: bzr init parent
2. Create a child branch: bzr branch parent child
3. Go to child folder in Windows Explorer, right-click on blank space, select Bazaar Explorer (no console window displayed). It correctly opens a child branch.
4. Close Bazaar Explorer. It gives an error message: "bzr: Error: [Errno 9] Bad file descriptor"
Relevant part of bzr.log:
--------------------------------
Wed 2010-04-07 11:39:34 +1000

0.078 looking for plugins in C:/Users/alexey/AppData/Roaming/bazaar/2.0/plugins
0.078 looking for plugins in C:/Program Files/Bazaar/plugins
1.445 loading explorer extensions for clothes ['Bazaar support', 'Register on Launchpad']
1.608 opening working tree 'D:/t/child'
1.621 Returning RevisionSpec RevisionSpec_submit for submit:
[ 5084] 2010-04-07 11:39:35.786 INFO: Using parent branch file:///D:/t/parent/
1.631 check paths: None
3.307 Traceback (most recent call last):
  File "_dirstate_helpers_pyx.pyx", line 1852, in bzrlib._dirstate_helpers_pyx._loop_one_block
StopIteration
-------------------------------

However, if I open Explorer via desktop link or 'bzr explorer' (console window will be visible) and navigate to the same branch, there is no error when closing. In this case bzr.log will look like this:

---------------------------------
Wed 2010-04-07 11:49:49 +1000
0.079 bazaar version: 2.1.1
0.080 bzr arguments: [u'explorer']
0.103 looking for plugins in C:/Users/alexey/AppData/Roaming/bazaar/2.0/plugins
0.109 looking for plugins in C:/Program Files/Bazaar/plugins
0.450 encoding stdout as sys.stdout encoding 'cp866'
1.666 loading explorer extensions for clothes ['Bazaar support', 'Register on Launchpad']
3.639 opening working tree 'D:/t/child'
3.650 Returning RevisionSpec RevisionSpec_submit for submit:
[ 3976] 2010-04-07 11:49:53.591 INFO: Using parent branch file:///D:/t/parent/
3.661 check paths: None
5.495 return code 0
---------------------------------

The program works fine if I open a parent branch via mouse right-click or 'bzr explorer' command.

Revision history for this message
Alexey Chabunin (aleksey-chabunin) wrote :

Because of the bug I reverted to bzr 2.1.0. I don't see error anymore - so it is specific to 2.1.1.

Revision history for this message
Alok (alokgovil) wrote :

I had just upgraded to 2.1.1. I created my first repository in Bazaar. Uncommitted it using Bzr Explorer. Got this message when now quitting Bzr Explorer. Now I get the same error every time I quit Bzr explorer.

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

2Alexey: what it means: "3. Go to child folder in Windows Explorer, right-click on blank space, select Bazaar Explorer (no console window displayed)." Is there is any context menu available in the Windows Explorer to run Bazaar Explorer? As I know there is only context menus for TortoiseBzr.

Revision history for this message
Adam Baxter (voltagex) wrote :

Attaching screenshot of context menu

Revision history for this message
Adam Baxter (voltagex) wrote :

Attaching screenshot of error

Revision history for this message
Adam Baxter (voltagex) wrote :

Alexey: I resolved this bug by deleting C:/Users/VoltageX/AppData/Roaming/bazaar/2.0/qbzr.conf

Replace VoltageX with your username. I believe there's a bug somewhere that's saving a corrupted/malformed qbzr.conf

Revision history for this message
Tyson Wadeley (473-sattotw) wrote :

I received the same error message on Windows XP. Not sure if I did the same thing (new to the program).

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

It seems this problem related to TBZR's context menu?

Changed in bzr-explorer:
status: New → Incomplete
Revision history for this message
methane (songofacandy) wrote :

I think adding bzrw.exe may solve this problem.
I'll check this after next bzr-2.2 is packaged with bzrw.exe.

Revision history for this message
Alexey Chabunin (aleksey-chabunin) wrote :

Alexander: I have removed the Bazaar, so I cannot tell for sure, but as fas as I remember, Bzr Explorer and its appearance in Windows Explorer context menu are available in standard Bazaar package, without installation of TortoiseBZR.

Adam: Thanks for the advice, next time I run into the bug, I will use your commendation.

Revision history for this message
Sina Salek (sinasalek) wrote :

I have the same problem on Windows 7 and Bazaar 2.3b1
I tried https://bugs.launchpad.net/bzr-explorer/+bug/556992/comments/6 what that didn't fix the issue.
Any update on this?

Revision history for this message
Alexander Belchenko (bialix) wrote : Re: [Bug 556992] Re: Bazaar Explorer crashes with [Errno 9] Bad file descriptor

Sina Salek пишет:
> I have the same problem on Windows 7 and Bazaar 2.3b1
> I tried https://bugs.launchpad.net/bzr-explorer/+bug/556992/comments/6 what that didn't fix the issue.
> Any update on this?

Can you provide relevant part of .bzr.log? Do you have this error with
bzr 2.2.1?

Revision history for this message
Gary van der Merwe (garyvdm) wrote :

I've seen this, but there was nothing in .bzr.log, so I think it maybe happens after .bzr.log is closed.

Changed in tortoisebzr:
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
methane (songofacandy) wrote :

I can't reproduce this bug with bzr-2.2.1.
Please give me more information.

Revision history for this message
Lord Delta (lorddefinitia) wrote :

I've actually been having this bug since I upgraded from bzr-2.2.0 from bzr-2.2.1 (though I'm not 100% sure if that is the previous version that was on this computer).

I get exactly this error, every time I finish bzr cmd from the right click context menu.

Also, when running "bzr" from the command line, I get the following:

"Unable to load plugin u'rebase'. It requested API version (2, 0, 0) of module <module 'bzrlib' from 'C:\Program Files (x86)\Bazaar\lib\library.zip\bzrlib\__init__.pyo'> but the
 minimum exported version is (2, 2, 0), and the maximum is (2, 2, 1)
Bazaar 2.2.1 -- a free distributed version-control tool"

Revision history for this message
methane (songofacandy) wrote :

Lord, Thank you for valuable informatin.
Could you give me more information?

1. Result of bzr plugins -v from commandline.
2. The version information for bzrw.exe (right click on bzrw.exe, open version info tab,
    then you may be able to see "file version")

Revision history for this message
Lord Delta (lorddefinitia) wrote :

Apologies for the delay, I think your reply got lost somehow, only just came back to check, here's the output of the command you requested:

"Unable to load plugin u'rebase'. It requested API version (2, 0, 0) of module <module 'bzrlib' from 'C:\Program Files (x86)\Bazaar\lib\library.zip\bzrlib\__init__.pyo'> but the
 minimum exported version is (2, 2, 0), and the maximum is (2, 2, 1)
bzrtools 2.2.0
   Various useful commands for working with bzr.
   C:\Program Files (x86)\Bazaar\plugins\bzrtools

colo 0.1.0
   Work with colocated branches using current technology.
   C:\Program Files (x86)\Bazaar\plugins\colo

explorer 1.1.1
   Version Control for Human Beings.
   C:\Program Files (x86)\Bazaar\plugins\explorer

fastimport 0.9.0dev
   FastImport Plugin
   C:\Program Files (x86)\Bazaar\plugins\fastimport

launchpad 2.2.1
   Launchpad.net integration plugin for Bazaar.
   C:\Program Files (x86)\Bazaar\plugins\launchpad

loom 2.2.1dev
   Loom is a bzr plugin which adds new commands to manage a loom of patches.
   C:\Program Files (x86)\Bazaar\plugins\loom

netrc_credential_store 2.2.1
   Use ~/.netrc as a credential store for authentication.conf.
   C:\Program Files (x86)\Bazaar\plugins\netrc_credential_store

news_merge 2.2.1
   Merge hook for bzr's NEWS file.
   C:\Program Files (x86)\Bazaar\plugins\news_merge

pipeline
   Manage a series of branches as a pipeline.
   C:\Program Files (x86)\Bazaar\plugins\pipeline

qbzr 0.19.2
   QBzr - Qt-based frontend for Bazaar
   C:\Program Files (x86)\Bazaar\plugins\qbzr

rewrite 0.6.1
   Rebase support.
   C:\Program Files (x86)\Bazaar\plugins\rewrite

svn 1.0.4
   Support for Subversion branches
   C:\Program Files (x86)\Bazaar\plugins\svn

upload 1.0.0dev
   Upload a working tree, incrementally.
   C:\Program Files (x86)\Bazaar\plugins\upload

xmloutput 0.8.6
   This plugin adds an option (--xml) to log and provides an xml version of some builtin commands.
   C:\Program Files (x86)\Bazaar\plugins\xmloutput

"

Revision history for this message
Lord Delta (lorddefinitia) wrote :

And the version information for bzrw.exe attached as a screen-cap in the png format (although its version 2.2.1.0, if you're nervous about file attachments, or didn't need all that information)

methane (songofacandy)
Changed in tortoisebzr:
status: Confirmed → Fix Committed
milestone: none → 0.5.8
milestone: 0.5.8 → 0.5.9
methane (songofacandy)
Changed in tortoisebzr:
status: Fix Committed → Fix Released
Revision history for this message
Rufus V. Smith (rufuss) wrote :

This has been bothering me for a while too, but I haven't looked into it until now.

After checking some of the threads, I experimented as well.

I noticed that if I use bzr explore to start explorer, there is a console window in the background. This doesn't show up using right-click context menu.

Can it be this but is related to stdin, stdout, or stderr default file handles, which are probably not present when run out of the context menu?

Rufus

Changed in bzr-explorer:
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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