JUCE icon indicating copy to clipboard operation
JUCE copied to clipboard

[Bug]: Linux: overly strict assertion on executable path prevents valid use cases

Open jistr opened this issue 1 year ago • 0 comments

Detailed steps on how to reproduce the bug

This assertion looks overly strict to me, requiring an absolute or relative path, but not allowing for binaries which reside on $PATH, even though later on execvp is used which should resolve the $PATH use case fine:

https://github.com/juce-framework/JUCE/blob/22df0d2266007bccb25d6ed52b9907f60d04e971/modules/juce_core/native/juce_SharedCode_posix.h#L1105-L1106

If the program is not in working dir, it is on $PATH instead, and it has been launched only using its name (e.g. helio) and not via its absolute path (e.g. /usr/bin/helio) then the assertion will fail.

The strict assertion seems to be the root cause of this issue: https://github.com/helio-fm/helio-workstation/issues/280

What is the expected behaviour?

Program on $PATH should be executable using its command name without any path components (absolute or relative).

Operating systems

Linux

What versions of the operating systems?

Fedora 38 (but i don't think it's relevant)

Architectures

x86_64

Stacktrace

No response

Plug-in formats (if applicable)

No response

Plug-in host applications (DAWs) (if applicable)

No response

Testing on the develop branch

The bug is present on the develop branch

Code of Conduct

  • [X] I agree to follow the Code of Conduct

jistr avatar Sep 26 '23 20:09 jistr