shotwell crashes on importing images

Bug #676949 reported by Klaus Doblmann on 2010-11-18
80
This bug affects 12 people
Affects Status Importance Assigned to Milestone
gexiv2
Invalid
Unknown
exiv2 (Ubuntu)
Undecided
Unassigned
gexiv2 (Ubuntu)
Undecided
Unassigned
shotwell (Ubuntu)
High
Robert Ancell

Bug Description

Binary package hint: shotwell

On Natty the gexiv2-package 0.2.1-1ubuntu1 has broken shotwell, it crashes on importing pictures. Reverting to maverick's 0.2.0-0ubuntu2 version of gexiv2 fixes the problem. I guess shotwell would need a rebuild?

Here's the gdb output:

Starting program: /usr/bin/shotwell
[Thread debugging using libthread_db enabled]
[New Thread 0x7fffe65fc710 (LWP 26828)]
[New Thread 0x7fffe5dfb710 (LWP 26829)]
[New Thread 0x7fffe55fa710 (LWP 26830)]
[New Thread 0x7fffe1b9f710 (LWP 26831)]
[New Thread 0x7fffe1061710 (LWP 26832)]
[New Thread 0x7fffe0860710 (LWP 26833)]
[Thread 0x7fffe1b9f710 (LWP 26831) exited]
[Thread 0x7fffe1061710 (LWP 26832) exited]

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff76dc890 in gexiv2_metadata_get_orientation () from /usr/lib/libgexiv2.so.0
(gdb) quit

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: shotwell 0.7.2-0ubuntu2
Uname: Linux 2.6.37-rc2-custom x86_64
NonfreeKernelModules: wl
Architecture: amd64
Date: Thu Nov 18 12:43:53 2010
InstallationMedia: Ubuntu 10.04 "Lucid Lynx" - Alpha amd64 (20100113)
ProcEnviron:
 LANGUAGE=de_AT:de:de_DE:de_CH:de_LU:de_LI:de_BE:en
 PATH=(custom, user)
 LANG=de_AT.utf8
 SHELL=/bin/bash
SourcePackage: shotwell

Klaus Doblmann (moviemaniac) wrote :
Omer Akram (om26er) wrote :

