-
Notifications
You must be signed in to change notification settings - Fork 281
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
Seg. fault - Geeqie with 0.28.0 and certain .nef files #2638
Comments
@caclark I examined your image using the exiv2 app and didn't find any problems. As the app is a basic front end for the Exiv2 library, it is a good way to test if we can correctly process a file's metadata. For example, $ exiv2 --Print xkcyvt 2019-12-23-11:21:44-DSC_3328.NEF
0x00fe Exif.Image.NewSubfileType Long 1 1 Thumbnail/Preview image
0x0100 Exif.Image.ImageWidth Long 1 160 160
0x0101 Exif.Image.ImageLength Long 1 120 120
0x0102 Exif.Image.BitsPerSample Short 3 8 8 8 8 8 8
0x0103 Exif.Image.Compression Short 1 1 Uncompressed
0x0106 Exif.Image.PhotometricInterpretation Short 1 2 RGB
0x010f Exif.Image.Make Ascii 18 NIKON CORPORATION NIKON CORPORATION
0x0110 Exif.Image.Model Ascii 12 NIKON D3300 NIKON D3300
... (see --Print flgs). I don't know the Geeqie code but perhaps the recent conversion to Exiv2 0.28.0 still has problems? I am sorry but I don't have more time to help with this issue. |
Thanks for taking a look at this. The crash is at line 3394 of nikonmn_int.cpp with tag Exif.NikonFl6.ExternalFlashData1. I will do what I can to try to find the problem. |
Just out of interest, does Geeqie work when using the same binaries that I used? |
Using the command line I compiled Geeqie using The two Geeqie source files involved have not had any changes other than type-casts (the project went from c to c++) and the changes necessary due to Exiv2 0.28.0. |
The crash occurs also with file RAW_SONY_R1.SR2 from rawsamples.ch. The crash occurs at line 702 of sonymn_int.cpp. That line is: And the line 3394 of nikonmn_int.cpp is My assumption is that either I have no understand of c++, so if anyone has a suggestion of how I can further debug this, that would be good. |
I downloaded the raw Sony file and tested it using the exiv2 app (with exiv2-0.28.0-Linux64.tar.gz). On Linux Mint 21.1 , I could read the file without issue:
At the moment, I'm not sure where the problem lies. To narrow things down, it would be helpful to know on Ubuntu 23.04:
As I said before, I'm sorry but I don't have the time to fully take on this issue. |
The exiv2 command line program, version 0.28.0, works with my test files. I'm sorry, but the only way I can get exiv2 to compile is via meson, which shows this data: I made a primitive hack in by including: When a problem tag is encountered, I will continue to try to find out why. |
@caclark the meson version is unfortunately not as mature as the CMake one. When I tried adding tests, I couldn’t get them to pass. As far as the wrap is concerned, try without it. Compile the CMake build and install it with sudo make install. meson should be able to pick it up then. If not, PKG_CONFIG_PATH needs to be set. |
Thanks. After installing the cmake version I get: |
So the error is not meson. Great! |
The Geeqie bug report BestImageViewer/geeqie#1105 |
@kevinbackhouse Naturally, I have no understanding of this piece of code - I just hope this information may help a little. |
That is…interesting. Guess extra debug code is needed to find out what fct is. |
I've figured out how to build geeqie so that I can debug this. Here's the relevant part of the stack trace:
The problem is that I believe The thing that I'm not sure about is where the bug is. Are functions like |
@caclark: I have created a PR which I think fixes this: BestImageViewer/geeqie#1119 |
Gwenview on Arch is also affected. (gwenview 23.04.2-1, exiv2 0.28.0-2) stack trace
The null dereference happens while reading .jpg files exported by Darktable from Sony ARWs. The function that fails to handle |
@postscript-dev: I think you added some of these functions like |
@kevinbackhouse |
@kevinbackhouse an alternative is to mark such functions with the nonnull attribute to add warnings to third party applications. |
The common ancestor in Geeqie and Gwenview stack traces is |
Hrm never mind then. |
Last update of geeqie in Arch Linux repo -- geeqie 2.1-1 -- runs now perfectly without crashing. |
Describe the bug
When Geeqie is compiled with exiv2 0.28.0, viewing the exif data of certain files cause a crash. This occurs with .nef files from my camera, but not with downloaded test .nef files.
The fault does not occur with earlier versions of exiv2.
To Reproduce
Compile Geeqie with exiv2 0.28.0. Run and load the attached .nef file. Open the Exif Window.
Attached is a sample image from my camera (copyright free)
The stack trace after the seg. fault which includes some debug output prior to the crash
The source code of the two Geeqie files involved.
Desktop (please complete the following information):
Ubuntu 23.04
Exiv2 0.28.0 via
meson wrap install exiv2
gcc version 12.2.0 (Ubuntu 12.2.0-17ubuntu1)
meson warning level 3
2019-12-23-11:21:44-DSC_3328.NEF.gz
exiv2.cc.gz
advanced-exif.cc.gz
exiv2-028-1-log.txt.gz
The text was updated successfully, but these errors were encountered: