zulip-terminal icon indicating copy to clipboard operation
zulip-terminal copied to clipboard

IndexError on starting (focus index vs message id)

Open neiljp opened this issue 2 years ago • 8 comments

This was discussed in #zulip-terminal > IndexError while starting., and has been reported by:

  • Aryan Shridhar
  • @Dishti-Oberai
  • @rht

This appears to be distinct from #326.

ZT is reported to crash before the UI loads.

The traceback ends with

IndexError: focus index is out of range: 1330877

(where the last number varies)

The bug currently occurs due to views.py line 119, on the assumption that:

  • the model provides a current focused message id
  • the focused message is set to the id
  • the initializer for MessageView sets the listbox focus to that id...
  • ...which is likely out of range, given ~30 messages in list, and message ids potentially being huge!

A temporary workaround is to remove that statement, but a fuller solution should likely consider how we handle/retain focus between narrows.

neiljp avatar May 16 '22 21:05 neiljp

@zulipbot claim

hamzakhan7 avatar Apr 03 '23 18:04 hamzakhan7

Welcome to Zulip, @hamzakhan7! We just sent you an invite to collaborate on this repository at https://github.com/zulip/zulip-terminal/invitations. Please accept this invite in order to claim this issue and begin a fun, rewarding experience contributing to Zulip!

Here's some tips to get you off to a good start:

As you work on this issue, you'll also want to refer to the Zulip code contribution guide, as well as the rest of the developer documentation on that site.

See you on the other side (that is, the pull request side)!

zulipbot avatar Apr 03 '23 18:04 zulipbot

@hamzakhan7 You have been unassigned from this issue because you have not made any updates for over 14 days. Please feel free to reclaim the issue if you decide to pick up again. Thanks!

zulipbot avatar Apr 14 '23 02:04 zulipbot

@hamzakhan7 We noticed that you have not made any updates to this issue or linked PRs for 10 days. Please comment here if you are still actively working on it. Otherwise, we'd appreciate a quick @zulipbot abandon comment so that someone else can claim this issue and continue from where you left off.

If we don't hear back, you will be automatically unassigned in 4 days. Thanks!

Hi, yes I am still actively working on the issue

hamzakhan7 avatar Apr 14 '23 23:04 hamzakhan7

@zulipbot claim

hamzakhan7 avatar Apr 20 '23 01:04 hamzakhan7

what are some steps that I could take to reproduce this error?

hamzakhan7 avatar Apr 20 '23 01:04 hamzakhan7

@hamzakhan7 You have been unassigned from this issue because you have not made any updates for over 14 days. Please feel free to reclaim the issue if you decide to pick up again. Thanks!

zulipbot avatar Apr 30 '23 03:04 zulipbot

@theViz343 You have been unassigned from this issue because you have not made any updates for over 14 days. Please feel free to reclaim the issue if you decide to pick up again. Thanks!

zulipbot avatar Mar 03 '24 01:03 zulipbot