After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 327323 - gnome-thumb must not pass non-NULL keys with NULL values
gnome-thumb must not pass non-NULL keys with NULL values
Status: RESOLVED FIXED
Product: libgnomeui
Classification: Deprecated
Component: general
CVS HEAD
Other All
: High blocker
: ---
Assigned To: libgnomeui maintainers
libgnomeui maintainers
: 327838 327881 327990 328110 328129 328235 328251 328631 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2006-01-17 11:23 UTC by Luca Ferretti
Modified: 2006-02-12 13:47 UTC
See Also:
GNOME target: 2.14.x
GNOME version: 2.13/2.14


Attachments
Backtrace after crash (23.82 KB, text/plain)
2006-01-22 06:15 UTC, Jose M. daLuz
  Details
quick fix. (1.06 KB, patch)
2006-01-25 20:15 UTC, Claudio Saavedra
none Details | Review
better fix (1.98 KB, patch)
2006-01-26 09:57 UTC, Alexander Larsson
committed Details | Review

Description Luca Ferretti 2006-01-17 11:23:59 UTC
Steps to reproduce:
1. Add a new picture (jpg, png, tiff tested) or video (ogg theora tested) to
desktop or opened folder
2. Nautilus start thumbnailing
3. Nautilus crash


Stack trace:
Backtrace was generated from '/opt/gnome2/libexec/<unknown>'

Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
[New Thread -1227966784 (LWP 1695)]
[New Thread -1268417616 (LWP 2264)]
[New Thread -1230214224 (LWP 1703)]
0xffffe410 in ?? ()

Thread 3 (Thread -1230214224 (LWP 1703))

  • #0 ??
  • #1 ??
  • #2 ??
  • #3 ??
  • #4 poll
    from /lib/tls/i686/cmov/libc.so.6
  • #5 g_main_context_iterate
    at gmain.c line 2849


Other information:
Yes, I wish. First the libgnomui crash alert don't show any text: just the error
icon and close/inform button (no restart button). Second after the crash and the
nautilus restart the thumbnail for the failed file appears. Third: no crash
opening themes:// location. Fourth: please look the
"log_level=G_LOG_LEVEL_CRITICAL" :-)
Comment 1 Ross Burton 2006-01-19 19:52:14 UTC
I'm seeing this too, on Ubuntu Dapper.
Comment 2 Christian Kirbach 2006-01-20 11:35:32 UTC
*** Bug 327838 has been marked as a duplicate of this bug. ***
Comment 3 Christian Kirbach 2006-01-20 11:39:16 UTC
seems to happen when png thumbnails are saved.

real_save_png() calls g_convert with a NULL string
Comment 4 Matthias Clasen 2006-01-20 13:31:09 UTC
Well, it calls g_convert with the strings that were passed down by
gnome_thumbnail_factory_save_thumbnail. It would be instructive to see
the keys and values arrays that are being passed down.
Comment 5 Christian Kirbach 2006-01-20 14:25:16 UTC
just stumbled into this myself

this lacks a few values but is detailed. Matthias?

  • #6 IA__g_convert
    at gconvert.c line 713
  • #7 real_save_png
    at io-png.c line 863
  • #8 IA__gdk_pixbuf_savev
    at gdk-pixbuf-io.c line 1407
  • #9 IA__gdk_pixbuf_save
    at gdk-pixbuf-io.c line 1634
  • #10 gnome_thumbnail_factory_save_thumbnail
    at gnome-thumbnail.c line 1175
  • #11 thumbnail_thread_start
    at nautilus-thumbnails.c line 592

Comment 6 Matthias Clasen 2006-01-20 14:38:37 UTC
If you can repeat, what we really need to see is 
keys[i], values[i] for i = 0, 1, 2...
At some point you must hit a non-NULL key with a NULL value
Comment 7 Christian Kirbach 2006-01-20 15:45:38 UTC
(gdb) print keys[0]
$12 = (gchar *) 0x85c0cb0 "tEXt::Thumb::Image::Width"
(gdb) print values[0]
$13 = (gchar *) 0x0

(gdb) print keys[1]
$15 = (gchar *) 0x8438830 "tEXt::Thumb::Image::Height"
(gdb) print values[1]
$16 = (gchar *) 0x0

(gdb) print keys[2]
$17 = (gchar *) 0x84271e0 "tEXt::Thumb::URI"
(gdb) print values[2]
$18 = (gchar *) 0x850f788 "file:///home/nazgul/arborian1c.jpg"

(gdb) print keys[3]
$19 = (gchar *) 0x8539e18 "tEXt::Thumb::MTime"
(gdb) print values[3]
$20 = (gchar *) 0x85a85b8 "1137286555"

(gdb) print keys[4]
$21 = (gchar *) 0x8464560 "tEXt::Software"
(gdb) print values[4]
$22 = (gchar *) 0x846da48 "GNOME::ThumbnailFactory"