i dont have natty anywhere (not even iso :() i am building shotwell with build-dep gexiv-0.2.1 in my ppa https://launchpad.net/~om26er/+archive/test please test if that solves the issue

Changed in shotwell (Ubuntu):
importance: Undecided → High
milestone: none → natty-alpha-1
status: New → Confirmed
Omer Akram (om26er) wrote :

build failed in ppa :(

pschonmann (pschonmann) wrote :

I tried little experiment. Import files from folder, not from Card/Camera. Gdb and log included as requied in FAQ

Open shotwell
Import From folder. I selected download folder, some jpgs are there, BUT EVERY FILES ARE GRAYED OUT
Clicked on ok.
Shotwell asked me copy files into library or make links (both options cause crash) or cancel button
Than crashed.

This error looks interesting:
Error: Directory Sony with 8704 entries considered invalid; not read.

I have no directory called Sony in downloads.

Jim Nelson (yorba-jim) wrote :

> I selected download folder, some jpgs are there, BUT EVERY FILES ARE GRAYED OUT

This is a function of the GNOME directory chooser. Because we're asking only for a directory to import from (not specific files), the directory chooser grays out the files.

> This error looks interesting:
> Error: Directory Sony with 8704 entries considered invalid; not read.

This is from Exiv2, the metadata library Shotwell and gexiv2 rely on. It has nothing to do with filesystem directories but an abstraction internal to Exiv2.

Changed in gexiv2:
status: Unknown → Confirmed
Martin Pitt (pitti) on 2010-11-19
Changed in shotwell (Ubuntu):
assignee: nobody → Canonical Desktop Team (canonical-desktop-team)
Timo Witte (spacefish) wrote :

i have the same problem. If i start shotwell with SHOTWELL_LOG=1 i get "Error: Offset of directory Sony, entry 0x2001 is out of bounds: Offset = 0x00258067; truncating the entry" some files are corrupt on the SD Card from which i am importing!! Maybe this also effects it. But it crashes in gexiv2_metadata_get_orientation aswell.

part of strace output

munmap(0x7f2bd83d5000, 4096) = 0
open("/home/pk/Obr\303\241zky/Sn\303\255mka0166.jpg", O_RDONLY) = 13
fstat(13, {st_mode=S_IFREG|0644, st_size=297074, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f2bd83d5000
read(13, "\377\330\377\341\f\242Exif\0\0MM\0*\0\0\0\10\0\t\1\17\0\2\0\0\0\6\0\0"..., 4096) = 4096
close(13) = 0
munmap(0x7f2bd83d5000, 4096) = 0
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++
Segmentation fault

Jim Nelson (yorba-jim) wrote :

Timo, the message you listed is from Exiv2. It's a non-fatal log message indicating problems with the metadata in a file, but not necessarily the cause of this bug.

Bug 677871 is a duplicate of this, but with a full stacktrace with symbols.

pschonmann (pschonmann) wrote :
Download full text (4.1 KiB)

Tried to read exif data, maybe helps. I tried strace to see which file it was causing, it was first. But i moved it to desktop and run again. Second crashed shotwell too.

exiftool /media/7F31-D988/DCIM/100MEDIA/IMAG0001.jpg
ExifTool Version Number : 8.15
File Name : IMAG0001.jpg
Directory : /media/7F31-D988/DCIM/100MEDIA
File Size : 1037 kB
File Modification Date/Time : 2010:04:30 11:54:34+02:00
File Permissions : rw-r--r--
File Type : JPEG
MIME Type : image/jpeg
Exif Byte Order : Big-endian (Motorola, MM)
Make : HTC
Camera Model Name : HTC Desire
X Resolution : 72
Y Resolution : 72
Resolution Unit : inches
Y Cb Cr Positioning : Centered
ISO : 100
Exif Version : 0220
Date/Time Original : 2010:04:30 10:54:27
Create Date : 2010:04:30 10:54:27
Components Configuration : Y, Cb, Cr, -
Flashpix Version : 0100
Color Space : sRGB
Exif Image Width : 2592
Exif Image Height : 1552
Interoperability Index : R98 - DCF basic file (sRGB)
Interoperability Version : 0100
Compression : JPEG (old-style)
Thumbnail Offset : 428
Thumbnail Length : 22545
Data Length : 264
Preview Quality : 85
Image Width : 2592
Image Height : 1552
Encoding Process : Baseline DCT, Huffman coding
Bits Per Sample : 8
Color Components : 3
Y Cb Cr Sub Sampling : YCbCr4:2:0 (2 2)
Image Size : 2592x1552
Thumbnail Image : (Binary data 22545 bytes, use -b option to extract)

ps@T61:~$ exiftool /media/7F31-D988/DCIM/100MEDIA/IMAG0002.jpg -A
ExifTool Version Number : 8.15
File Name : IMAG0002.jpg
Directory : /media/7F31-D988/DCIM/100MEDIA
File Size : 701 kB
File Modification Date/Time : 2010:02:04 17:41:28+01:00
File Permissions : rw-r--r--
File Type : JPEG
MIME Type : image/jpeg
Exif Byte Order : Big-endian (Motorola, MM)
Make : HTC
Camera Model Name : HTC Tattoo
Orientation : Horizontal (normal)
X Resolution : 72
Y Resolution : 72
Resolution Unit : inches
Software : Android 1.6
Y Cb Cr Positioning : Centered
ISO : 100
Exif Version : 0220
Date/Time Original : 2010:02:04 16:41
Create Date : 2010:02:04 16:41
Components Configuration : Y, Cb, Cr, -
Flash : No Flash
Flashpix Version : 0100
Color Space : sRGB
Exif Image...

Read more...

Omer Akram (om26er) on 2010-11-23
summary: - shotwell crashes on import due to gexiv2
+ shotwell crashes on importing images
Jim Nelson (yorba-jim) wrote :

I investigated this briefly and saw that the crash was happening when a std:iterator was being dereferenced via its -> operator to retrieve the Exifdatum struct it was pointing to. The segfault was not in accessing the struct once it was extracted, but rather while pulling it from the iterator via the -> operator. (It appeared to be happening inside the Exifdatum's copy constructor; gdb's debug symbols were inconsistent on this point.)

I hesitate to point the finger at Exiv2 because it's quite possible I'm doing something wrong inside gexiv2, but I have now included that package in this ticket because the bug is in the interaction between gexiv2 and it.

tags: added: mago
Ondergetekende (kvdveer) wrote :
Download full text (3.9 KiB)

I have a slightly different callstack (though I've also seen the callstack mentioned above)

kvdveer@kvdveer-desktop:~$ gdb shotwell
GNU gdb (GDB) 7.2-ubuntu
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/shotwell...(no debugging symbols found)...done.
(gdb) run
Starting program: /usr/bin/shotwell
[Thread debugging using libthread_db enabled]
[New Thread 0xb6eefb70 (LWP 4914)]
[New Thread 0xb66eeb70 (LWP 4915)]
[New Thread 0xb5eedb70 (LWP 4916)]
[New Thread 0xb56ecb70 (LWP 4917)]
[New Thread 0xb4eebb70 (LWP 4918)]
[New Thread 0xad6fdb70 (LWP 4936)]
[New Thread 0xaccffb70 (LWP 4937)]
[New Thread 0xac4feb70 (LWP 4938)]
[New Thread 0xabcfdb70 (LWP 4939)]
[New Thread 0xab4fcb70 (LWP 4940)]
[New Thread 0xaacfbb70 (LWP 4941)]
[New Thread 0xaa4fab70 (LWP 4942)]
[Thread 0xac4feb70 (LWP 4938) exited]
[Thread 0xabcfdb70 (LWP 4939) exited]
[Thread 0xad6fdb70 (LWP 4936) exited]
[Thread 0xab4fcb70 (LWP 4940) exited]
[Thread 0xaacfbb70 (LWP 4941) exited]
[Thread 0xaccffb70 (LWP 4937) exited]

Program received signal SIGSEGV, Segmentation fault.
0x00000029 in ?? ()
(gdb) trace
Tracepoint 1 at 0x29
(gdb) d
Delete all breakpoints? (y or n) y
(gdb) frame
#0 0x00000029 in ?? ()
(gdb) threads
Undefined command: "threads". Try "help".
(gdb) th
thbreak thread
(gdb) th
thbreak thread
(gdb) thread
[Current thread is 1 (Thread 0xb718e860 (LWP 4909))]
(gdb) info threads
  13 Thread 0xaa4fab70 (LWP 4942) 0x0012e416 in __kernel_vsyscall ()
  6 Thread 0xb4eebb70 (LWP 4918) 0x0012e416 in __kernel_vsyscall ()
  5 Thread 0xb56ecb70 (LWP 4917) 0x0012e416 in __kernel_vsyscall ()
  4 Thread 0xb5eedb70 (LWP 4916) 0x0012e416 in __kernel_vsyscall ()
  3 Thread 0xb66eeb70 (LWP 4915) 0x0012e416 in __kernel_vsyscall ()
  2 Thread 0xb6eefb70 (LWP 4914) 0x0012e416 in __kernel_vsyscall ()
* 1 Thread 0xb718e860 (LWP 4909) 0x00000029 in ?? ()
----<SNIP irrelevant stuff>----
(gdb) backtrace
#0 0x00000029 in ?? ()
#1 0x0020e48c in gexiv2_metadata_get_exif_tag_rational ()
   from /usr/lib/libgexiv2.so.0
#2 0x081fa368 in photo_metadata_get_rational ()
#3 0x081fb387 in photo_metadata_get_exposure_string ()
#4 0x08194af8 in ?? ()
#5 0x0819541a in ?? ()
#6 0x0819454f in ?? ()
#7 0x0819651d in ?? ()
#8 0x081956b8 in properties_update_properties ()
#9 0x0818a7b9 in ?? ()
#10 0x0811da48 in ?? ()
#11 0x01e032d1 in ?? () from /lib/libglib-2.0.so.0
#12 0x01e074e8 in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#13 0x01e07cb0 in ?? () from /lib/libglib-2.0.so.0
#14 0x01e08373 in g_main_loop_run () from /lib/libglib-2.0.so.0
#15 0x016a8e89 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
#16 0x0808f52b in library_exec ()
#17 0x0808fc37 in _vala_main ()
#18 0x0808fcdc in main ()

This happens with _every_ picture in my collection. Example exif data:
kvd...

Read more...

Ondergetekende (kvdveer) wrote :

I have found a workaround. I've downgraded libgexiv2-0 to the maverick version (0.2.0-0ubuntu2). This solves problems for both callstacks mentioned above (gexiv2_metadata_get_exif_tag_rational and gexiv2_metadata_get_orientation).

the interesting part is that gexiv2 0.2.1 in maverick works just fine

On Tue, Nov 30, 2010 at 12:05 AM, kvdveer <email address hidden> wrote:

> I have found a workaround. I've downgraded libgexiv2-0 to the maverick
> version (0.2.0-0ubuntu2). This solves problems for both callstacks
> mentioned above (gexiv2_metadata_get_exif_tag_rational and
> gexiv2_metadata_get_orientation).
>
> --
> shotwell crashes on importing images
> https://bugs.launchpad.net/bugs/676949
> You received this bug notification because you are subscribed to gexiv2
> in ubuntu.
>
> Status in gexiv2: Confirmed
> Status in “exiv2” package in Ubuntu: New
> Status in “gexiv2” package in Ubuntu: New
> Status in “shotwell” package in Ubuntu: Confirmed
>
> Bug description:
> Binary package hint: shotwell
>
> On Natty the gexiv2-package 0.2.1-1ubuntu1 has broken shotwell, it crashes
> on importing pictures. Reverting to maverick's 0.2.0-0ubuntu2 version of
> gexiv2 fixes the problem. I guess shotwell would need a rebuild?
>
> Here's the gdb output:
>
> Starting program: /usr/bin/shotwell
> [Thread debugging using libthread_db enabled]
> [New Thread 0x7fffe65fc710 (LWP 26828)]
> [New Thread 0x7fffe5dfb710 (LWP 26829)]
> [New Thread 0x7fffe55fa710 (LWP 26830)]
> [New Thread 0x7fffe1b9f710 (LWP 26831)]
> [New Thread 0x7fffe1061710 (LWP 26832)]
> [New Thread 0x7fffe0860710 (LWP 26833)]
> [Thread 0x7fffe1b9f710 (LWP 26831) exited]
> [Thread 0x7fffe1061710 (LWP 26832) exited]
>
> Program received signal SIGSEGV, Segmentation fault.
> 0x00007ffff76dc890 in gexiv2_metadata_get_orientation () from
> /usr/lib/libgexiv2.so.0
> (gdb) quit
>
> ProblemType: Bug
> DistroRelease: Ubuntu 11.04
> Package: shotwell 0.7.2-0ubuntu2
> Uname: Linux 2.6.37-rc2-custom x86_64
> NonfreeKernelModules: wl
> Architecture: amd64
> Date: Thu Nov 18 12:43:53 2010
> InstallationMedia: Ubuntu 10.04 "Lucid Lynx" - Alpha amd64 (20100113)
> ProcEnviron:
> LANGUAGE=de_AT:de:de_DE:de_CH:de_LU:de_LI:de_BE:en
> PATH=(custom, user)
> LANG=de_AT.utf8
> SHELL=/bin/bash
> SourcePackage: shotwell
>
>
>

Martin Pitt (pitti) wrote :

Robert, can you please take a look at this? If you don't have time, please reassign back to desktop team.

Changed in shotwell (Ubuntu):
assignee: Canonical Desktop Team (canonical-desktop-team) → Robert Ancell (robert-ancell)
milestone: natty-alpha-1 → natty-alpha-2
Robert Ancell (robert-ancell) wrote :

A rebuild of shotwell appears to have fixed the problem.

Changed in exiv2 (Ubuntu):
status: New → Invalid
Changed in gexiv2 (Ubuntu):
status: New → Invalid
Changed in shotwell (Ubuntu):
status: Confirmed → Fix Committed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package shotwell - 0.7.2-0ubuntu3

---------------
shotwell (0.7.2-0ubuntu3) natty; urgency=low

  [ Martin Pitt ]
  * debian/rules: Build with scour for SVG optimization. Add python-scour
    build dependency.

  [ Robert Ancell ]
  * Rebuild to fix crash after gexiv2 update (LP: #676949)
  * debian/patches/04_vala_0_10.patch:
    - Compile with valac-0.10
 -- Robert Ancell <email address hidden> Wed, 01 Dec 2010 15:38:54 +1100

Changed in shotwell (Ubuntu):
status: Fix Committed → Fix Released
Omer Akram (om26er) on 2010-12-01
Changed in shotwell (Ubuntu):
milestone: natty-alpha-2 → natty-alpha-1
Jim Nelson (yorba-jim) wrote :

Robert, do you know what the problem was? Could you let me know either here or via email? Thanks.

Changed in gexiv2:
status: Confirmed → Invalid
Robert Ancell (robert-ancell) wrote :

Sorry Jim, I didn't investigate what the exact problem was, but it may have been due to the linker changes in natty.

Gibb (capt-gibb) wrote :

I have similar issue in 10.10:

We store two different picture formats since the camera saves both, so all .JPG and .NEF (RAW) files are in the same folder.
I ran an import on a folder with mixed formats, and the application crashed. When moving all the .JPG files to a tmp folder, the import of that tmp folder worked. When adding a .NEF to the tmp folder, the import crashes the application.

Hope this will be of help.

Gibb (capt-gibb) wrote :

PS. If Shotwell doesn't support Nikon's RAW .NEF files, then please add a customizable file filter for importing.

Omer Akram (om26er) wrote :

gibb, please check which version of gexiv2 you are using?

On Fri, Dec 10, 2010 at 11:51 PM, Gibb <email address hidden> wrote:

> PS. If Shotwell doesn't support Nikon's RAW .NEF files, then please add
> a customizable file filter for importing.
>
> --
> You received this bug notification because you are subscribed to gexiv2
> in ubuntu.
> https://bugs.launchpad.net/bugs/676949
>
> Title:
> shotwell crashes on importing images
>
> Status in gexiv2:
> Invalid
> Status in “exiv2” package in Ubuntu:
> Invalid
> Status in “gexiv2” package in Ubuntu:
> Invalid
> Status in “shotwell” package in Ubuntu:
> Fix Released
>
> Bug description:
> Binary package hint: shotwell
>
> On Natty the gexiv2-package 0.2.1-1ubuntu1 has broken shotwell, it crashes
> on importing pictures. Reverting to maverick's 0.2.0-0ubuntu2 version of
> gexiv2 fixes the problem. I guess shotwell would need a rebuild?
>
> Here's the gdb output:
>
> Starting program: /usr/bin/shotwell
> [Thread debugging using libthread_db enabled]
> [New Thread 0x7fffe65fc710 (LWP 26828)]
> [New Thread 0x7fffe5dfb710 (LWP 26829)]
> [New Thread 0x7fffe55fa710 (LWP 26830)]
> [New Thread 0x7fffe1b9f710 (LWP 26831)]
> [New Thread 0x7fffe1061710 (LWP 26832)]
> [New Thread 0x7fffe0860710 (LWP 26833)]
> [Thread 0x7fffe1b9f710 (LWP 26831) exited]
> [Thread 0x7fffe1061710 (LWP 26832) exited]
>
> Program received signal SIGSEGV, Segmentation fault.
> 0x00007ffff76dc890 in gexiv2_metadata_get_orientation () from
> /usr/lib/libgexiv2.so.0
> (gdb) quit
>
> ProblemType: Bug
> DistroRelease: Ubuntu 11.04
> Package: shotwell 0.7.2-0ubuntu2
> Uname: Linux 2.6.37-rc2-custom x86_64
> NonfreeKernelModules: wl
> Architecture: amd64
> Date: Thu Nov 18 12:43:53 2010
> InstallationMedia: Ubuntu 10.04 "Lucid Lynx" - Alpha amd64 (20100113)
> ProcEnviron:
> LANGUAGE=de_AT:de:de_DE:de_CH:de_LU:de_LI:de_BE:en
> PATH=(custom, user)
> LANG=de_AT.utf8
> SHELL=/bin/bash
> SourcePackage: shotwell
>
>
>

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.