-
Notifications
You must be signed in to change notification settings - Fork 306
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crash while loading Fuji XTrans files #3154
Comments
@pi99y It's related to xtrans files. I can reproduce it in Release build of master branch. It's not related to old pp3 files (at least the crash I get). |
I do not seem to get this kind of problems with xtrans files from my
Fujifilm X-T1.
|
I can sometimes reproduce it with a X-Pro 2 dng file. Sometimes it crashes, sometimes I got black output when saving to tif (bit not when saving to jpg) and sometimes it works fine. Looking |
@heckflosse Great! I mean, great you can reproduce it. You're much likley to find the cause than me. Thanks for looking into it. |
Unfortunately I can't reproduce it in debug build. I'll run it through valgrind |
For me it's also present (the crash) in: EDIT: EDIT: "backtrace" screenshot EDIT: whole gdb log |
Disabling film simulation in those pp3 files seems to "fix" it... I "mass edited" the:
to
in the pp3 files and now I either cannot reproduce or it is at least much less frequent (no crash yet)... so my crash is somehow related to that... |
I opened #3156 because I think the crashes I observed have a different reason than the crashes pi99y observed. |
I did a test: I downloaded a PEF image and copied it 50 times, applied my usual default profile and then applied another bundled profile on top of that. Then I did the same test, but I uset a single FUJI Xtrans file (50 copies of it). So for now it looks it could be a combination of Xtrans & film-simulation... |
@heckflosse Sadly, @sguyader 's new RawTherapee_WinVista_64_Gtk3_Debug_4.2.764 Changeset: 5086c0d didn't solve this. Here are two new backtraces of this crash: http://filebin.net/ctjdqlr0j7/gdb2.txt and http://filebin.net/ctjdqlr0j7/gdb3.txt Thanks. |
@pi99y Ingo's fix was pushed to the Master branch, so if you want to test it you should try my Master (4.2.677) build. |
Oh, cool, so there still is a chance! :) I'll report back. |
Unfortunately it's still the same (with Master branch: 4.2.677)... still crashes. New backtrace log: http://filebin.net/ctjdqlr0j7/gdb4.txt |
Hello! any news about the bug? If required, i can provide raw files too which crash RT. |
Please provide files 👍 |
The problem exists since i updated my XE2 to FW4.0. I have uploaded 3 files at http://filebin.net/hv52p3oyjh . Different content but same parameters. If you need RAW with different settings please specify. I use RT 4.2.0 with Linux Mint and with Windows 7 64bit (4.2.699, 64bit). Both quit when i want to open a file from the file manager to the edit window. The file manager itself shows all files with correct meta data. |
@Karteileiche After solving the trouble with your zip (it contains a tar file with extension .RAF) I could open all three files without problems using rt 4.2.745 on Win7/64 |
Sorry for the ZIP-problem.. i just used the "compress" option in Mint/Dolphin file manager. I did not know that there is a newer version, it is not listed at http://rawtherapee.com/downloads. Thanks for your Help. |
@Karteileiche Ok, thank you for the report and the example files 👍 |
Sorry for the inactivity. I can still easily reproduce the crash (with the images I provided to @heckflosse) on the latest "master" RawTherapee version 4.2.752 b3f6f1c |
@pi99y I tried to reproduce the crashes with the images you provided. But all works fine here. If you have one image with the corresponding pp3 which allows to clearly reproduce the crash, please tell me. |
No, sorry, for me it seems it's the process of creating previews/thumbnails while trying to edit what seems to crash it. A specific SET of files. Sometimes one fine works fine, the other time it crashes... ALSO: could it be that you can't reproduce it from my files since you don't have CLUTs at the right location (as referenced in my pp3s)? Previously I reported that it seems film simulation related... |
@pi99y I don't remember. I'll try again |
RAF files from my X-E2 firmware 4.0 crash RawTherapee on Linux (Debian sid, RT 4.2.something) and work on Windows (W10 RT 4.2.905). Having no problems with the latest (windows) version I expected this bug to closed and filed a bug to the Debian BTS asking for a new build. Any updates on this issue? |
you are right, the linux version lacks on this fix. i am also waiting for an update. @heckflosse |
|
@heckflosse Okay, I'll investigate tomorrow. :) |
@Floessie great 👍 |
@heckflosse I've got an idea for my evening session: If we can't go the high road ( I've already started a "dedusting" branch last evening, which I will push for you to test when I'm through with the |
@heckflosse Could you please check, if it still crashes for you? |
@Floessie I just pulled your changes. Making generic build now... |
@Floessie Generic Release build crashes, making Generic Debug build now... |
@Floessie Sorry, tested wrong branch.... |
@heckflosse Phew, you like to raise the tension! :) |
@Floessie dedusting... branch still crashes with generic debug build. Making further tests now... |
@heckflosse I not only changed |
@Floessie with added -msse4 flag dedusting... generic build works fine! |
@heckflosse So it's not the alignment but either |
@Floessie I made further tests. Crashes with Generic Release build without -msse4. Works fine with Generic Release build with -msse4. |
@Floessie Brute force _mm_set_ps() variant work fine for non -msse4 Generic build |
@Floessie Here's the code of _mm_cvtpu16_ps from xmmintrin.h at my system if that's of any use:
|
@heckflosse GCC 5.3.1 has exactly the same code. I've got a clang 3.5.0 version here (annotations by me), which is a bit different, and could be tried by pasting it as
I have no idea, what's wrong with your compiler and |
@heckflosse Don't know how old and still relevant this is, but there are some hints you could try. Ah, and also see this and this. There is definitely a problem with MinGW, stack alignment, and SSE, at least on 32 bits. HTH, |
@Floessie Yes, that's a known problem. For this reason RT win32 builds are made with -mstackrealign. For win64 builds this was not necessary in past and should still not be necessary. |
@Floessie I found a solution for SSE2 (non SSE4) code which does not need MMX registers and does not crash. Here's some test code which can easily be adopted to getClutValues():
|
@heckflosse YEAH!!! Breakthrough! 👍 Not only this shall work (still cannot test, as I'm not on Windows), but it's nearly as fast as the SSE4 version (I was a bit skeptical at first due to the sheer number of instructions):
It's committed on my dedusting branch for you to retest. Great work! Thanks a lot! |
@Floessie Retested! Works fine. Feel free to change the var names and so on to your coding style and make a PR. Maybe astyle it too. Don't remember if I did that. |
@Floessie _mm_set1_epi32(0x0000ffff) could be called once instead of twice in my code. But maybe compiler optimizes it away... |
The number of instructions are:
if I counted correctly |
@heckflosse Yes, it's clear to me that a line count doesn't translate to the number of instructions, that's why I wrote "at first". :) I'll make the mask a constant and file the PR this evening. Again, thanks for solving that crash. Still, there is no explanation as to why the MMX instructions miscompile in this case, or have you found an answer? |
@Floessie I searched a bit for information on Windows 64 bit and MMX but found nothing reliable. Anyway, it's solved now. That's the important thing. |
@heckflosse Definitely! I'm very glad, you found such a perfect solution. And here is my PR. |
@Floessie May I suggest a tiny change? |
HaldCLUT cleanups after the dust (#3154) has settled
Hi, I get quite frequent crashes that seem to be caused by older pp3 files, but it's really hard to pinpoint the issue, since it's a bit "random"...
Tested on:
I open up a folder with a at least a few images, try to load a file and it sometimes crashes. It can either crash while still in (or returning to) "file browser" view or already in the "editing view", but seems like it always crashes while either "loading", "demosaicing" or "processing" - not later on while editing (if i can get to that stage).
It seems not to be tied to specific image since it sometimes crashes on one file, some other time on another file, but nothing really consistant.
I tried to narrow it down, but I can only say that it appears that at least two things help while reproducing:
PP3 files in this case say "AppVersion=4.1.80 Version=321".
Most of the time it crashed I get the debug report saying "pure virtual method called, terminate called without an active exception" but not always (sometimes there is no error message in the debug window)
Also note that the "failed to fetch network locations" error you see in the screenshot pops up every time I start RT and seems not to be related to this issue.
Screenshot: https://i.imgur.com/PMbtxiM.jpg
PP3: http://filebin.net/tvof90mays
(I'm not missing any files that are referred to in a profile, just the RT version is newer)
The text was updated successfully, but these errors were encountered: