Skip to content

VirtualizingListBox: fix hang when the next row is hidden - #1098

Open
dklima wants to merge 1 commit into
elementary:masterfrom
dklima:fix-hidden-row-hang
Open

dklima wants to merge 1 commit into
elementary:masterfrom
dklima:fix-hidden-row-hang

Conversation

@dklima

@dklima dklima commented Sep 27, 2026

Copy link
Copy Markdown

When you move a conversation to the trash, Mail hides the row and selects the next index. If the next row is also hidden, ensure_index_visible () cannot find a widget for it. The while loops then try to scroll, but the adjustment is at its limit, so the loops never stop. Mail freezes before the move operation starts, so the server does not get the change.

Steps to reproduce

  1. Open an inbox with two conversations.
  2. Delete the bottom conversation.
  3. Delete the remaining conversation.
  4. Mail does not respond.

Changes

  • ensure_index_visible (): return null for a hidden index.
  • Stop the scroll loops when the adjustment value does not change.
  • select_row_at_index (): clear the selection when no row is found. Before, the message view showed the deleted conversation.
  • Make the row_selected parameter nullable. Before, Vala ignored a null emit with assertion 'row != NULL' failed.

Test

I tested the fix on 8.0.1 on Fedora 44 with an IMAP account. Mail does not freeze, and the message view shows "No Message Selected".

This can also fix #1021. Its backtrace goes through virtualizing_list_box_select_row_at_index.

@danirabbit

Copy link
Copy Markdown
Member

Hey @dklima can you confirm that you did not use LLMs to write this fix in accordance with our contributor guide? https://docs.elementary.io/contributor-guide/development/generative-ai-policy

@dklima

dklima commented Sep 27, 2026

Copy link
Copy Markdown
Author

Hey @dklima can you confirm that you did not use LLMs to write this fix in accordance with our contributor guide? https://docs.elementary.io/contributor-guide/development/generative-ai-policy

Yes, I wrote the fix myself. I used an AI tool only to help me find the right file in the codebase. As I read the policy, that falls under the note that AI tools can be used to find information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Mail freezes on consecutive archiving of emails

2 participants