Beep6581 / RawTherapee

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

Segfault when opening Fujifilm X-T30ii raw files which have been shot with the SPORTS FINDER MODE 1x25 crop #6748

Closed ygbourhis closed 1 year ago

ygbourhis commented 1 year ago

Short description Segfault when opening Fujifilm X-T30ii RAF files which have been shot with SPORTS FINDER MODE

Steps to reproduce

When trying to open the RAW file of such images in RawTherapee, it crashes and we see this error in dmesg :

[  561.670464] rawtherapee[7700]: segfault at 7f7f7b4d0000 ip 000055bd313d525e sp 00007f7f73ffe7c0 error 4 in rawtherapee[55bd309c8000+b33000]
[  561.670478] Code: 40 4d 01 ed 4d 89 e9 eb 3f 0f 1f 00 41 83 f8 09 0f 84 a6 00 00 00 89 d1 44 89 c7 83 e1 01 44 09 e1 01 c9 d3 ef 89 f9 83 e1 03 <41> 0f b7 75 00 48 63 c9 83 c2 01 66 89 34 48 0f b7 83 22 46 00 00

Or with RawTherapee_dev_release.AppImage from https://github.com/Beep6581/RawTherapee/releases :

yves@berserker:~$ RawTherapee_dev_release.AppImage 

(process:12646): Gtk-WARNING **: 00:56:00.626: Locale not supported by C library.
    Using the fallback 'C' locale.
Gtk-Message: 00:56:00.636: Failed to load module "xapp-gtk3-module"
Erreur de segmentation (core dumped)

You can reproduce the bug with the raw files from this link (the JPEGS have a 1x25 Crop from the SPORTS FINDER MODE and the "Bright Kodak" recipe applied): https://www.amazon.fr/photos/share/r9V7cNlhuTEOBLTeP4ZCVYSTwzBbora25w1LBx33bxc Images shot without the SPORTS FINDER MODE 1x25 crop do not have this issue. On this link I provided 2 photos (jpeg + raw) to reproduce the bug, but the issue is for all photos with SPORTS FINDER MODE crop activated.

Expected behavior Rawtherapee should open the RAW file

Additional information

RawTherapee - Logiciel de conversion et de traitement de photos numériques de format raw (but de capteur)

      ID: com.rawtherapee.RawTherapee
     Ref: app/com.rawtherapee.RawTherapee/x86_64/stable
    Arch: x86_64
  Branch: stable
 Version: 5.9
 License: GPL-3.0+
  Origin: flathub

Collection: org.flathub.Stable Installation: system Installed: 141,9 MB Runtime: org.gnome.Platform/x86_64/43 Sdk: org.gnome.Sdk/x86_64/43

  Commit: c25ddaba485d301d40e964ff7cb7e8f3b4cfaf0b71df3c181e11316bef952e7f
  Parent: 68a41efc0c995b1cfcc1cd42549319f3a9bf66920c25d01ab58c50f51055c0c8
 Subject: Update to 5.9 (d2bc3bb5)
    Date: 2022-11-30 23:54:07 +0000
ygbourhis commented 1 year ago

I have a stupid question : Why are FUJIFILM X-T3.dcp and FUJIFILM X-T30.dcp different since these cameras technically have the exact same sensor and processor ? Same for FUJIFILM X-T4.dcp which has the exact same sensor as the 2 above except a newer processor and IBIS (In Body Image Stabilisation). In fact the Camera X-T30ii I used has the same sensor as all the above and same processor as X-T4 but without IBIS.

kmilos commented 1 year ago

And I believe X-S10, X-E4, X-Pro3 and X100V have the same sensor as well?

kmilos commented 1 year ago

As to why they're different - probably because they were submitted by different users shooting their color checkers in different conditions: time of day, time of year, longitude, weather, pollution can all affect the spectrum of "daylight".

Which is why this method of camera characterization is really not repeatable, and so, not recommended (unless you have more lab equipment and data).

ygbourhis commented 1 year ago

As to why they're different - probably because they were submitted by different users shooting their color checkers in different conditions: time of day, time of year, longitude, weather, pollution can all affect the spectrum of "daylight".

Which is why this method of camera characterization is really not repeatable, and so, not recommended (unless you have more lab equipment and data).

Makes sens. This could be another issue to log: could RawTherapee add (by a copy ?) the DCP of cameras being known as using the same sensor/processor of already supported ones until someone submits a newer one ? This would allow having more "up to date" supported cameras. Currently I use a Dynamic profile to tell that my X-T30ii should use the X-T30 DCP.

However I tried deactivating Dynamic profiles before reporting this bug, so Dynamic profiles with the X-T30 DCP is not the cause. With a default DCP I still have the issue. The cause is all photos shot with SPORTS FINDER MODE (1x25 crop).

ygbourhis commented 1 year ago

And I believe X-S10, X-E4, X-Pro3 and X100V have the same sensor as well?

Yes, only the X-T5 and X-H2 have a newer X-Trans V sensor of 40 Megapixels (instead of the 26 megapixels X-Trans IV sensor). X-H2s has also a 26 Megapixels sensor but it is a stacked sensor (different technology).

TechXavAL commented 1 year ago

@ygbourhis

I have a () question

If this is a problem for you and you're seeking for a solution, you may be better served opening a new issue, as this one has to do with a segfault, not «useless» and/or incorrect input profiles.

I know nothing about Fuji cameras, but if they are any similar to Nikon bodies, the same sensor doesn't mean the same raw image. Take into account that different camera processors may give different raw images, and above all, different models almost surely have different operative system implemented in them (specially in higher tier bodies). Don't forget that many cameras make up a bit the raw signal before writing it to disk, so different operative systems may tweak raw data a bit differently.

@kmilos

Which is why this method of camera characterization is really not repeatable, and so, not recommended

I would say that page should be read with caution, because what it says is correct (AFAIK) but a user who knows very little about creating input color profiles may understand it wrong, completely wrong.

TL,DR: it doesn't say a ColorChecker card (or similar) shouldn't be used. It says that you have to be really careful with lighting and surrounding conditions, if you want to trust the results.

And aside of having a relatively recent chart which has been carefully stored, it's better linking to this Elle Stone tutorial about making camera profiles than implying that input profiles can only be done with lab equipment. As a matter of fact I created an input profile for my D5100 following that tutorial, and I have to say that the results in RT are really really close to those using an input profile made with measured spectral sensitivity (except in the deepest blues). Though I always have in mind my display is only sRGB capable, so with a wider gamut display things may be different.

ygbourhis commented 1 year ago

@ygbourhis

I have a () question

If this is a problem for you and you're seeking for a solution, you may be better served opening a new issue, as this one has to do with a segfault, not «useless» and/or incorrect input profiles.

No it's not a problem for me. I was just asking because I tried X-T3, X-T4 and X-T30 DCPs with my XT-30ii and honestly... I don't really see a noticeable difference, I was just curious and asking. Sorry if I diverted from the real subject of the current issue.

My real problem is the segfault for which I reported this issue, and sorry for the "out of subject" question.