Segmentation fault when replacing a tag by itself
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
pyexiv2 |
Fix Released
|
Medium
|
Olivier Tilloy |
Bug Description
Hi,
I first used the version 0.1.3 provided by my distribution (Ubuntu Lucid on i386), and used the following code (extract):
d1=pyexiv2.
d2=pyexiv2.
d1.readMetadata()
d2.readMetadata()
for key in d1.exifKeys():
print str(key)+" : "+str(d1[key])
d2[key]=d1[key]
This crashed on "Exif.CanonCs.Lens : (55, 18, 1) ValueError: invalid literal for int() with base 10: '(55, 18, 1)" which is a known bug, that has been fixed in most recent versions.
So I installed first the 0.2.2 and the the latest brz one with the same outcome.
The code is now:
d1=pyexiv2.
d2=pyexiv2.
d1.read()
d2.read()
for key in d1.exif_keys:
print str(key)+" : "+str(d1[key])
d2[key]=d1[key]
And it crash just after the d2[key]=d1[key] affectation printing only:
Exif.Image.Make : <Exif.Image.Make [Ascii] = Canon>
Segmentation fault
I used the version 0.19-1 of libexiv2 (the one distributed by ubuntu).
Thanks for any help.
Related branches
summary: |
- Segmentation fault on key affectation with 0.2.2 + Segmentation fault when replacing a tag by itself |
Changed in pyexiv2: | |
milestone: | none → 0.3 |
Changed in pyexiv2: | |
status: | Fix Committed → Fix Released |
Simplification of the problem:
This is enough to crash: ImageMetadata( "org/img_ 9085.jpg" )
d1=pyexiv2.
d1.read()
for key in d1.exif_keys:
print str(key)+" : "+str(d1[key])
d1[key]= d1[key]
That works until a non string is required ( Invalid value for EXIF type [Short]): ImageMetadata( "org/img_ 9085.jpg" )
d1=pyexiv2.
d1.read()
for key in d1.exif_keys:
print str(key)+" : "+str(d1[key])
d1[key]= str(d1[key])
Sorry for first report and I agree that it's still not very clear.
Can you reproduce?
Thanks.