Author Topic: PI chrashes when open Fujifilm RAW File  (Read 2995 times)

Offline habach

  • Newcomer
  • Posts: 3
PI chrashes when open Fujifilm RAW File
« on: 2016 May 03 03:34:49 »
PI 1.08.04.1195
Mac OSX 10.11

Since I updated the Firmware of my Fujifilm X-E2 to Version 4.0, PI chrases when I open a raw file.
Fujifilm made some improvements (compression) in his raw files, this problem occurs also with raw files from the new X-Pro2 and X-E2s.

Is it possible to implement such a bugfix like in Rawtherapie that also use dcraw code. Or is a new dcraw version on the way?

I found this infomation on github about - Segfault opening Fujifilm X-E2 firmware v4.0 RAF files

https://github.com/Beep6581/RawTherapee/issues/3137

---------------------------------------------------------------------------------------------------------------------------
P.S, here's the full email from Dave:

I haven't figured out Fuji's 0xc000 tag.  In the older file
it's (using my parse.c program):

Fuji tag=0xc000, len=21984, data = 00 00 4f 02 48 13 00 00 e0 0c 00 00 ...

     0x00001348 is the width (4936 decimal) and 0x00000ce0 is
the height (3296), in little-endian byte order.  With the new
firmware it looks like:

Fuji tag=0xc000, len=21984, data = 00 00 56 03 57 52 54 53 48 13 00 00 e0 0c 00 00

     The extra four bytes "57 52 54 53" spell out the letters
"WRTS".  Not sure what that stands for.  I also see WRNEDCTS,
DSCF, DCNETSTS, TSNERDTS, RDNESQTS, SQNERSTS, RSNECPTS, and
CPNEVFTSVFNE, none of which appear with the old firmware.

     Anyway, this patch finds the width and height until the
next firmware update:

--- dcraw.c     2015/05/25 02:29:14     1.476
+++ dcraw.c     2016/02/10 21:28:34
@@ -6721,7 +6721,7 @@
     } else if (tag == 0xc000) {
       c = order;
       order = 0x4949;
-      if ((tag = get4()) > 10000) tag = get4();
+      while ((tag = get4()) > 10000);
       width = tag;
       height = get4();
       order = c;
---------------------------------------------------------------------------------------

Thanks
Hannes Bachleitner

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: PI chrashes when open Fujifilm RAW File
« Reply #1 on: 2016 May 03 04:57:11 »
Hi Hannes,

I have just released an update that fixes this problem. Thank you so much for the heads up, and for all the information you have provided. It has been of great help to solve this issue quickly.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline habach

  • Newcomer
  • Posts: 3
Re: PI chrashes when open Fujifilm RAW File
« Reply #2 on: 2016 May 03 05:16:39 »
Hi Juan

Wow, you are realy fast :)

Thanks a lot
Hannes

Offline habach

  • Newcomer
  • Posts: 3
Re: PI chrashes when open Fujifilm RAW File
« Reply #3 on: 2016 May 03 05:26:11 »
Hi Juan

I installed the fix now, works perfect!

Thanks
Hannes