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 128317 - Crash while dragging PNG image as background
Crash while dragging PNG image as background
Status: RESOLVED FIXED
Product: gnome-panel
Classification: Other
Component: panel
2.5.x
Other Linux
: High critical
: ---
Assigned To: Panel Maintainers
Panel Maintainers
: 157541 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2003-12-01 20:08 UTC by Bart Kuik
Modified: 2005-03-01 10:20 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
PNG, compression level 6 (491.41 KB, image/png)
2003-12-12 18:06 UTC, Bart Kuik
  Details
Gnome-panel stack trace given by bug-buddy (26.52 KB, text/plain)
2003-12-12 19:36 UTC, Eddahbi Karim
  Details
test case (2.79 KB, text/x-csrc)
2004-03-24 16:00 UTC, Mark McLoughlin
  Details
possible patch (989 bytes, patch)
2004-08-18 11:29 UTC, Mark McLoughlin
committed Details | Review
proposed patch (1.16 KB, patch)
2004-12-15 13:19 UTC, Venkatesan
needs-work Details | Review
gnome-panel backtrace (14.11 KB, text/plain)
2005-01-14 10:33 UTC, Pete van der Spoel
  Details
Proposed patch (3.69 KB, patch)
2005-03-01 08:59 UTC, Vincent Untz
none Details | Review
Updated patch (3.74 KB, patch)
2005-03-01 09:09 UTC, Vincent Untz
committed Details | Review

Description Bart Kuik 2003-12-01 20:08:22 UTC
When one of the panels is translucent, the panel crashes when a PNG image
is set as background with d'n'd.

Steps to reproduce:

- Make a semi-transparant panel
- Open a Nautilus window with a PNG file
- Drag the PNG file with the middle mousebutton to the desktop
- Select 'set as background' from the popup-menu
- panel crashes

Details:
- Doesn't happen with JPEG files
- PNG created with The Gimp 1.2.5 (fedora default), I tried different
compression levels (0 and 6).
- Doesn't happen in rightclick->'change desktop background' dialog

Software:
- Garnome 0.28.2
- Nautilus 2.5.2
- Panel 2.5.1
Comment 1 Elijah Newren 2003-12-08 05:22:06 UTC
Can you provide us with a stack trace?  (See
http://bugzilla.gnome.org/getting-traces.cgi for instructions on how
to do so).
Comment 2 Bart Kuik 2003-12-09 16:57:11 UTC
I forgot to mention that I have an SMP system. (kernel
2.4.22-1.2129.nptlsmp)

This is the backtrace generated by Bug-Buddy:

Backtrace was generated from '/home/garnome/GARNOME/bin/gnome-panel'

Using host libthread_db library "/lib/tls/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
[New Thread -1085058400 (LWP 4734)]
0x00424c32 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2

Thread 1 (Thread -1085058400 (LWP 4734))

  • #0 _dl_sysinfo_int80
    from /lib/ld-linux.so.2
  • #1 __waitpid_nocancel
    from /lib/tls/libpthread.so.0
  • #2 libgnomeui_segv_handle
    at gnome-ui-init.c line 738
  • #3 <signal handler called>
  • #4 g_logv
  • #5 g_log
    at gmessages.c line 541
  • #6 gdk_x_error
    at gdkmain-x11.c line 530
  • #7 bonobo_x_error_handler
    at bonobo-ui-main.c line 50
  • #8 _XError
    from /usr/X11R6/lib/libX11.so.6
  • #9 _XReply
    from /usr/X11R6/lib/libX11.so.6
  • #10 XSync
    from /usr/X11R6/lib/libX11.so.6
  • #11 _gdk_x11_copy_to_image
    at gdkimage-x11.c line 544
  • #12 _gdk_drawable_copy_to_image
    at gdkdraw.c line 953
  • #13 gdk_pixmap_copy_to_image
    at gdkpixmap.c line 473
  • #14 _gdk_drawable_copy_to_image
    at gdkdraw.c line 953
  • #15 gdk_pixbuf_get_from_drawable
    at gdkpixbuf-drawable.c line 1301
  • #16 panel_background_monitor_setup_pixbuf
    at panel-background-monitor.c line 329
  • #17 panel_background_monitor_get_region
    at panel-background-monitor.c line 359
  • #18 background_changed
    at panel-background.c line 155
  • #19 g_cclosure_marshal_VOID__VOID
    at gmarshal.c line 77
  • #20 g_closure_invoke
    at gclosure.c line 437
  • #21 signal_emit_unlocked_R
    at gsignal.c line 2436
  • #22 g_signal_emit_valist
    at gsignal.c line 2195
  • #23 g_signal_emit
    at gsignal.c line 2239
  • #24 panel_background_monitor_xevent_filter
    at panel-background-monitor.c line 229
  • #25 gdk_event_apply_filters
    at gdkevents-x11.c line 307
  • #26 gdk_event_translate
    at gdkevents-x11.c line 890
  • #27 _gdk_events_queue
    at gdkevents-x11.c line 2028
  • #28 gdk_event_dispatch
    at gdkevents-x11.c line 2088
  • #29 g_main_dispatch
    at gmain.c line 1752
  • #30 g_main_context_dispatch
    at gmain.c line 2300
  • #31 g_main_context_iterate
    at gmain.c line 2381
  • #32 g_main_loop_run
    at gmain.c line 2601
  • #33 gtk_main
    at gtkmain.c line 1124
  • #34 main
    at main.c line 95
  • #0 _dl_sysinfo_int80
    from /lib/ld-linux.so.2

Comment 3 Vincent Untz 2003-12-10 10:07:22 UTC
I can't reproduce.
Does it happen with other PNG files? If not, can you attach your PNG
to this bug?
Thanks
Comment 4 Bart Kuik 2003-12-12 18:06:22 UTC
Created attachment 22384 [details]
PNG, compression level 6
Comment 5 Bart Kuik 2003-12-12 18:19:56 UTC
The PNG's from http://www.libpng.org/pub/png/png-sitemap.html#images
work fine. The attached PNG is made with Gimp 1.2.5 and saved in
1.3.22. I also tried to save it in 1.2.5 (Linux) and 1.3.23 (Win32),
all resulting in the broken behaviour. I tried different compression
levels (0, 1, 6 and 9) and options, and I resized the image to
320x240, but they all let the panel crash.

the 'pngcheck' tool from libpng.org gives no error messages or
warnings on these files. Mozilla also renders the png's without problems.

I also tried to create some other images, convert jpg's and bmp's to
png with The Gimp, but that gave different results. Some were good,
some were bad. I couldn't find a pattern in the behaviour.
Comment 6 Elijah Newren 2003-12-12 18:27:57 UTC
I can reproduce the stack trace with the attached image and the given
duplication instructions.  Reopening and adding the STACKTRACE and
bugsquad keywords.
Comment 7 Eddahbi Karim 2003-12-12 19:34:54 UTC
I can recreate this bug on my Gnome 2.5 builded with the breakmygentoo
ebuilds.

Here is my systems information :

Portage 2.0.49-r15 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r3,
2.6.0-thebest-te
st11)
=================================================================
System uname: 2.6.0-thebest-test11 i686 AMD Athlon(tm) XP 1800+
Gentoo Base System version 1.4.3.10p1
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-mcpu=athlon-xp -O2 -m3dnow -pipe -mmmx -s"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /var/qmail/control /usr/kde/2/share/config
/usr/kde/3/share
/config /usr/X11R6/lib/X11/xkb /usr/kde/3.1/share/config
/usr/share/texmf/tex/ge
neric/config/ /usr/share/texmf/tex/platex/config/ /usr/share/config"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-mcpu=athlon-xp -O2 -m3dnow -pipe -mmmx -s"
DISTDIR="/opt/packages"
FEATURES="sandbox ccache autoaddcvs"
GENTOO_MIRRORS="http://mirrors.sec.informatik.tu-darmstadt.de/gentoo
ftp://gento
o.linux.no/pub/gentoo/ http://gentoo.linux.no/
http://212.219.56.162/sites/www.i
biblio.org/gentoo/ http://212.219.56.152/sites/www.ibiblio.org/gentoo/
http://21
2.219.56.146/sites/www.ibiblio.org/gentoo/
http://212.219.56.131/sites/www.ibibl
io.org/gentoo/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.de.gentoo.org/gentoo-portage"
USE="x86 oss apm avi crypt cups encode foomaticdb gif jpeg libg++ mad
mikmod mpe
g ncurses nls pdflib png quicktime spell truetype xml2 xmms xv zlib
directfb gtk
html alsa gdbm berkdb slang readline arts tetex aalib bonobo svga
tcltk java gui
le ruby mysql postgres X sdl gpm tcpd pam libwww ssl perl python esd
imlib oggvo
rbis gnome gtk qt kde motif opengl mozilla ldap cdr scanner"

- libpng-1.2.5-r4
- gtk+-2.3.0-r1
- Xfree-4.3.99.901

Gnome 2.5 emerged like this :
USE="doc tiff ipv6" ACCEPT_KEYWORDS="~x86" emerge -v gnome

I'll file the backtrace too so you can compare.
Comment 8 Eddahbi Karim 2003-12-12 19:36:36 UTC
Created attachment 22386 [details]
Gnome-panel stack trace given by bug-buddy
Comment 9 Eddahbi Karim 2003-12-12 22:54:45 UTC
So so so,

It's not the format, it could crash with a JPG file but the bug report
is not really complete because sometimes you can do this without any
crash.

By the way I've push the transparency of the panel at nearly 90% (So
you can just see a small difference between the picture and the
translucent area.
The color of tinting is "black"

I've the last gtk+/glib/pango.

When the panel crashes the transparency is not updated.
Comment 10 Eddahbi Karim 2003-12-12 23:14:25 UTC
More informations :

- I can change the background using the Gnome Desktop Preferences.
- I can change the background using Galeon too (Galeon 1.3.10)

Comment 11 Mark McLoughlin 2004-03-24 15:50:57 UTC
Okay, I've spent quite a while staring at this:

  1) I can't reproduce it
  2) It looks very like an old zvt crasher - bug #75340
  3) It doesn't make any sense - _gdk_x11_copy_to_image does CreateGC,
     CopyArea, Sync, FreeGC and yet we get a BadGC from CopyArea. No matter
     what way I look at it I can't see a reason for the GC to be invalid
  4) I'm leaning towards thinking this is possibly an Xlib/Xserver bug, but
     can't confirm that without more details

So, I'm attaching a test case. You can compile it like so:

  gcc $(pkg-config --cflags --libs gtk+2.0) panel-background-monitor.c -o panel-background-monitor

then just run it and change the desktop background as you were before.

This should blow up in exactly the same way as the panel. If it does, get
a stace trace and then try again to get a stack trace running it with --sync.
Also, once you've confirmed that you can reproduce it with the test case
I'd appreciate it if you could re-compile gtk with this change to gtk+/gdk/gdkimage.c:

diff -u -p -r1.34 gdkimage.c
--- gdkimage.c  6 Mar 2004 03:36:59 -0000       1.34
+++ gdkimage.c  24 Mar 2004 15:49:14 -0000
@@ -282,6 +282,7 @@ scratch_image_info_for_depth (GdkScreen
  
 #undef NO_FLUSH
  
+#define VERBOSE
 #ifdef VERBOSE
 static gint sincelast;
 #endif



Also, if you could tell me what X11 distribution you are using and what version, that'd be very useful too.

Don't worry if you can't do all of the above - any information is useful. Thanks
Comment 12 Mark McLoughlin 2004-03-24 16:00:51 UTC
Created attachment 25918 [details]
test case
Comment 13 Mark Gordon 2004-06-14 19:21:25 UTC
If I run the test case through gdb, it does something interesting (details
below) on the first drag & drop, as  opposed to the regular case, where I
typically need to do it a bunch of times before I trigger whatever presumed race
is causing this.  Seems to be pretty independent of the image.  Rebuilding gtk+
is going to be a bit of a PITA, since I'm working from binary rpms for which I
do not have source packages handy.

XFree86-4.3.99.902 (server & libs, same box), i180 driver for the server.

The test program exits rather than crashing, saying:

_XROOTPMAP_ID changed
Successfully obtained the foreign pixmap
The program 'panel-background-monitor' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadDrawable (invalid Pixmap or Window parameter)'.
  (Details: serial 93 error_code 9 request_code 55 minor_code 0)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.

   To debug your program, run it with the --sync command line
   option to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)

Here's a stack trace from running with --sync, having put a breakpoint in
gdk_x_error, as the debug spewage instructed:

Breakpoint 2, 0x40342256 in gdk_x_error ()
   from /opt/gnome/lib/libgdk-x11-2.0.so.0
(gdb) bt
  • #0 gdk_x_error
    from /opt/gnome/lib/libgdk-x11-2.0.so.0
  • #1 _XError
    from /usr/X11R6/lib/libX11.so.6
  • #2 _XReply
    from /usr/X11R6/lib/libX11.so.6
  • #3 XGetGeometry
    from /usr/X11R6/lib/libX11.so.6
  • #4 gdk_pixmap_foreign_new_for_display
    from /opt/gnome/lib/libgdk-x11-2.0.so.0
  • #5 gdk_pixmap_foreign_new
    from /opt/gnome/lib/libgdk-x11-2.0.so.0
  • #6 get_pixmap_from_property
  • #7 root_window_xevent_filter
  • #8 gdk_event_apply_filters
    from /opt/gnome/lib/libgdk-x11-2.0.so.0
  • #9 gdk_event_translate
    from /opt/gnome/lib/libgdk-x11-2.0.so.0
  • #10 _gdk_events_queue
    from /opt/gnome/lib/libgdk-x11-2.0.so.0
  • #11 gdk_event_dispatch
    from /opt/gnome/lib/libgdk-x11-2.0.so.0
  • #12 g_main_context_dispatch
    from /opt/gnome/lib/libglib-2.0.so.0
  • #13 g_main_context_iterate
    from /opt/gnome/lib/libglib-2.0.so.0
  • #14 g_main_loop_run
    from /opt/gnome/lib/libglib-2.0.so.0
  • #15 gtk_main
    from /opt/gnome/lib/libgtk-x11-2.0.so.0
  • #16 ??
  • #17 ??
  • #18 ??
  • #19 ??
  • #20 ??
  • #21 ??
  • #22 ??
  • #23 ??
    from /opt/gnome/lib/libgtk-x11-2.0.so.0
  • #24 __elf_set___libc_thread_subfreeres_element___rpc_thread_destroy__
    from /lib/tls/libc.so.6
  • #25 __libc_missing_32bit_uids
    from /lib/ld-linux.so.2
  • #26 ??
  • #27 ??
  • #28 _dl_runtime_resolve
    from /lib/ld-linux.so.2
  • #29 main

Sorry about the question marks.
Comment 14 Vincent Untz 2004-08-17 14:13:48 UTC
Another stack trace, with the GTK+ debuginfo RPM. I need to recompile GTK+ on
this computer with the #define, but I can't right now.

_XROOTPMAP_ID changed
Successfully obtained the foreign pixmap
 
Breakpoint 2, gdk_x_error (display=0xfefad8b0, error=0xfefad8b0)
    at gdkmain-x11.c:503
