Crash when using diff

Bug #772141 reported by Jian Jiao
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Medium
Unassigned

Bug Description

The branch was stored on my NAS using bazaar Windows version, when accessed from the ubuntu version on another computer, it appears all the files were modified, but it was not true. When I did 'diff', a crash happened.

bzr: ERROR: exceptions.AssertionError: get_next() called when there are no chars left

Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/bzrlib/plugins/explorer/lib/explorer.py", line 667, in changed_view
    self._wt_browser.set_tree(view.tree, view.branch)
  File "/usr/lib/python2.6/dist-packages/bzrlib/plugins/explorer/lib/wt_browser.py", line 65, in set_tree
    self._browser.set_tree(tree, branch)
  File "/usr/lib/python2.6/dist-packages/bzrlib/plugins/explorer/lib/wt_browser.py", line 469, in set_tree
    self._tree_viewer.set_tree(tree, branch)
  File "/usr/lib/python2.6/dist-packages/bzrlib/plugins/explorer/lib/wt_browser.py", line 691, in set_tree
    treewidget.TreeWidget.set_tree(self, *args)
  File "/usr/lib/python2.6/dist-packages/bzrlib/plugins/qbzr/lib/treewidget.py", line 1390, in set_tree
    initial_checked_paths=initial_checked_paths)
  File "/usr/lib/python2.6/dist-packages/bzrlib/plugins/qbzr/lib/treewidget.py", line 408, in set_tree
    root_id = self.tree.get_root_id()
  File "/usr/lib/python2.6/dist-packages/bzrlib/decorators.py", line 140, in read_locked
    result = unbound(self, *args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/workingtree_4.py", line 428, in get_root_id
    return self._get_entry(path='')[0][2]
  File "/usr/lib/python2.6/dist-packages/bzrlib/workingtree_4.py", line 358, in _get_entry
    return state._get_entry(0, fileid_utf8=file_id, path_utf8=path)
  File "/usr/lib/python2.6/dist-packages/bzrlib/dirstate.py", line 1962, in _get_entry
    self._read_dirblocks_if_needed()
  File "/usr/lib/python2.6/dist-packages/bzrlib/dirstate.py", line 2202, in _read_dirblocks_if_needed
    _read_dirblocks(self)
  File "_dirstate_helpers_pyx.pyx", line 767, in bzrlib._dirstate_helpers_pyx._read_dirblocks
  File "_dirstate_helpers_pyx.pyx", line 733, in bzrlib._dirstate_helpers_pyx.Reader._parse_dirblocks
  File "_dirstate_helpers_pyx.pyx", line 654, in bzrlib._dirstate_helpers_pyx.Reader._get_entry
  File "_dirstate_helpers_pyx.pyx", line 572, in bzrlib._dirstate_helpers_pyx.Reader.get_next_str
  File "_dirstate_helpers_pyx.pyx", line 554, in bzrlib._dirstate_helpers_pyx.Reader.get_next
AssertionError: get_next() called when there are no chars left

bzr 2.1.1 on python 2.6.5 (linux2)
arguments: ['/usr/bin/bzr', 'explorer']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'en_AU.utf8'
plugins:
  bzrtools /usr/lib/python2.6/dist-packages/bzrlib/plugins/bzrtools [2.1.0]
  dbus /usr/lib/python2.6/dist-packages/bzrlib/plugins/dbus [0.1.0dev]
  explorer /usr/lib/python2.6/dist-packages/bzrlib/plugins/explorer [1.0.1]
  gtk /usr/lib/python2.6/dist-packages/bzrlib/plugins/gtk [0.98.0.final.1]
  launchpad /usr/lib/python2.6/dist-packages/bzrlib/plugins/launchpad [2.1.1]
  netrc_credential_store /usr/lib/python2.6/dist-packages/bzrlib/plugins/netrc_credential_store [2.1.1]
  news_merge /usr/lib/python2.6/dist-packages/bzrlib/plugins/news_merge [2.1.1]
  qbzr /usr/lib/python2.6/dist-packages/bzrlib/plugins/qbzr [0.18.6]

Tags: dirstate
Revision history for this message
Jian Jiao (jj8431) wrote :
Download full text (3.6 KiB)

Update report: Error happens when I went back to Windows to open the project after that.

bzr: ERROR: exceptions.AssertionError: get_next() called when there are no chars left

Traceback (most recent call last):
  File "D:/Program Files/Bazaar/plugins\explorer\lib\explorer.py", line 1448, in callable_with_cleanup
  File "D:/Program Files/Bazaar/plugins\explorer\lib\explorer.py", line 1616, in _open_location_task
  File "D:/Program Files/Bazaar/plugins\explorer\lib\location_viewer.py", line 161, in add_location
  File "D:/Program Files/Bazaar/plugins\explorer\lib\location.py", line 178, in view
  File "D:/Program Files/Bazaar/plugins\explorer\lib\view_workingtree.py", line 72, in ui
  File "D:/Program Files/Bazaar/plugins\explorer\lib\html_report_view.py", line 51, in ui
  File "D:/Program Files/Bazaar/plugins\explorer\lib\html_report_view.py", line 55, in refresh_view
  File "D:/Program Files/Bazaar/plugins\explorer\lib\view_workingtree.py", line 97, in report_text
  File "D:/Program Files/Bazaar/plugins\explorer\lib\status_report.py", line 195, in __init__
  File "D:/Program Files/Bazaar/plugins\explorer\lib\status_report.py", line 212, in _collect_data
  File "D:/Program Files/Bazaar/plugins\explorer\lib\status_data.py", line 43, in get_status_info
  File "D:/Program Files/Bazaar/plugins\explorer\lib\status_data.py", line 61, in changes_between_trees
  File "bzrlib\tree.pyo", line 94, in changes_from
  File "bzrlib\decorators.pyo", line 151, in read_locked
  File "bzrlib\tree.pyo", line 979, in compare
  File "bzrlib\delta.pyo", line 127, in _compare_trees
  File "bzrlib\tree.pyo", line 103, in iter_changes
  File "bzrlib\workingtree_4.pyo", line 2102, in iter_changes
  File "bzrlib\dirstate.pyo", line 2237, in _read_dirblocks_if_needed
  File "_dirstate_helpers_pyx.pyx", line 796, in bzrlib._dirstate_helpers_pyx._read_dirblocks (bzrlib\_dirstate_helpers_pyx.c:5343)
  File "_dirstate_helpers_pyx.pyx", line 762, in bzrlib._dirstate_helpers_pyx.Reader._parse_dirblocks (bzrlib\_dirstate_helpers_pyx.c:5080)
  File "_dirstate_helpers_pyx.pyx", line 668, in bzrlib._dirstate_helpers_pyx.Reader._get_entry (bzrlib\_dirstate_helpers_pyx.c:4542)
  File "_dirstate_helpers_pyx.pyx", line 577, in bzrlib._dirstate_helpers_pyx.Reader.get_next_str (bzrlib\_dirstate_helpers_pyx.c:4239)
  File "_dirstate_helpers_pyx.pyx", line 559, in bzrlib._dirstate_helpers_pyx.Reader.get_next (bzrlib\_dirstate_helpers_pyx.c:4089)
AssertionError: get_next() called when there are no chars left

bzr 2.4b1 on python 2.6.6 (win32)
arguments: ['D:\\Program Files\\Bazaar\\bzrw.exe', 'explorer']
encoding: 'cp936', fsenc: 'mbcs', lang: None
plugins:
  bzrtools D:\Program Files\Bazaar\plugins\bzrtools [2.4.0]
  colo D:\Program Files\Bazaar\plugins\colo [0.3.0dev]
  explorer D:\Program Files\Bazaar\plugins\explorer [1.1.3dev]
  fastimport D:\Program Files\Bazaar\plugins\fastimport [0.11.0dev]
  launchpad D:\Program Files\Bazaar\plugins\launchpad [2.4b1]
  loom D:\Program Files\Bazaar\plugins\loom [2.2.1dev]
  netrc_credential_store D:\Program Files\Bazaar\plugins\netrc_credential_store [2.4b1]
  news_merge ...

Read more...

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

based on traceback I say you have corrupted dirstate file. Why it so I can't say, but this is not bug in Bazaar Explorer per se, nor in QBzr.

affects: bzr-explorer → bzr
Revision history for this message
Jian Jiao (jj8431) wrote :

Thanks Alex, It might be caused by the cross access by Windows and Linux. I'm not sure. What I'm worried about most is how to recover my previously logged versions.

Revision history for this message
Martin Pool (mbp) wrote : Re: [Bug 772141] Re: Crash when using diff

Jian, you should be able to recover from this with 'bzr repair-workingtree'.
Martin

Revision history for this message
Jian Jiao (jj8431) wrote :

Hi Martin, I tried as you suggested form a command window in Windows, but still got similar error messages.

John A Meinel (jameinel)
description: updated
Changed in bzr:
importance: Undecided → Medium
status: New → Confirmed
tags: added: dirstate
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.