(gdb) print keys[5]
$23 = (gchar *) 0x0
(gdb) print values[5]
$24 = (gchar *) 0x0
Comment 8 Matthias Clasen 2006-01-20 15:48:49 UTC
Yes, so thats a gnome-thumb bug then. 
It must not pass non-NULL keys with NULL values
Comment 9 Christian Kirbach 2006-01-20 16:53:53 UTC
*** Bug 327881 has been marked as a duplicate of this bug. ***
Comment 10 Christian Persch 2006-01-20 21:01:01 UTC
Regression from bug 143470.
Comment 11 Christian Persch 2006-01-20 21:09:50 UTC
The problem arises because gnome-thumbnail assumes that the pixbuf it's saving as thumbnail has previously generated by gnome-thumbnail. But nautilus' libnautilus-private/nautilus-thumbnail.c::nautilus_update_thumbnail_file_copied copies the thumbnail for a copied file, after loading it as normal pixbuf; so it doesn't have the gobject data set.

This suggests that apart from fixing this assumption, we need a) a gnome_thumbnail_factory_save_thumbnail_with_size call which lets you provide the original image's size, and b) a gnome_thumbnail_factory_copy_thumbnail (old_uri, new_uri) to just associate the old_uri's thumbnail info also with new_uri. Since we're already past feature freeze, we need to either move quickly and get approval for a break, or punt the API part to 2.15.
Comment 12 Christian Kirbach 2006-01-21 11:56:44 UTC
also happens when adding new wallpapers to the backgrounds capplet

making this a blocker because of its severe impact
Comment 13 Martin Wehner 2006-01-21 15:50:32 UTC
*** Bug 327990 has been marked as a duplicate of this bug. ***
Comment 14 Martin Wehner 2006-01-22 01:32:08 UTC
*** Bug 328110 has been marked as a duplicate of this bug. ***
Comment 15 Jose M. daLuz 2006-01-22 06:15:27 UTC
Created attachment 57837 [details]
Backtrace after crash

I filed dupe 327990. I just had this crash happen with thumbnails turned off. I moved a file from my desktop to a directory in my home, noticed the file was still on the desktop, opened the destination directory and had the crash happen.
Comment 16 Christian Kirbach 2006-01-22 16:12:41 UTC
Bug 328129 has a patch attached.
marking it a dependency.
Comment 17 Christian Persch 2006-01-22 20:20:06 UTC
The patch from bug 328129 doesn't fix this crash.
Comment 18 Christian Kirbach 2006-01-23 00:34:47 UTC
neither for me
Comment 19 Rodney Dawes 2006-01-23 16:59:11 UTC
*** Bug 328251 has been marked as a duplicate of this bug. ***
Comment 20 Kjartan Maraas 2006-01-23 17:01:01 UTC
Should we back out the patch from Jimbob above then for the time being? Does
everything work without that one?
Comment 21 Christian Kirbach 2006-01-23 17:35:02 UTC
what patch from whom? :)
The patch from bug 328129 has never been commited.
Comment 22 Jens Granseuer 2006-01-24 08:30:18 UTC
For the record, I'm seeing a similar crash with gthumb as well.
Comment 23 Christian Kirbach 2006-01-24 17:37:49 UTC
*** Bug 328235 has been marked as a duplicate of this bug. ***
Comment 24 Claudio Saavedra 2006-01-25 19:28:14 UTC
*** Bug 328631 has been marked as a duplicate of this bug. ***
Comment 25 Claudio Saavedra 2006-01-25 20:15:45 UTC
Created attachment 58126 [details] [review]
quick fix.

This is probably not the desired solution, but at least it prevents the crash by getting the width/height info directly from the pixbuf only when the keys are not set. This way we wouldn't need to break API freeze.
Comment 26 Christian Kirbach 2006-01-25 23:14:27 UTC
patch works for me.

this is no real fix but a workaround.

I see two options:
a) fix the real problem before the final release
b) apply the workaround in case the real fix does not make it

solution (a) is most preferrable since the bug causes other crashers as well.
Comment 27 Alexander Larsson 2006-01-26 09:56:57 UTC
The thumbnail spec (http://jens.triq.net/thumbnail-spec/creation.html) says the width/height properties are optional, so we should just leave them out if we don't know them. However, in the case of copy of a thumbnail we can know them, because they are read by gdk-pixbuf from the old thumbnail and availible with gdk_pixbuf_get_option (thumbnail, "tEXt::Thumb::Image::Width").

Ideally we should maybe have a with_size API addition, but i'm commiting a patch that fixes this for all normal cases.
Comment 28 Alexander Larsson 2006-01-26 09:57:33 UTC
Created attachment 58141 [details] [review]
better fix
Comment 29 Christian Kirbach 2006-01-26 14:30:57 UTC
patch works for me and looks better than the previous  one
Comment 30 Kjartan Maraas 2006-02-07 13:37:42 UTC
*** Bug 328129 has been marked as a duplicate of this bug. ***
Comment 31 Christian Kirbach 2006-02-12 13:47:53 UTC
Alex, I can see you have commited the patch. the crash is gone.