503       if (error->error_code)
(gdb) bt
  • #0 gdk_x_error
    at gdkmain-x11.c line 503
  • #1 _XError
    from /usr/X11R6/lib/libX11.so.6
  • #2 _XReply
    from /usr/X11R6/lib/libX11.so.6
  • #3 XSync
    from /usr/X11R6/lib/libX11.so.6
  • #4 XSync
    from /usr/X11R6/lib/libX11.so.6
  • #5 XCopyArea
    from /usr/X11R6/lib/libX11.so.6
  • #6 _gdk_x11_copy_to_image
    at gdkimage-x11.c line 542
  • #7 gdk_drawable_copy_to_image
    at gdkdraw.c line 959
  • #8 gdk_pixmap_copy_to_image
    at gdkpixmap.c line 474
  • #9 gdk_drawable_copy_to_image
    at gdkdraw.c line 959
  • #10 gdk_pixbuf_get_from_drawable
    at gdkpixbuf-drawable.c line 1301
  • #11 get_pixbuf_from_pixmap
  • #12 root_window_xevent_filter
  • #13 gdk_event_apply_filters
    at gdkevents-x11.c line 319
  • #14 gdk_event_translate
    at gdkevents-x11.c line 923
  • #15 _gdk_events_queue
    at gdkevents-x11.c line 2067
  • #16 gdk_event_dispatch
    at gdkevents-x11.c line 2127
  • #17 g_main_depth
    from /usr/lib/libglib-2.0.so.0
  • #18 g_main_context_dispatch
    from /usr/lib/libglib-2.0.so.0
  • #19 g_main_context_dispatch
    from /usr/lib/libglib-2.0.so.0
  • #20 g_main_loop_run
    from /usr/lib/libglib-2.0.so.0
  • #21 gtk_main
    at gtkmain.c line 1172
  • #22 main

Comment 15 Mark McLoughlin 2004-08-17 14:32:03 UTC
And its BadGC you're seeing, not BadDrawable? Strange.

My guess is that BadGC is being incorrectly reported somehow - BadDrawable makes
a lot more sense if you're changing the background image.

We should just trap and ignore this error in get_pixbuf_from_pixmap() I think -
i.e. use gdk_error_trap_push()/pop()
Comment 16 Vincent Untz 2004-08-18 11:13:38 UTC
Mark: with your test case, I'm getting a BadDrawable. I had BadGC when testing
with the panel...

Here's the output with the VERBOSE in gdkimage.c:

_XROOTPMAP_ID changed
Successfully obtained the foreign pixmap
flush, 6 puts since last flush
index 0, x 0, y 0 (256 x 64)
index 1, x 256, y 0 (256 x 64)
index 2, x 512, y 0 (256 x 64)
index 3, x 768, y 0 (256 x 64)
index 4, x 1024, y 0 (256 x 64)
index 5, x 1280, y 0 (256 x 64)
flush, 6 puts since last flush
index 0, x 0, y 0 (256 x 64)
index 1, x 256, y 0 (256 x 64)
index 2, x 512, y 0 (256 x 64)
index 3, x 768, y 0 (256 x 64)
index 4, x 1024, y 0 (256 x 64)
index 5, x 1280, y 0 (256 x 64)
flush, 6 puts since last flush
index 0, x 0, y 0 (256 x 64)
index 1, x 256, y 0 (256 x 64)
index 2, x 512, y 0 (256 x 64)
index 3, x 768, y 0 (256 x 64)
index 4, x 1024, y 0 (256 x 64)
index 5, x 1280, y 0 (256 x 64)
flush, 6 puts since last flush
index 0, x 0, y 0 (256 x 64)
index 1, x 256, y 0 (256 x 64)
index 2, x 512, y 0 (256 x 64)
index 3, x 768, y 0 (256 x 64)
index 4, x 1024, y 0 (256 x 64)
index 5, x 1280, y 0 (256 x 64)
flush, 6 puts since last flush
index 0, x 0, y 0 (256 x 64)
index 1, x 256, y 0 (256 x 64)
index 2, x 512, y 0 (256 x 64)
index 3, x 768, y 0 (256 x 64)
index 4, x 1024, y 0 (256 x 64)
index 5, x 1280, y 0 (256 x 64)
flush, 6 puts since last flush
index 0, x 0, y 0 (256 x 64)
index 1, x 256, y 0 (256 x 64)
index 2, x 512, y 0 (256 x 64)
The program 'panel-background-monitor' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadDrawable (invalid Pixmap or Window parameter)'.
  (Details: serial 1036 error_code 9 request_code 55 minor_code 0)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the --sync command line
   option to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)
Comment 17 Mark McLoughlin 2004-08-18 11:29:57 UTC
Created attachment 30694 [details] [review]
possible patch

We could try something like this, but I think we need to handle the error
better - e.g. don't free the previous background until we successfully grab the
new background.

Could you take a look Vincent?
Comment 18 Vincent Untz 2004-08-18 11:54:57 UTC
Hrm... It's crashing with this patch too. But a bit less often :-)
Comment 19 Vincent Untz 2004-08-18 11:57:43 UTC
In fact, the stack trace is not the same:

  • #36 _XError
    from /usr/X11R6/lib/libX11.so.6
  • #37 _XReply
    from /usr/X11R6/lib/libX11.so.6
  • #38 XSync
    from /usr/X11R6/lib/libX11.so.6
  • #39 gdk_flush
    at gdkevents-x11.c line 2314
  • #40 alloc_scratch_image
    at gdkimage.c line 295
  • #41 _gdk_image_get_scratch
    at gdkimage.c line 352
  • #42 gdk_draw_rgb_image_core
    at gdkrgb.c line 3099
  • #43 gdk_draw_rgb_image_dithalign
    at gdkrgb.c line 3193
  • #44 gdk_drawable_real_draw_pixbuf
    at gdkdraw.c line 1523
  • #45 gdk_x11_draw_pixbuf
    at gdkdrawable-x11.c line 1435
  • #46 gdk_draw_pixbuf
    at gdkdraw.c line 778
  • #47 gdk_pixmap_draw_pixbuf
    at gdkpixmap.c line 406
  • #48 gdk_draw_pixbuf
  • #49 gdk_pixbuf_render_pixmap_and_mask_for_colormap
    at gdkpixbuf-render.c line 307
  • #50 set_pixbuf_background
    at panel-background.c line 76
  • #51 panel_background_prepare
    at panel-background.c line 121
  • #52 panel_background_composite
    at panel-background.c line 314

Comment 20 Raj 2004-11-23 07:43:44 UTC
FWIW,
i've tried this to consistently get a crash:

- Set panel to complete transparency
- Right click on desktop & change desktop backgrounds rapidly.
Comment 21 Vincent Untz 2004-11-25 20:06:15 UTC
*** Bug 157541 has been marked as a duplicate of this bug. ***
Comment 22 Venkatesan 2004-12-15 13:19:34 UTC
Created attachment 34858 [details] [review]
proposed patch

It looks like gdk_pixbuf_get_from_drawable function is the culprit. This patch
just replaces the single call to gdk_pixbuf_get_from_drawable with equivalent
calls to gdk_drawable_get_image and then gdk_pixbuf_get_from_image. This
removes the crash. I similarly replaced gdk_pixbuf_get_from_drawable function
in Mark McLoughlin's testcase program and observed that the crash was gone in
test case program too...
Comment 23 Vincent Untz 2004-12-22 00:12:36 UTC
That's interesting. It's probably a bug in gdk_pixbuf_get_from_drawable(), then.
Could you write a small test so we can show this to GTK+ people?
Comment 24 Vincent Untz 2005-01-02 14:15:07 UTC
Comment on attachment 34858 [details] [review]
proposed patch

Marking as needs-work since it looks like a GTK+ bug.
Comment 25 Pete van der Spoel 2005-01-14 10:31:31 UTC
Occassionally I can produce a gnome-panel crash (or at least a conflict, as it
says "gnome-panel already running") with the rightclick->'change desktop
background' dialog and then changing *from* a PNG to a JPEG file, contrary to
the bug details at the top.

I couldn't reproduce it when I made the panels opaque, so I thought it was
probably closely related to this bug.

I'm using Debian Testing (Sarge) which has gnome-panel 2.8.2. 

I'll attach the bug-buddy gnome-panel backtrace and the JPEG. The PNG is
generated by the following script:

#!/bin/bash
#xplanet-gnome.sh shell script v0.2
#shows Earth on your Gnome desktop with current lighting conditions,i.e. day and
night
DELAY=30m
PREFIX=/home/pete/multimedia/wallpapers/
OUTPUT=xplanet.png
APPEND=2
GEOMETRY=1024x768
LONGITUDE=0
LATITUDE=35
#default is no projection,i.e. render a globe
#rectangular is the flat world map. also try ancient, azimuthal,  mercator,..
#PROJECTION=rectangular  
#rename background image so Gnome realises image has changed - thx to dmbasso
if [ -e "$PREFIX$OUTPUT" ]; then
   rm "$PREFIX$OUTPUT"
   OUTPUT="$APPEND$OUTPUT"
else
   rm "$PREFIX$APPEND$OUTPUT"
fi
if [ -z $PROJECTION ]; then 
xplanet -num_times 1 -output "$PREFIX$OUTPUT" -geometry $GEOMETRY -longitude
$LONGITUDE -latitude $LATITUDE -label -radius=55 
else
xplanet -num_times 1 -output "$PREFIX$OUTPUT" -geometry $GEOMETRY -longitude
$LONGITUDE -latitude $LATITUDE -projection $PROJECTION -label -radius=55
fi
#update Gnome backgound
gconftool -t str -s /desktop/gnome/background/picture_filename "$PREFIX$OUTPUT"
sleep $DELAY
exec $0
Comment 26 Pete van der Spoel 2005-01-14 10:33:14 UTC
Created attachment 36004 [details]
gnome-panel backtrace

gnome-panel backtrace of changing from PNG to JPEG background whilst panels are
transparent
Comment 27 Pete van der Spoel 2005-01-14 11:14:50 UTC
Couldn't upload the big JPEG, so here's the link:
www.cetis.hvu.nl/~pete/images/mars.jpg
Comment 28 Sebastien Bacher 2005-02-05 13:39:01 UTC
I've this crash with 2.9.90 too. The gdk_pixbuf_get_from_drawable () to
gdk_drawable_get_image ()/gdk_pixbuf_get_from_image () change from 34858 fixes
the issue.
Comment 29 Luis Villa 2005-02-28 15:06:29 UTC
34858? That bug doesn't exist...
Comment 30 Vincent Untz 2005-02-28 15:12:47 UTC
Luis: Sebastien was talking about patch 34858 ;-)
Comment 31 Luis Villa 2005-02-28 15:26:36 UTC
Ah, the needs-work because it is a workaround patch? Can we just go around and
commit it, and get on the gtk guys to fix their bug?
Comment 32 Vincent Untz 2005-02-28 15:58:29 UTC
Luis: I'll probably go this way. But I'd prefer if the GTK+ bug could be fixed...
Comment 33 Luis Villa 2005-02-28 16:02:03 UTC
What is the gtk bug #, for reference?
Comment 34 Vincent Untz 2005-02-28 16:07:52 UTC
Hrm... I don't think I ever opened a bug against GTK+. I did not look a lot at
this bug since I asked Venkatesan if he could write a small testcase. I should
have come back to it sooner :/
Comment 35 Vincent Untz 2005-02-28 22:14:05 UTC
Note that this crash doesn't happen when running inside xnest. This is why I
could never reproduce it...

New up to date stack trace:

gdb /gnome/usr/bin/gnome-panel

(gdb) br gdk_x_error
Breakpoint 1 at 0xb7a03d22: file gdkmain-x11.c, line 505.
(gdb) run --sync
Starting program: /gnome/usr/bin/gnome-panel --sync
[Thread debugging using libthread_db enabled]
[New Thread -1223408992 (LWP 28445)]
[New Thread -1231905872 (LWP 28456)]

Thread NaN (LWP 28445)

  • #0 gdk_x_error
    at gdkmain-x11.c line 505
  • #1 _XError
    from /usr/X11R6/lib/libX11.so.6
  • #2 _XReply
    from /usr/X11R6/lib/libX11.so.6
  • #3 XSync
    from /usr/X11R6/lib/libX11.so.6
  • #4 XSync
    from /usr/X11R6/lib/libX11.so.6
  • #5 XCreateGC
    from /usr/X11R6/lib/libX11.so.6
  • #6 _gdk_x11_copy_to_image
    at gdkimage-x11.c line 541
  • #7 IA__gdk_drawable_copy_to_image
    at gdkdraw.c line 1034
  • #8 gdk_pixmap_copy_to_image
    at gdkpixmap.c line 514
  • #9 IA__gdk_drawable_copy_to_image
    at gdkdraw.c line 1034
  • #10 IA__gdk_pixbuf_get_from_drawable
    at gdkpixbuf-drawable.c line 1302
  • #11 panel_background_monitor_setup_pixbuf
  • #12 panel_background_monitor_get_region
    at panel-background-monitor.c line 356
  • #13 background_changed
    at panel-background.c line 165
  • #14 IA__g_cclosure_marshal_VOID__VOID
    at gmarshal.c line 77
  • #15 IA__g_closure_invoke
    at gclosure.c line 437
  • #16 signal_emit_unlocked_R
    at gsignal.c line 2485
  • #17 IA__g_signal_emit_valist
    at gsignal.c line 2244
  • #18 IA__g_signal_emit
    at gsignal.c line 2288
  • #19 panel_background_monitor_xevent_filter
    at panel-background-monitor.c line 223
  • #20 gdk_event_apply_filters
    at gdkevents-x11.c line 327
  • #21 gdk_event_translate
  • #22 _gdk_events_queue
    at gdkevents-x11.c line 2154
  • #23 gdk_event_dispatch
    at gdkevents-x11.c line 2214
  • #24 g_main_dispatch
    at gmain.c line 1947
  • #25 IA__g_main_context_dispatch
    at gmain.c line 2497
  • #26 g_main_context_iterate
    at gmain.c line 2578
  • #27 IA__g_main_loop_run
    at gmain.c line 2782
  • #28 IA__gtk_main
    at gtkmain.c line 963
  • #29 main
    at main.c line 90

Comment 36 Vincent Untz 2005-02-28 22:17:03 UTC
Here's the X error:

The program 'gnome-panel' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadGC (invalid GC parameter)'.
  (Details: serial 3126 error_code 13 request_code 60 minor_code 0)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the --sync command line
   option to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)
Comment 37 Vincent Untz 2005-03-01 08:59:26 UTC
Created attachment 38081 [details] [review]
Proposed patch

This patch seems to fix the problem.
We now grab the server before doing the work.
The patch also changes the behaviour so that it works on multiple display...
Comment 38 Vincent Untz 2005-03-01 09:01:48 UTC
Well, the changes for multiple displays won't change a lot of things because of
this:
  n_screens = gdk_display_get_n_screens (gdk_display_get_default ());
But I don't think it will harm us.
Comment 39 Vincent Untz 2005-03-01 09:09:33 UTC
Created attachment 38083 [details] [review]
Updated patch

We need to check if gdk_pixbuf_get_from_drawable() returns NULL too
Comment 40 Vincent Untz 2005-03-01 10:20:37 UTC
This should now be fixed in HEAD. I'll release 2.9.92 now so people can test.