Skip to content
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

RT5.11 crashes on activating a certain combination of modules on a certain RAW file #7237

Open
Ogven opened this issue Nov 2, 2024 · 4 comments · May be fixed by #7240
Open

RT5.11 crashes on activating a certain combination of modules on a certain RAW file #7237

Ogven opened this issue Nov 2, 2024 · 4 comments · May be fixed by #7240
Labels
tool: selective editing type: bug Something is not doing what it's supposed to be doing
Milestone

Comments

@Ogven
Copy link

Ogven commented Nov 2, 2024

Version: 5.11
Branch: 5.11
Commit: db575c669
Commit date: 2024-08-24
Compiler: cc 14.2.0
Processor: generic x86
System: Windows
Bit depth: 64 bits
Gtkmm: 3.24.9
Lensfun: 0.3.4.0
libjxl: 0.10.3
Build type: release
Build flags:  -std=c++11 -ffp-contract=off -mtune=generic -Werror=unused-label -Werror=delete-incomplete -fno-math-errno -Wno-attributes -Wall -Wuninitialized -Wcast-qual -Wno-deprecated-declarations -Wno-unused-result -Wunused-macros -fopenmp -Werror=unknown-pragmas -O3 -DNDEBUG -ftree-vectorize
Link flags:  -mtune=generic
OpenMP support: ON
MMAP support: ON
Build OS: MINGW64_NT-10.0-20348 3.5.3-d8b21b8c.x86_64 x86_64
Build date: Sat, 24 Aug 2024 18:43:52 +0000 UTC
Build epoch: 1724525032
Build UUID: 9bcd539b-04ea-4961-8ded-1ac3afe17fa9
Edition	Windows 10 Pro
Version	22H2
Installiert am	‎30.‎05.‎2021
Betriebssystembuild	19045.5011
Leistung	Windows Feature Experience Pack 1000.19060.1000.0

RT 5.11 unexpectedly closes when simultanously globally activating Haze Removal, Contrast by Detail Levels and also using Vibrance & Cool/Warm and Dynamic Range and Exposure in a Selective Editing spot.

Crash can be avoided by keeping any of these modules disabled.

Disabling/activating any other options does not appear to affect this behavior.

The crash always occurs on that specific RAW file (Sony ARW Lossless Compressed L), but it couldn't be reproduced with other RAW files of the same type.

For legal reasons I am unable to share the RAW file in question.

PP3 and log.txt: https://filebin.net/x866gvf88g65h71l

The PP3 is based on a recreation from Neutral profile. The four modules (2 global, 2 in a Selective Editing spot) are activated except for Haze Removal (but this is arbitrary, any one of the 4 modules in question may remain disabled to avoid a crash).

@Lawrence37
Copy link
Collaborator

FYI, the pp3 and backtrace are small enough to be uploaded directly.
DSC02220.ARW.pp3.txt
log.txt

The crash is caused by selective editing. It is creating some NaN values for certain extreme inputs. Reproducible with amsterdam.pef.

@Lawrence37 Lawrence37 added type: bug Something is not doing what it's supposed to be doing tool: selective editing labels Nov 2, 2024
@Lawrence37 Lawrence37 added this to the v5.12 milestone Nov 2, 2024
@Desmis
Copy link
Collaborator

Desmis commented Nov 4, 2024

@Ogven
This bug seems to be due to the combined action of Contrast By Detail Levels (which increases RGB values) which is before Selective Editing in the pipeline, and the Laplacian used by "Exposure compensation f" in Selective Editing (Dynamic Range and Exposure). The combination of the two results in out-of-range values ​​(negatives, too larges) for XYZ or Lab conversions, since LUT problems - nan values, etc..

This change - even if it is not perfect - avoids the crash without apparently disturbing the result.
It is added to a series of changes already made for the same type of problem, for processes located after Selective Editing

Here the change in iplocallab.cc after line 20535
Old code:
// if((lp.laplacexp > 1.f && lp.exposena) || (lp.strng > 2.f && lp.sfena)){//strong Laplacian
// notlaplacian = true;
// }

New code:
if((lp.laplacexp > 1.f && lp.exposena) || (lp.strng > 2.f && lp.sfena) || (lp.exposena && lp.expcomp != 0.f && params->dirpyrequalizer.enabled)){//strong Laplacian
notlaplacian = true;
}

@Lawrence37
Can you incorporate this modification into one of the current changes, if of course you validate this code

@Lawrence37
Copy link
Collaborator

@Desmis, I created pull request #7240 with your suggestion. I confirm the change does not lead to visible differences in the result. I had hoped in #7122 that there would be no more crashes like this.

@Desmis
Copy link
Collaborator

Desmis commented Nov 6, 2024

@Lawrence37

Yes, I hope :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tool: selective editing type: bug Something is not doing what it's supposed to be doing
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants