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
Segfault when opening compressed CR3 and cropped raw from Canon R5 #6279
Comments
Here's a quick and very dirty patch to avoid the segfault. It's not meant to be committed, but as a starting point for a better patch. diff --git a/rtengine/dcraw.cc b/rtengine/dcraw.cc
index ef0b4e8dc..e631d4828 100644
--- a/rtengine/dcraw.cc
+++ b/rtengine/dcraw.cc
@@ -4397,6 +4397,11 @@ void CLASS crop_masked_pixels()
}
}
} else {
+ // dirty hack to show what's wrong and avoid segfault
+ if (height == 3510 && width == 5248 && !strncmp(model, "EOS R5", 6)) {
+ top_margin = 0;
+ left_margin = 0;
+ }
#ifdef _OPENMP
#pragma omp parallel for
#endif
Maybe another dev ( @Thanatomanic ) can make a more correct patch. Ingo |
The main issue is that our Line 4371 in 166538d
I don't think we should be casually hacking that. A slightly better workaround may be similar to this #6255 To be continued... |
For reference, @agriggio has implemented raw size-dependent crops: https://bitbucket.org/agriggio/art/commits/c8df72cfd2b0c15fda1f5d5c3c5364161daff1bc |
I like how Alberto adopted my style for writing lambdas. 😎 |
I guess same problem with CR3 raw files from Canon EOS R and 1.6 crop mode. |
Same problem with Canon EOS R6 (#6330). |
See here for the original report: https://discuss.pixls.us/t/canon-r5-cropped-raws/25441
This file does not decode, but instead segfaults R5__0596.ZIP. It is shot as a lossy compressed cRAW in APS-C mode with a crop factor applied. ExifTool tells me:
There are two issues at play.
In any case, it shouldn't segfault.
The text was updated successfully, but these errors were encountered: