qcommit fails with exceptions.IndexError: list index out of range

Bug #794942 reported by Stas Kalashnikov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
QBzr
Confirmed
Medium
Unassigned

Bug Description

Make a commit with qci command. Enter commit message (with "text completion" context menus). Press Ctrl+Enter to proceed and get the following exception:

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

Traceback (most recent call last):
  File "C:/Program Files (x86)/Bazaar/plugins\qbzr\lib\treewidget.py", line 1656, in keyPressEvent
  File "C:/Program Files (x86)/Bazaar/plugins\qbzr\lib\treewidget.py", line 1789, in do_default_action
IndexError: list index out of range

bzr 2.3.3 on python 2.6.6 (win32)
arguments: ['bzr', 'qci']
encoding: 'cp1251', fsenc: 'mbcs', lang: 'EN'
plugins:
  bzrtools C:\Program Files (x86)\Bazaar\plugins\bzrtools [2.3.1]
  colo C:\Program Files (x86)\Bazaar\plugins\colo [0.2.1]
  explorer C:\Program Files (x86)\Bazaar\plugins\explorer [1.1.3]
  fastimport C:\Program Files (x86)\Bazaar\plugins\fastimport [0.10.0]
  grep C:\Program Files (x86)\Bazaar\plugins\grep [0.4.0]
  launchpad C:\Program Files (x86)\Bazaar\plugins\launchpad [2.3.3]
  loom C:\Program Files (x86)\Bazaar\plugins\loom [2.2.1dev]
  netrc_credential_store C:\Program Files (x86)\Bazaar\plugins\netrc_credential_store [2.3.3]
  news_merge C:\Program Files (x86)\Bazaar\plugins\news_merge [2.3.3]
  pipeline C:\Program Files (x86)\Bazaar\plugins\pipeline [1.1.0]
  qbzr C:\Program Files (x86)\Bazaar\plugins\qbzr [0.20.1]
  rewrite C:\Program Files (x86)\Bazaar\plugins\rewrite [0.6.2dev]
  svn C:\Program Files (x86)\Bazaar\plugins\svn [1.0.5dev]
  upload C:\Program Files (x86)\Bazaar\plugins\upload [1.0.0]
  xmloutput C:\Program Files (x86)\Bazaar\plugins\xmloutput [0.8.7.dev]

Revision history for this message
Stas Kalashnikov (halega) wrote :

This exception occurs from time to time but I don't understand yet how to reproduce it.

Revision history for this message
Alexander Belchenko (bialix) wrote : Re: [Bug 794942] Re: qcommit fails with exceptions.IndexError: list index out of range

Stanislav Kalashnikov пишет:
> This exception occurs from time to time but I don't understand yet how
> to reproduce it.

Based on the traceback I can say it can happen only if you changed the
focus of the window from commit message editor to file list.

Are you working with laptop/notebook and accidentally hit the touchpad?

--
All the dude wanted was his rug back

Changed in qbzr:
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Alexander Belchenko (bialix) wrote :

I can reproduce it if I run qcommit, click in the Changes area (set focus on it) and then hit Ctrl+Enter or just Enter.

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

More interesting: I can trigger it many times, and for some reason our error catcher does not work:

Error in sys.excepthook:
Traceback (most recent call last):
  File "C:\work\Bazaar\plugins\qbzr\lib\trace.py", line 379, in excepthook
    type=ITEM_OR_EVENT_METHOD)
  File "C:\work\Bazaar\plugins\qbzr\lib\trace.py", line 161, in report_exception
    (bzrlib.__version__,
UnboundLocalError: local variable 'bzrlib' referenced before assignment

Original exception was:
Traceback (most recent call last):
  File "C:\work\Bazaar\plugins\qbzr\lib\treewidget.py", line 1656, in keyPressEvent
    self.do_default_action(None)
  File "C:\work\Bazaar\plugins\qbzr\lib\treewidget.py", line 1788, in do_default_action
    item_data = self.get_selection_items([index])[0]
IndexError: list index out of range

The first traceback suggest we have another error here.

Revision history for this message
Martin Pool (mbp) wrote : Re: [Bug 794942] Re: qcommit fails with exceptions.IndexError: list index out of range

On 9 June 2011 22:03, Alexander Belchenko <email address hidden> wrote:
> More interesting: I can trigger it many times, and for some reason our
> error catcher does not work:
>
> Error in sys.excepthook:
> Traceback (most recent call last):
>  File "C:\work\Bazaar\plugins\qbzr\lib\trace.py", line 379, in excepthook
>    type=ITEM_OR_EVENT_METHOD)
>  File "C:\work\Bazaar\plugins\qbzr\lib\trace.py", line 161, in report_exception
>    (bzrlib.__version__,
> UnboundLocalError: local variable 'bzrlib' referenced before assignment

This one is just simply not imported.

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

Martin Pool пишет:
> On 9 June 2011 22:03, Alexander Belchenko <email address hidden> wrote:
>> More interesting: I can trigger it many times, and for some reason our
>> error catcher does not work:
>>
>> Error in sys.excepthook:
>> Traceback (most recent call last):
>> File "C:\work\Bazaar\plugins\qbzr\lib\trace.py", line 379, in excepthook
>> type=ITEM_OR_EVENT_METHOD)
>> File "C:\work\Bazaar\plugins\qbzr\lib\trace.py", line 161, in report_exception
>> (bzrlib.__version__,
>> UnboundLocalError: local variable 'bzrlib' referenced before assignment
>
> This one is just simply not imported.

In fact it's imported at the beginning of trace.py.

Revision history for this message
Martin Pool (mbp) wrote :

Well, now I look silly. :)

If I may be permitted a second guess, it is that this line lower down
causes 'bzrlib' to be a local variable in this function:

             import bzrlib.plugins.qbzr.lib.resources

Martin

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

Martin Pool пишет:
> Well, now I look silly. :)
>
> If I may be permitted a second guess, it is that this line lower down
> causes 'bzrlib' to be a local variable in this function:
>
> import bzrlib.plugins.qbzr.lib.resources

I have no better ideas either, so your guess is good for me. I'll try to
address that.

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.