Skip to content

[MacOS] spdlog_ex: Failed opening file DFTFringeLogs/log.txt for writing #353

Description

@Lucassifoni

When launched graphically, DFTFringe instantly crashes on Mac. This is because the Finder (MacOS's file explorer and app launcher) runs applications with CWD = "/", which is not user-writable. The app then tries to create DFTFringeLogs/log.txt at / and crashes.

Running it from a terminal from ~Desktop (user-writable) :

 Desktop ./DFTFringe.app/Contents/MacOS/DFTFringe
[2026-08-03 17:46:48.089] [info]


-------------
[2026-08-03 17:46:48.089] [info] spdlog info
[2026-08-03 17:46:48.089] [warning] spdlog warn
[2026-08-03 17:46:48.089] [error] spdlog error
[2026-08-03 17:46:48.089] [critical] spdlog critical
[2026-08-03 17:46:48.090] [critical] This is a demo stacktrace:
 0# main in /Users/lucas/Desktop/DFTFringe.app/Contents/MacOS/DFTFringe

[2026-08-03 17:46:48.198] [info] DFTFringe 9b8ffad25efb8f3c11f82b8b9103bd026f157edf started
[2026-08-03 17:46:48.606] [trace] Log level changed to: Info

Running it from / :

➜  / ./Users/lucas/Desktop/DFTFringe.app/Contents/MacOS/DFTFringe
libc++abi: terminating due to uncaught exception of type spdlog::spdlog_ex: Failed opening file DFTFringeLogs/log.txt for writing: Operation timed out
[1]    37407 abort      ./Users/lucas/Desktop/DFTFringe.app/Contents/MacOS/DFTFringe

I'm preparing a PR for this one.

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