zulip/zulip-terminal
IndexError on starting (focus index vs message id)
オープン
#1,226 opened on 2022/05/16
bug: crashfurther discussion requiredhelp wanted
Repository metrics
- Stars
- (853 個のスター)
- PR merge metrics
- (30d に merged PR はありません)
説明
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.