Beep6581 / RawTherapee

A powerful cross-platform raw photo processing program
https://rawtherapee.com
GNU General Public License v3.0
2.75k stars 313 forks source link

Wrong path used when processing profile directory #6112

Open twenster opened 3 years ago

twenster commented 3 years ago

OS: MacOS Big Sur RT: 5.8 (february version)

RAWTherapee is install in /Applications (mandatory for it to run)

Behaviour: Make any MacOS update (security). Once the update is applied, rebooted and is back on the desktop, RAWTherapee thorws the following error:

RAWTherapee Reboot

FATAL ERROR! Creation of the user's processing profile directory "/Library/Application support/RAWTherapee/config/profiles" failed!

  1. How come RAWTherapee is called after an update? (I've no insight of MacOS mechanisms)
  2. /Library/Application support/ directory is not writable by the user. However ~/Library/Application support/ is

The script launched after a macOS update should look into the user's home, and not the System's one. Note, that RAWTherapee is not start by the user (double click on the icon)...

Benitoite commented 3 years ago

Not sure about 5.8- it is a year old.

twenster commented 3 years ago

Which version is currently officially available to work with ? So I can have a look.

Benitoite commented 3 years ago

https://kd6kxr.keybase.pub/RawTherapee_OSX_10.12_64_5.8-2807-g31641f948.zip is my latest generation.

Benitoite commented 3 years ago

Most likely an error was thrown in the past and got stuck in a notification queue that expresses itself on boot. I believe this line sent the error:

https://github.com/Benitoite/RawTherapee/blob/45c7b62db248b45a1b9b6d808a7271231efac34b/rtgui/options.cc#L113

Now to find where the path is being built.

tonigi commented 3 years ago

I got the same error. It manifests on login. What is really puzzling is what on earth starts rawtherapee-bin on user login. I can find no trace of it in any of the launch agents.

Edit: this is the only possible clue I found:

responsible pid = 979
responsible unique pid = 979
responsible path = /System/Library/CoreServices/Setup Assistant.app/Contents/Resources/mbfloagent
Benitoite commented 3 years ago

Most likely an error was thrown in the past and got stuck in a notification queue that expresses itself on boot.

tonigi commented 3 years ago

Yes, but where in MacOS is this queue? Is the notification queued automatically on "throw"? I couldn't find any documentation, nor file, on this regard.

To clarify: the window is not a "system notification". It's rawtherapee-bin actually being executed.

twenster commented 3 years ago

From the look and feel of the window, MacOS doesn't render it. The font is Helvetica, and not the system font (San Francisco), also the OK button would not be that large, and not centered (but small on the right handside of the window), and there is no margin between the button and the window borders. The window look is much like the one rendered by RawTherapee istelf (ie GTK+ ?).

Also, not shown in the screenshot, the window was displayed at the top left of the screen. System message window are normally placed in the center of the screen.

I hoped I could find some logs in /var/log or /var/logs or even /usr/local/var/log. But nothing found.

EDIT: I've no experience in developping macos apps, I only explain with my experience in normal behaviour of the system.

tonigi commented 3 years ago

I think "something" is executing rawtherapee-bin as a system user. This makes it search for a missing path, and throw an exception which manifests with that gtk window.

What that "something" is is a real mystery, and also a bit concerning if you ask me.

twenster commented 3 years ago

It looks like so for me too. I would expect a LaunchAgent or a LaunchDaemon (system or user), but couldn't find one. May be MacOS checks (registered) applications after a MacOS update, then RAWTherapee is and looks for system wide profiles instead of user profile. This window displayed after macos update... Only supposition.

tonigi commented 3 years ago

Apparently it's no Agent or Daemon. Seems something exotic. Hypotheses:

Benitoite commented 3 years ago

Please confirm you all are testing the dev build cleanly and not a release nor on top of a previous install, and state your OS versions. I cannot reproduce on 11β.

tonigi commented 3 years ago

No sorry, I am using release. It occurred upon several OS upgrades, and certainly in 11.2.2 -> 11.2.3

Pandagrapher commented 3 years ago

I cannot reproduce on 11β.

Same for me: I don't have this behavior anymore when installing a Big Sur update with 5.8 release version. Moreover, profile directory path computation has been updated in dev since 5.8. We should see if this issue is still available with future 5.9 release.

vancleve commented 1 year ago

I just ran into this.

I wonder if its a "saved application state" that can be found here

/Users/.../Library/Saved Application State/com.rawtherapee.rawtherapee.savedState

??