Linux: UI panic "Downcast on stateless state" in MessageList::layout (one report, 2026-11-13) #753

Open
opened 2026-11-16 06:37:41 +00:00 by charles · 0 comments
Owner

Found while checking the panic reports for #752 (~/.local/state/flaxative/logs/panic-*.txt on Charles's Linux machine). Five of the six reports are #752; this one differs:

fluxer 0.1.0 (git 220acceabcd8)   (2026-11-13, a build from before the rename)
os: linux x86_64 (CachyOS)
thread: main
location: iced_core-0.14.0/src/widget/tree.rs:254:28
message: Downcast on stateless state
backtrace (top):
   5: core::panicking::panic_fmt
   6: <fluxer_ui::widgets::message_list::MessageList<fluxer_ui::screens::main::messages::Message> as iced_core::widget::Widget<..>>::layout
   7: <fluxer_ui::screens::main::messages::ChatColumn as iced_core::widget::Widget<..>>::layout
   8: <iced_widget::container::Container<..>>::layout
  ...
  13: <fluxer_ui::widgets::resizable_split::ResizableSplit<..>>::layout
  ...
  16: <iced_widget::stack::Stack<..>>::layout
  17: iced_winit::build_user_interface
  ...
  24: fluxer_ui::app::run
  25: fluxer::main

So on the main thread, while iced laid the UI out, MessageList::layout asked its tree node for its state (Tree::state.downcast_ref/mut) and found a node of a stateless widget: the tree node MessageList got had not been rebuilt for it by diff (the widget at that position of ChatColumn changed type without the tree following, or MessageList's tag()/state()/diff(), or ChatColumn's children()/diff(), disagree about which child is where). The panic takes the window down (main thread).

Not reproduced; a single report, from git 220acceab (text chat task 25, composer). No later build has logged it, so it may be fixed since or be rare. To do: check ChatColumn's children/diff against the order its layout hands trees to its children, and MessageList's tag/state/diff, for the states the chat column can switch between (empty channel, loading, a channel with messages, the composer's reply/edit bars).

Seen on: git 220acceabc (nightly from 2026-11-13).

Found while checking the panic reports for #752 (`~/.local/state/flaxative/logs/panic-*.txt` on Charles's Linux machine). Five of the six reports are #752; this one differs: ``` fluxer 0.1.0 (git 220acceabcd8) (2026-11-13, a build from before the rename) os: linux x86_64 (CachyOS) thread: main location: iced_core-0.14.0/src/widget/tree.rs:254:28 message: Downcast on stateless state backtrace (top): 5: core::panicking::panic_fmt 6: <fluxer_ui::widgets::message_list::MessageList<fluxer_ui::screens::main::messages::Message> as iced_core::widget::Widget<..>>::layout 7: <fluxer_ui::screens::main::messages::ChatColumn as iced_core::widget::Widget<..>>::layout 8: <iced_widget::container::Container<..>>::layout ... 13: <fluxer_ui::widgets::resizable_split::ResizableSplit<..>>::layout ... 16: <iced_widget::stack::Stack<..>>::layout 17: iced_winit::build_user_interface ... 24: fluxer_ui::app::run 25: fluxer::main ``` So on the main thread, while iced laid the UI out, `MessageList::layout` asked its tree node for its state (`Tree::state.downcast_ref/mut`) and found a node of a stateless widget: the tree node `MessageList` got had not been rebuilt for it by `diff` (the widget at that position of `ChatColumn` changed type without the tree following, or `MessageList`'s `tag()`/`state()`/`diff()`, or `ChatColumn`'s `children()`/`diff()`, disagree about which child is where). The panic takes the window down (main thread). Not reproduced; a single report, from git 220acceab (text chat task 25, composer). No later build has logged it, so it may be fixed since or be rare. To do: check `ChatColumn`'s `children`/`diff` against the order its `layout` hands trees to its children, and `MessageList`'s `tag`/`state`/`diff`, for the states the chat column can switch between (empty channel, loading, a channel with messages, the composer's reply/edit bars). Seen on: git 220acceabcd8 (nightly from 2026-11-13).
charles changed title from Linux: UI panic "Downcast on stateless state" in iced build_user_interface (one report, 2026-11-13) to Linux: UI panic "Downcast on stateless state" in MessageList::layout (one report, 2026-11-13) 2026-11-16 06:37:59 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
charles/fluxer-native#753
No description provided.