Undocumented panic in iced::widget::scrollable()

I figure that you found a bug and not something that needs to be documented so users can work around it. Your best option is to try to reproduce it and report it.

1 Like

Well as I said in the question I haven’t been able to reproduce it (outside of my project) and it’s both an explicit panic (i.e. someone wrote the panic message it isn’t just the program panicking on it’s own) and has previously been discussed on the github page as an issue.

Therefore I’m fairly confident it’s a designed in feature not a bug (though I would argue the behavior should be changed or at least documented)

After a bit more digging I found that it was due the scrollable element not having a set height and containing an element with height iced::Fill (I’m guessing that they couldn’t find a way to catch that at compile time.

It’s my mistake that caused it however, I do think there should be a note in the documentation warning of this panic as it’s pretty easy to do by accident and unless I’ve missed something there’s nothing warning that the widget can panic

I still believe this is a bug and you should report it as such. Even if the panic was put in there on purpose, it surely represents a situation that “shouldn’t happen”, and now you found a way to make it happen.

Also, why is your original post flagged? :thinking: