Skip to content

bug: attempt to calculate the remainder with a divisor of 0 #49

@foxyseta

Description

@foxyseta

Empty server lists in user config are not handled gracefully:

╭Search ─────────────────────────────────────────────────────────────────────────────────────────╮╭status──────────╮
│no/thread '<unnamed>' panicked at fetcher/src/utils.rs:164:36:                                  ││Fetch playlist..
  0: rust_begin_unwind─────────────────────────────────────────attempt to calculate the remainder with a divisor of
zerortcut ────────────   1: core::panicking::panic_fmt─────────────────────────────────────────────────────────────╮
│Trestack backtrace:  ││Title                            2: core::panicking::panic_const::panic_const_rem_by_zero  │
│Youtube Community    ││
3: ytui_music::communicator::communicator::{{closure}}                                                             │
│My playlist          ││                              note: Some details are omitted, run with `RUST_BACKTRACE=full`
 for a verbose backtrace.                                                                                          │
│Search               ││ fish: Job 1, 'RUST_BACKTRACE=1 ytui_music  run' terminated by signal SIGABRT (Abort)      │
│                     ││                                                                                     ⏎

I guess a startup check that would be enough to stop the user from using such an illegal config.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions