bzrlib._dirstate_helpers_pyx.Reader.get_next: AssertionError: get_next() called when there are no chars left

Bug #709158 reported by Jürgen Schneider
84
This bug affects 12 people
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
High
Unassigned
Breezy
Triaged
High
Unassigned

Bug Description

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 693, in bzrlib._dirstate_helpers_pyx.Reader._get_entry
  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

----

workaround: If you're seeing this message, it probably means your dirstate file was corrupted by a machine crash or similar incident. Running 'bzr repair-workingtree' should fix it.

I'll leave this bug open asking for this situation to be either avoided (where possible) or automatically restored, or at least reported better.

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

based on the traceback the error comes from bzr core

affects: bzr-explorer → bzr
summary: - tried to open a bzr-folder
+ bzrlib._dirstate_helpers_pyx.Reader.get_next: AssertionError: get_next()
+ called when there are no chars left
Revision history for this message
Andrew Bennetts (spiv) wrote :

Probably a truncated dirstate file. Possibly this is a duplicate of an existing bug report.

tags: added: dirstate
Changed in bzr:
importance: Undecided → High
status: New → Confirmed
Martin Pool (mbp)
description: updated
Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
Jelmer Vernooij (jelmer)
Changed in brz:
status: New → Triaged
importance: Undecided → High
tags: removed: 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.