Skip to content

Mp4ReaderSource filesystem_error due to canonical error #401

@palak-ckar

Description

@palak-ckar

Describe the bug
Calling boost::filesystem::canonical(path) on a non-existent path causes a crash with the following error:

what(): boost::filesystem::canonical: No such file or directory: "some/nonexistent/path"

Since canonical requires the path to exist, it throws a boost::filesystem::filesystem_error, leading to an unexpected crash instead of providing a fallback or error-handling mechanism.

Steps to reproduce the behavior

  • Pass a non-existent path to boost::filesystem::canonical, e.g., "/some/nonexistent/path".
  • Run the application.
  • Observe that the program throws an exception and crashes.

Expected behavior
Instead of crashing, canonical should provide a way to handle non-existent paths gracefully. A better approach would be:

  • Returning an error code or exception (try catch) that can be caught without a crash.

Desktop:

  • Architecture - arm64

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1Priority 1bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions