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 649588 - crash when sending a notification: "Gdk-CRITICAL **: gdk_visual_get_red_pixel_details: assertion `GDK_IS_VISUAL (visual)' failed"
crash when sending a notification: "Gdk-CRITICAL **: gdk_visual_get_red_pixel...
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkStatusIcon
unspecified
Other Linux
: High critical
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2011-05-06 17:38 UTC by cantabile
Modified: 2011-08-28 18:22 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
backtrace from gdb (2.85 KB, text/plain)
2011-05-06 17:38 UTC, cantabile
  Details
backtrace from gdb, now with glib2 and gtk3 recompiled with debug symbols (4.53 KB, text/plain)
2011-05-07 15:27 UTC, cantabile
  Details
backtrace for assertion `GDK_IS_WINDOW (window)' failed (5.06 KB, text/plain)
2011-05-26 09:25 UTC, Antoine Jacoutot
  Details
Fix gtk_tray_icon_get_visual_property() (1.34 KB, patch)
2011-08-27 18:31 UTC, Vincent Bernat
accepted-commit_now Details | Review

Description cantabile 2011-05-06 17:38:23 UTC
Created attachment 187371 [details]
backtrace from gdb

notification-daemon crashes when sending a notification with "notify-send foo bar".

To reproduce:
1. start notification-daemon in a terminal
2. run 'notify-send foo bar' in another terminal

notification-daemon will say:
----------------
** (notification-daemon:26468): DEBUG: Adding id 1

Gdk-CRITICAL **: gdk_visual_get_red_pixel_details: assertion `GDK_IS_VISUAL (visual)' failed
aborting...
----------------

I recompiled notification-daemon with -g in C{,XX}FLAGS and got a backtrace (attached). There are still some ?? in it, should I recompile some other packages as well?

Distribution: Arch Linux
Architecture: x86_64
notification-daemon version: 0.7.1
gdk-pixbuf2 version: 2.23.3
gtk3 version: 3.0.9

I am not running gnome at all (awesome window manager here).
Comment 1 André Klapper 2011-05-07 12:59:03 UTC
Thanks for taking the time to report this bug.
Unfortunately, that stack trace is missing some elements that will help a lot to solve the problem, so it will be hard for the developers to fix that crash. Can you get us a stack trace with debugging symbols (for gtk3 and glib2)? Please see http://live.gnome.org/GettingTraces for more information on how to do so and reopen this bug or report a new one. Thanks in advance!
Comment 2 cantabile 2011-05-07 15:27:58 UTC
Created attachment 187431 [details]
backtrace from gdb, now with glib2 and gtk3 recompiled with debug symbols
Comment 3 cantabile 2011-05-07 15:28:42 UTC
>Can you get us a stack trace with debugging symbols (for gtk3 and glib2)?
Done.
Comment 4 Antoine Jacoutot 2011-05-26 09:25:54 UTC
Created attachment 188644 [details]
backtrace for assertion `GDK_IS_WINDOW (window)' failed
Comment 5 Antoine Jacoutot 2011-05-26 09:27:14 UTC
Err, looks like I forgot to post my comment first. Anyway I am seeing a similar crash as well, not with GDK_IS_VISUAL  but GDK_IS_WINDOW.
Comment 6 Antoine Jacoutot 2011-05-26 17:37:43 UTC
(In reply to comment #5)
> Err, looks like I forgot to post my comment first. Anyway I am seeing a similar
> crash as well, not with GDK_IS_VISUAL  but GDK_IS_WINDOW.

FWIW I'm seeing this crash on both Fedora and OpenBSD.
Comment 7 Antoine Jacoutot 2011-05-28 09:40:42 UTC
(In reply to comment #6)
> (In reply to comment #5)
> > Err, looks like I forgot to post my comment first. Anyway I am seeing a similar
> > crash as well, not with GDK_IS_VISUAL  but GDK_IS_WINDOW.
> 
> FWIW I'm seeing this crash on both Fedora and OpenBSD.

Reverting the following commit to gtk+:
http://git.gnome.org/browse/gtk+/commit/?h=gtk-3-0&id=0cf31b35eb10cb5bc08048ecdc141c949efec4cc
made the GDK_IS_WINDOW assertion failed crash go away for me.
Comment 8 Ionut Biru 2011-05-28 09:44:02 UTC
@Antoine, your issue is totally different and doesn't belong here. Also it was fixed already in git.

original:
Gdk-CRITICAL **: gdk_visual_get_red_pixel_details: assertion `GDK_IS_VISUAL

you:
Gtk-CRITICAL **: gtk_cairo_should_draw_window: assertion `GDK_IS_WINDOW (window)' failed
Comment 9 k.lichtenwalder 2011-06-08 16:05:39 UTC
Hi,
I'm on a current Fedora LXDE Spin with notification-daemon (i.e. minimal gnome3). I experience the same problem. If you need Info, I'll happily provide them

Klaus
Comment 10 ryan 2011-08-11 18:25:25 UTC
I am running Debian sid with fluxbox.  Switching to GNOME solves this particular issue and `notify-send foo bar` is successful, but it seems to be feasible to me that this might be a WM issue (I have not investigated it in any serious manner).  It seems that the people having issues are running different window managers.
Comment 11 Ionut Biru 2011-08-11 19:53:58 UTC
it does work because gnome uses the notification from gdu.

ps x | grep notification
Comment 12 Marcin Szewczyk 2011-08-22 20:02:55 UTC
At bugs.debian.org there is a bug marked as "Forwarded to https://bugzilla.gnome.org/show_bug.cgi?id=649588" but I cannot see any interaction between these to threads.

Here the bug has an UNCONFIRMED status, so I would like to assure everyone is informed.

There is even a draft patch suggesting the source of the problem.

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=637067
Comment 13 Vincent Bernat 2011-08-27 18:29:44 UTC
I have located the bug in gtk_tray_icon_get_visual_property(). Therefore, the bug is unrelated to notification-daemon. I attach a patch fixing the problem. This is a regression introduced in december 2010.
Comment 14 Vincent Bernat 2011-08-27 18:31:09 UTC
Created attachment 194938 [details] [review]
Fix gtk_tray_icon_get_visual_property()

[PATCH] Fix gtk_tray_icon_get_visual_property() when visual not available.

This fixes a regression introduced in commit
3518bbe28ff76a0d484df0093f6b5289edd2bebb. gdk_visual_get_*_pixel_details()
should not be called with a NULL visual.
Comment 15 Ionut Biru 2011-08-27 18:34:12 UTC
this bug needs to be moved to gtk product
Comment 16 Emmanuele Bassi (:ebassi) 2011-08-28 17:59:23 UTC
re-assigning
Comment 17 Emmanuele Bassi (:ebassi) 2011-08-28 18:00:05 UTC
Review of attachment 194938 [details] [review]:

looks good to me.
Comment 18 Benjamin Otte (Company) 2011-08-28 18:22:30 UTC
commit 6754614ac1ce8f72c0d0ec2369408ac61e080dab
Author: Vincent Bernat <bernat@luffy.cx>
Date:   Sat Aug 27 20:06:26 2011 +0200

    trayicon-x11: Fix warnings when visual is not available.
    
    This fixes a regression introduced in commit
    b1a1685a33eca16979e63d79915395af0b36. gdk_visual_get_*_pixel_details()
    should not be called with a NULL visual.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=649588