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

Bug #628369 reported by ChrisCauser
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
New
Undecided
Unassigned

Bug Description

Hello,

I was trying to split a bzr branch into several subbranches. I thought I'd try the answer here:

http://stackoverflow.com/questions/67021/how-do-i-export-the-bazaar-history-of-a-subfolder

in that I would use bzr split. Unfortunately, I get an error and a message to email you, which I am now doing. The crash report is attached. The branch is nothing special. The layout is

WorkDocuments/GigInvoices
WorkDocuments/SCMTalk

The command I did was in WorkDocuments, I issued "bzr split SCMTalk." If I'm doing something stupid, I apologize.

Traceback:
 Traceback (most recent call last):
   File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 853, in exception_to_return_code
     return the_callable(*args, **kwargs)
   File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 1055, in run_bzr
     ret = run(*run_argv)
   File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 661, in run_argv_aliases
     return self.run_direct(**all_cmd_args)
   File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 665, in run_direct
     return self._operation.run_simple(*args, **kwargs)
   File "/usr/lib/python2.6/dist-packages/bzrlib/cleanup.py", line 122, in run_simple
     self.cleanups, self.func, *args, **kwargs)
   File "/usr/lib/python2.6/dist-packages/bzrlib/cleanup.py", line 156, in _do_with_cleanups
     result = func(*args, **kwargs)
   File "/usr/lib/python2.6/dist-packages/bzrlib/builtins.py", line 4924, in run
     sub_id = containing_tree.path2id(subdir)
   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 859, in path2id
     entry = self._get_entry(path=path)
   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

Revision history for this message
ChrisCauser (chy-causer) wrote :
Revision history for this message
Martin Pool (mbp) wrote :

Hi Chris,

This looks ilke a duplicate of bug 450047. Apparently the dirstate file is truncated; I don't know why that has happened. If you remove the .bzr/checkout directory and then run 'bzr checkout' in that directory again you should be ok. Can you think of anything that happened around this time (maybe a machine crash?) that could have caused the file to be truncated? Is this stored on a network or usb disk or anything like that?

summary: - Bzr crashes on split
+ AssertionError: "get_next() called when there are no chars left" in
+ bzrlib._dirstate_helpers_pyx.Reader.get_next
description: updated
Revision history for this message
ChrisCauser (chy-causer) wrote : Re: [Bug 628369] Re: AssertionError: "get_next() called when there are no chars left" in bzrlib._dirstate_helpers_pyx.Reader.get_next

Hello Martin,

Many thanks for the pointer. You are indeed correct. When I branch
from the repository again everything works fine. The only thing I can
think of that would be unusual is that the repository is mounted as a
samba share using smbfs but the branch is totally local. I have
repeated my steps and it works as described.

If the problem comes back I will take more care at preserving the dirstate.

Chris

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.