treewidget: list index out of range error

Bug #529985 reported by Ian Clatworthy
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
QBzr
Fix Released
High
Gary van der Merwe

Bug Description

I got this exception opening a branch tonight ...

bzr: ERROR: exceptions.IndexError: list index out of range

Traceback (most recent call last):
  File "/home/ian/.bazaar/plugins/qbzr/lib/treewidget.py", line 884, in data
    item_data = self.inventory_data[index.internalId()]
IndexError: list index out of range

This was using QBzr trunk rev 1205.

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

I guess we could just do:
        id = index.internalId()
        if id > len(self.inventory_data):
            QtCore.QVariant()

        item_data = self.inventory_data[id]

But why did this happen?

Revision history for this message
Ian Clatworthy (ian-clatworthy) wrote :

I forget exactly. At a guess, I frequently use text filtering in Explorer so that the treewidget only shows files matching a pattern. Having filtered to tree to shown just a file or two, I double-click one to edit it. When I save the file, explorer implicitly refreshes the page, including the working tree browser, and errors (like this one) suddenly pop up.

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

Fixed by fix for bug 538753

Changed in qbzr:
assignee: nobody → Gary van der Merwe (garyvdm)
importance: Undecided → High
milestone: none → 0.18.4
status: New → Fix Released
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.