TypeError: Bit 0 is not a string in ._chk_map_pyx._search_key_255 when called from qbzr

Bug #461736 reported by Matthäus G. Chajdas
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Low
Unassigned
QBzr
Incomplete
Undecided
Unassigned

Bug Description

Trying to diff a file at revision 2181 revid:svn-v4:ef33c98e-63e6-0310-b518-990f4ce9efd9:trunk:2200, but getting this error. The repository is converted from SVN, that's why the revision numbers are a bit out of sync.

bzr: ERROR: exceptions.TypeError: Bit 0 of (u'2200@ef33c98e-63e6-0310-b518-990f4ce9efd9:trunk%2Fniven%2FCore%2Fsrc%2Fio%2FWinFile.cpp',) is not a string: u'2200@ef33c98e-63e6-0310-b518-990f4ce9efd9:trunk%2Fniven%2FCore%2Fsrc%2Fio%2FWinFile.cpp'

Traceback (most recent call last):
  File "C:/Program Files (x86)/Bazaar/plugins\qbzr\lib\trace.py", line 286, in reports_exception_decorate
  File "C:/Program Files (x86)/Bazaar/plugins\qbzr\lib\diffwindow.py", line 205, in initial_load
  File "C:/Program Files (x86)/Bazaar/plugins\qbzr\lib\diffwindow.py", line 214, in load_branch_info
  File "C:/Program Files (x86)/Bazaar/plugins\qbzr\lib\diff_arg.py", line 86, in get_diff_window_args
  File "C:/Program Files (x86)/Bazaar/plugins\qbzr\lib\diff_arg.py", line 79, in load_new_tree_and_paths
  File "bzrlib\tree.pyo", line 158, in id2path
  File "bzrlib\inventory.pyo", line 769, in id2path
  File "bzrlib\inventory.pyo", line 2047, in _iter_file_id_parents
  File "bzrlib\inventory.pyo", line 2008, in __getitem__
  File "bzrlib\chk_map.pyo", line 1001, in iteritems
  File "bzrlib\chk_map.pyo", line 1051, in _iter_nodes
  File "bzrlib\chk_map.pyo", line 1287, in _search_prefix_filter
  File "_chk_map_pyx.pyx", line 145, in bzrlib._chk_map_pyx._search_key_255
TypeError: Bit 0 of (u'2200@ef33c98e-63e6-0310-b518-990f4ce9efd9:trunk%2Fniven%2FCore%2Fsrc%2Fio%2FWinFile.cpp',) is not a string: u'2200@ef33c98e-63e6-0310-b518-990f4ce9efd9:trunk%2Fniven%2FCore%2Fsrc%2Fio%2FWinFile.cpp'

bzr 2.0.1 on python 2.5.4 (win32)
arguments: ['C:\\Program Files (x86)\\Bazaar\\bzr.exe', 'qbrowse']
encoding: 'cp1252', fsenc: 'mbcs', lang: None
plugins:
  bzrtools C:\Program Files (x86)\Bazaar\plugins\bzrtools [2.0.1]
  explorer C:\Program Files (x86)\Bazaar\plugins\explorer [0.8.3]
  launchpad C:\Program Files (x86)\Bazaar\plugins\launchpad [2.0.1]
  netrc_credential_store C:\Program Files (x86)\Bazaar\plugins\netrc_credential_store [2.0.1]
  qbzr C:\Program Files (x86)\Bazaar\plugins\qbzr [0.14.4]
  rebase C:\Program Files (x86)\Bazaar\plugins\rebase [0.5.4]
  svn C:\Program Files (x86)\Bazaar\plugins\svn [1.0.0]
  upload C:\Program Files (x86)\Bazaar\plugins\upload [1.0.0dev]
  xmloutput C:\Program Files (x86)\Bazaar\plugins\xmloutput [0.8.5]

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

Do you get the same error when running plain `bzr diff -r N..M` on the same branch? I don't see what we do wrong here in QBzr, but the traceback points deep enough into bzrlib internals.

Changed in qbzr:
status: New → Incomplete
Revision history for this message
Matthäus G. Chajdas (anteru) wrote :

No, I can only trigger it using the GUI, and even then, it's quite complicated ;) The culprit might be that the file has been renamed in revision 2181 (that is, in 2180, it is in core/src/io, in 2181 it's in Core/src/io.)

In the UI, I have to do ...
Explore->Browse items->select the file->right click, show annotate->select revision 2181 in the list on the bottom->show file differences. Show all differences works, as does show tree. Annotate also fails.

Revision history for this message
Alexander Belchenko (bialix) wrote : Re: [Bug 461736] Re: Exception on Diff when browsing through history

Anteru пишет:
> No, I can only trigger it using the GUI, and even then, it's quite
> complicated ;) The culprit might be that the file has been renamed in
> revision 2181 (that is, in 2180, it is in core/src/io, in 2181 it's in
> Core/src/io.)
>
> In the UI, I have to do ...
> Explore->Browse items->select the file->right click, show annotate->select revision 2181 in the list on the bottom->show file differences. Show all differences works, as does show tree. Annotate also fails.

Is your project open-source?

__________ Information from ESET NOD32 Antivirus, version of virus signature database 4667 (20091207) __________

The message was checked by ESET NOD32 Antivirus.

http://www.esetnod32.ru

Revision history for this message
Matthäus G. Chajdas (anteru) wrote : Re: Exception on Diff when browsing through history

No, it's closed source, at least for the foreseeable future. Any way I could get more useful information on my side?

Revision history for this message
Alexander Belchenko (bialix) wrote : Re: [Bug 461736] Re: Exception on Diff when browsing through history

Anteru пишет:
> No, it's closed source, at least for the foreseeable future. Any way I
> could get more useful information on my side?

I think we need find a way to either create simple example repo which
can trigger the same bug (rename file in 2 revisions?), or find a way to
trigger the same error from command line.

About the latter: if you run from command line:

bzr diff core/src/io -r2180..2181

and/or

bzr diff Core/src/io -r2180..2181

will it triggers the bug?

Revision history for this message
Matthäus G. Chajdas (anteru) wrote : Re: Exception on Diff when browsing through history

Both work. I'll try to generate a simple example repo.

Revision history for this message
Matthäus G. Chajdas (anteru) wrote :

If I go via log, revision 2181, select the file there, and use "annotate", it works correctly. It's only using the combination by going from explore->browse items. I also checked on Linux, using latest qbzr and explorer, and the error still persists, but it's in .py files (so I could easily hack those.)

I tried to create a simple repository which would exhibit the same error, but no luck :/

Revision history for this message
Matthäus G. Chajdas (anteru) wrote :

More information: If I use explore->browse items, select the file, use "show log", and select any of the revisions in the log window, and use "show file differences", it works. It only doesn't work if I use show annotate and use the log in the bottom left (in fact, it fails on _any_ revision.)

Martin Pool (mbp)
summary: - Exception on Diff when browsing through history
+ TypeError: Bit 0 is not a string in ._chk_map_pyx._search_key_255 when
+ called from qbzr
Changed in bzr:
importance: Undecided → Low
status: New → Confirmed
Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
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.