Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • Shortwave Shortwave
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 63
    • Issues 63
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 6
    • Merge requests 6
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • World
  • ShortwaveShortwave
  • Issues
  • #540
Closed
Open
Issue created Dec 26, 2020 by louib@louib

Crash on invalid song duration

I'm getting the following panic on invalid song duration:

thread 'main' panicked at 'invalid time', /run/build/shortwave/_flatpak_build/target/cargo-home/registry/src/github.com-1285ae84e5963aae/chrono-0.4.13/src/naive/time.rs:409:67

The chrono doc does mention that from_num_seconds_from_midnight "panics on invalid number of seconds and/or nanosecond.". I'm guessing negative numbers are invalid, but not sure how we end up with a negative number with unsigned integers. Maybe the seconds as u32 type cast is doing something funky? Or 0 is an invalid number?. The seconds to be converted is logged just before the operation, but unfortunately I cannot reproduce easily and I'm having a hard time obtaining the logs of the flatpak app when launched by LXDE.

Edited Dec 26, 2020 by louib
Assignee
Assign to
Time tracking