Beep6581 / RawTherapee

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

Crash while opening NEF file in Mac OSX 10.11.3 #3966

Closed kapiliitr closed 6 years ago

kapiliitr commented 7 years ago

I am using RawTherapee version 5.1 on Mac OSX El Capitan 10.11.3. RawTherapee often crashes while opening or saving raw files. Attached is a log I got from the crash report.

You can find the NEF and PP3 files at https://filebin.net/nctysdtw0uorc386

rtcrash.txt

Benitoite commented 7 years ago

@kapiliitr That particular cairo font code related crash is well known. You should not have this crash with this build: [outdated link removed]

kapiliitr commented 7 years ago

@Benitoite Thanks. I was able to open the image in that build. However, all the fonts are too large in when I started RawTherapee and I was unable to figure out how to reduce it. Is this a build issue or how can I revert to smaller fonts ? I have attached an image of how the application looks with this build.

screen shot 2017-07-12 at 10 58 46 pm
Benitoite commented 7 years ago

Have you tried changing the font size in the preferences window? (The sliders icon in the lower left hand corner, "General" pane in the Default Theme section)

Benitoite commented 7 years ago

screen shot 2017-07-13 at 4 58 08 am Here's how it looks on my clean 10.11.6 machine. I also noticed you're missing some interface items on the extreme right side.

kapiliitr commented 7 years ago

I reduced font to 6 but that didn't seem to change anything at all. Also, the preferences tab also opens pretty big and I think all options are not visible and I am unable to scroll also.

screen shot 2017-07-13 at 7 32 50 am
Beep6581 commented 7 years ago

Your font is set to "None". How big are 6 points of none? Try setting a font in addition to a size.

The default font family is "default": fontFamily = "default"; https://github.com/Beep6581/RawTherapee/blob/dev/rtgui/options.cc#L344 @Benitoite @Hombre57 any idea why/under what circumstance it would show up as "none"? Broken macOS installation?

kapiliitr commented 7 years ago

I couldn't find the default font.

screen shot 2017-07-13 at 7 54 41 am

I picked the Apple Gothic font and set the size to 4 and although the font reduced but the window still clips settings on the extreme right. I had to resize the window to make it fit in my 15 inch screen. However, this does not seem as pretty as the default font and size.

screen shot 2017-07-13 at 7 58 24 am
Hombre57 commented 7 years ago

The default font for fresh install (with no existing options file) should not set the font. At least should try w/o it. See this patch : OSX-default-font.txt

If you still want to set the default font in this default options file, the 2 removed line should be added at the end of the file, otherwise some parameters won't be read.

Benitoite commented 7 years ago

I can't get the font to resort to any kind of default. Tried deleting ˜/.cache and ˜/.config and commenting out the 2 lines in /Applications/RawTherapee.app/Contents/Resources/options However, RT seems to run without generating a new options. @Beep6581 @Hombre57 am I doing it wrong?

Benitoite commented 7 years ago

Could this be related? https://github.com/Beep6581/RawTherapee/issues/3964#issuecomment-314668979

"Nothing changes after I delete config files."

Beep6581 commented 7 years ago

@Benitoite is what you write true with @Hombre57 's patch?

As a workaround, maybe we could hard-code some default font for macOS. Does macOS have a font called simply "Sans Serif"?

RT seems to run without generating a new options

Are you absolutely sure about that?

Benitoite commented 7 years ago

@Beep6581 I believe Arial is typically used as a default sans serif. Here's a list of the default fonts installed in MacOS 10.9: https://support.apple.com/en-us/HT201375

I'm not absolutely sure it's not generating a new options, but I am not seeing appropriate folders pop up in ˜/.config which is where I'm expecting it.

ls -la /users/tune/.config
total 16
drwx------   10 tune  staff   340 Jul 14 03:30 .
drwxr-xr-x+ 142 tune  staff  4828 Jul 16 15:17 ..
-rw-r--r--@   1 tune  staff  6148 Jul 14 03:30 .DS_Store
drwxr-xr-x    3 tune  staff   102 May 30 06:19 .LuminanceHDR
drwxr-xr-x    5 tune  staff   170 Apr 25 02:01 QtProject
drwx------    6 tune  staff   204 Feb 14 03:46 darktable
drwxr-xr-x    5 tune  staff   170 Dec 17  2016 fontforge
drwxr-xr-x   43 tune  staff  1462 Mar 22 14:19 gmic
drwx------    3 tune  staff   102 Jul 15 10:13 gtk-2.0
drwx------    2 tune  staff    68 Dec 25  2016 gtk-3.0
Beep6581 commented 7 years ago
  1. If ~/.config/RawTherapee* isn't being generated, how about ~/.cache/RawTherapee*?
  2. Can you search for the options file while RT is running? Maybe the startup script has something to do with it. sudo updatedb && locate options in Linux, alternatively find / -type f -name "options" 2>/dev/null
Benitoite commented 7 years ago

1) Did not find ~/.cache/RawTherapee*

ls -la /users/tune/.cache
total 24
drwx------   11 tune  staff   374 Jul 14 03:32 .
drwxr-xr-x+ 142 tune  staff  4828 Jul 16 15:17 ..
-rw-r--r--@   1 tune  staff  8196 Jul 14 03:33 .DS_Store
drwx------    3 tune  staff   102 Jul 15 10:14 babl
drwx------    3 tune  staff   102 Nov 24  2015 darktable
drwxr-xr-x   51 tune  staff  1734 Jun 30 17:35 fontconfig
drwxr-xr-x    3 tune  staff   102 Dec 17  2016 fontforge
drwxr-xr-x   18 tune  staff   612 Jul  8 05:49 g-ir-scanner
drwx------    3 tune  staff   102 Feb 23  2015 gegl-0.2
drwx------    4 tune  staff   136 Jul 14 03:33 gegl-0.3
drwxr-xr-x    4 tune  staff   136 Jul 14 03:33 guile

2) Did not find the generated options, just the original inside RawTherapee.app/Contents/Resources/options

find / -name "options"
/Applications/FontForge.app/Contents/Resources/opt/local/share/fontforge/nodejs/collabwebview/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/options
/Applications/RawTherapee.app/Contents/Resources/options
/Applications/Xcode.app/Contents/Developer/usr/share/xcs/xcsd/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/options
/Applications/Xcode.app/Contents/Developer/usr/share/xcs/xcsd/node_modules/ws/node_modules/options
find: /dev/fd/.cache: No such file or directory
find: /dev/fd/.cache: No such file or directory
Beep6581 commented 7 years ago

Ok, that's quite serious! Could you try running RT, opening any folder with photos, then find / -name "aehistograms" 2>/dev/null while RT is open?

Benitoite commented 7 years ago

Aha! Found it in /Users/tune/Library/Application Support/RawTherapee/cache and "options" in /Users/tune/Library/Application Support/RawTherapee/config

So, no matter whether the two font lines are in the original options, the result is this:

FontFamily=default
FontSize=10

and inside the running app, the font is listed as "None 12" in the prefs window. Note that "None" is not an actual font on my system.

Hombre57 commented 7 years ago

@Beep6581 :

@Benitoite @Hombre57 any idea why/under what circumstance it would show up as "none"? Broken macOS installation?

I'd say so. default is a keyword in RT config file, meaning "don't set any special font, use the Gtk default font and size". With default set in options, the font set in Preferences is Segoe UI normal on my Win7 platform. I don't know why it end up to None on macOS, it seem there's no default font ??? Replace default by sans (which should be translated to a platform specific sans serif font by Gtk). If that works, we could set it as default font for maxOS, as a workaround.

Hombre57 commented 7 years ago

Oh, and it may depend on your Gtk version. Please post the content of the AboutThisBuild.txt file.

Benitoite commented 7 years ago

I'm on macports gtk+3 which reports

port info gtk3
gtk3 @3.22.16 (gnome, x11)
Variants:             (+)quartz, universal, (-)x11

About this build:

Version: 5.1-162-g26077cd0
Branch: dev
Commit: 26077cd0
Commit date: 2017-07-16
Compiler: clang-mp-3 3.9.1
Processor: generic x86
System: Apple
Bit depth: 64 bits
Gtkmm: V3.16.0
Build type: release
Build flags: -arch x86_64 -O3 -mmacosx-version-min=10.9 -std=c++11 -mtune=generic -Werror=unused-label -mmacosx-version-min=10.9 -flto -fopenmp=libomp -Werror=unknown-pragmas -Wall -Wno-unused-result -Wno-deprecated-declarations -O3 -DNDEBUG
Link flags: -arch x86_64 -mmacosx-version-min=10.9 -mtune=generic -headerpad_max_install_names -flto
OpenMP support: ON
MMAP support: ON
Beep6581 commented 6 years ago

@Benitoite so you have GTK+ 3.22.16 installed, but RT seems to be using 3.16.

@Benitoite could you build dev, and @kapiliitr could you test it?

Specifically:

  1. Run it normally, and if anything looks bad, then
  2. Close it, edit the options file, change Verbose=false to Verbose=true, run it again from a console, and paste all output here.
Benitoite commented 6 years ago

@Beep6581 Well, it is gtk3 v3.22.16 but as listed the gtkmm is at 3.16; both supplied by macports currently.

Version of bundled gtk3:

Load command 3
          cmd LC_ID_DYLIB
      cmdsize 48
         name @rpath/libgtk-3.0.dylib (offset 24)
   time stamp 1 Wed Dec 31 16:00:01 1969
      current version 2201.16.0
compatibility version 2201.0.0

and gtkmm3:

Load command 3
          cmd LC_ID_DYLIB
      cmdsize 56
         name @rpath/libgtkmm-3.0.1.dylib (offset 24)
   time stamp 1 Wed Dec 31 16:00:01 1969
      current version 3.0.0
compatibility version 3.0.0

Here's a fresh dev build you to test, @kapiliitr : https://filebin.net/7lb9pjvtfp4stugz/RawTherapee_OSX_10.9_64_5.1-175-g0875898d.zip

Benitoite commented 6 years ago

btw @kapiliitr to edit options file without the use of terminal, do a command-shift-G in the finder and go to/Users/YourUserNameHere/Library/Application Support/RawTherapee/config then you can edit options with text edit.

kapiliitr commented 6 years ago

I don't seem to have a folder /Users/YourUserNameHere/Library/. Also, I think this build took the font settings that I had set in a previous build instead of the defaults if you set any.

Benitoite commented 6 years ago

Yes @kapiliitr. RT is just relying on the options file in your config folder. It could be: /Users/kapiliitr/Library/Application Support/RawTherapee/config depending on what your actual username is on your mac. For instance, my username on the mac is "tune", so my config folder is located at /Users/tune/Library/Application Support/RawTherapee/config Also note that the Library folder is hidden, so you are not able to directly browse there in the finder without specifying it with command-shift-G.

kapiliitr commented 6 years ago

Lol, I got that. I didn't know Library folder was hidden in Mac.

Benitoite commented 6 years ago

I just checked my 10.11.6 clean machine, and I have the hidden Library folder in my user dir.

@kapiliitr Try then the folder /Users/<my username>/.config

kapiliitr commented 6 years ago

Attached logs by running RT from command line. rtcli.txt

Beep6581 commented 6 years ago
Add camera constants for "HASSELBLAD CF-22MS"
Add camera constants for "HASSELBLAD CFH-22"
Add camera constan

@kapiliitr what happened there? Did it stop just like that, or was it a copy-paste error? My log looks like this from that point on: https://paste2.org/P12Iz9cK

Benitoite commented 6 years ago

Fwiw, here's what mine looks like on the clean macOS 10.11.6 machine. https://paste2.org/cY9twA17

heckflosse commented 6 years ago
(rawtherapee-bin:32772): GLib-GObject-WARNING **: invalid cast from 'GtkMenuBar' to 'GtkWindow'

(rawtherapee-bin:32772): Gtk-CRITICAL **: gtk_window_add_accel_group: assertion 'GTK_IS_WINDOW (window)' failed

smells like a bug in this part of the code:

        // RT don't have a menu, but we must create a dummy one to get the default OS X app menu working
        GtkWidget *menubar;
        menubar = gtk_menu_bar_new ();
        gtkosx_application_set_menu_bar (osxApp, GTK_MENU_SHELL (menubar));
kapiliitr commented 6 years ago

@Beep6581 I am not sure what happened there, something might have went wrong during redirecting stdout to a file. I got another set of logs though. https://paste2.org/Lc4aZsaM

Beep6581 commented 6 years ago

Anything to commit for 5.2?

Benitoite commented 6 years ago

@Beep6581 Not from my side. I'm having an issue with libiomp5 not being copied into the bundle, but I have a cp command added in macosx_bundle.sh locally to fix it.

Beep6581 commented 6 years ago

Ok, closing. If we should include the libiomp5(.dylib?) copy command, we can look into that in a new issue with @ion12 and @partha1b