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 675370 - Empathy shows multiple popups in gnome 3
Empathy shows multiple popups in gnome 3
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: telepathy
3.4.x
Other Linux
: Normal normal
: ---
Assigned To: GNOME Shell Telepathy maintainer(s)
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2012-05-03 13:49 UTC by Christian Smith
Modified: 2012-06-01 07:40 UTC
See Also:
GNOME target: ---
GNOME version: 3.3/3.4


Attachments
Picture of notification bug (203.94 KB, image/png)
2012-05-03 13:49 UTC, Christian Smith
  Details
notificationDaemon.js: convert the hints dict at the beginning of the function (1.83 KB, patch)
2012-05-31 09:30 UTC, Guillaume Desmottes
committed Details | Review

Description Christian Smith 2012-05-03 13:49:05 UTC
Created attachment 213383 [details]
Picture of notification bug

What happens :
With gnome-shell, a popup saying I have X message, then again, with the ability to respond. If I open the bottom-right hand notification area, it shows the person's avatar and the number of missed im's. It also creates a new icon for empathy itself that seems to just bring the app forward. If I open the contact's chat log in gnome-shell, the unread indicator goes away and it shows the built-in chat log, but the empathy icon does not. If I click the icon, it opens the empathy window holding that chat, bringing it to the front.

Expected:
the empathy icon should never showed up in the notification system, so only the built-in gnome-shell chat interface should be in the notification area.

Other info:
It seems that this only happens when the empathy chat window isn't focused.

Also, if you are set to idle, then this bug does not appear, only when yo are set to "Available".

Empathy is 3.4.1-0ubuntu1
gnome-shell is 3.4.1-0ubuntu2

Attached is a picture of the bug. The green box should should show up, the red box should not show up.
Comment 1 Guillaume Desmottes 2012-05-07 07:14:22 UTC
I guess you are using Ubuntu 12.04 right?

Indeed, Empathy's status icon is not supposed to be displayed when using the Shell. Did you start Empathy *after* gnome-shell?

Could you please try the following
- Make sure gnome-shell is running
- killall -9 empathy
- Start Empathy

Is the status icon displayed?
Comment 2 Christian Smith 2012-05-07 12:44:10 UTC
Yes, the icon still displays after explicitly killing empathy via killall -9. 

Yes, Ubuntu 12.04 x64.
Comment 3 Guillaume Desmottes 2012-05-07 13:25:45 UTC
When starting empathy with "EMPATHY_DEBUG=all empathy" are you seeing:
"GNOME Shell is running, don't create status icon" in the debug output?

What's the output of:
dbus-send --print-reply --session --type=method_call --dest=org.gnome.Shell / org.freedesktop.DBus.Peer.Ping
Comment 4 Christian Smith 2012-05-07 17:28:39 UTC
method return sender=:1.13 -> dest=:1.1199 reply_serial=2


Does that look right?
Comment 5 Guillaume Desmottes 2012-05-08 06:08:50 UTC
Yep, so Empathy should detect that the Shell is running and not instantiate the status icon.

Did you check for "GNOME Shell is running, don't create status icon" in the debug log?
Comment 6 Christian Smith 2012-05-08 13:01:30 UTC
Yes:

05/08/2010 07:51:24.233681
empathy
Other
Debug
list_names_cb: GNOME Shell is running, don't create status icon
Comment 7 Guillaume Desmottes 2012-05-09 07:25:08 UTC
Humm that's really weird, it shouldn't create the status icon.

Can you please:
- install empathy-dbg
- Make sure empathy is not running
- gdb /usr/bin/empathy
- r
- Once gdb breaks on this function: 'bt'
- Attach the trace displayed
Comment 8 Christian Smith 2012-05-09 15:35:20 UTC
breakpoint on list_names_cb:

  • #0 list_names_cb
    at empathy.c line 266
  • #1 _tp_dbus_daemon_list_names_idle
    at dbus-daemon.c line 1094
  • #2 g_main_dispatch
    at /build/buildd/glib2.0-2.32.1/./glib/gmain.c line 2515
  • #3 g_main_context_dispatch
    at /build/buildd/glib2.0-2.32.1/./glib/gmain.c line 3052
  • #4 g_main_context_iterate
    at /build/buildd/glib2.0-2.32.1/./glib/gmain.c line 3123
  • #5 g_main_context_iterate
    at /build/buildd/glib2.0-2.32.1/./glib/gmain.c line 3060
  • #6 g_main_context_iteration
    at /build/buildd/glib2.0-2.32.1/./glib/gmain.c line 3184
  • #7 g_application_run
    at /build/buildd/glib2.0-2.32.1/./gio/gapplication.c line 1496
  • #8 main
    at empathy.c line 860

Comment 9 Guillaume Desmottes 2012-05-11 09:01:25 UTC
Sorry, you should break on empathy_status_icon_new. So:


- gdb /usr/bin/empathy
- b empathy_status_icon_new
- r
- Once gdb breaks on this function: 'bt'
- Attach the trace displayed
Comment 10 Christian Smith 2012-05-11 13:41:41 UTC
I can't seem to get it to break on that function, even though the icon is showing up in the notification bar.
Comment 11 Guillaume Desmottes 2012-05-14 07:55:33 UTC
Humm that's really weird. What about this function: gtk_status_icon_init ?
Comment 12 Christian Smith 2012-05-23 18:22:31 UTC
Same as above.
Comment 13 Guillaume Desmottes 2012-05-24 07:40:45 UTC
I mean, could you please attach the trace of the gtk_status_icon_init call from gdb.
Comment 14 Christian Smith 2012-05-24 13:18:26 UTC
There was no break on gtk_status_icon_init.

Here are the steps:
- killall -9 empathy
- killall -9 empathy-chat
- b gtk_status_icon_init
 Function "gtk_status_icon_init" not defined.)
 Make breakpoint pending on future shared library load? (y or [n]) y

 Breakpoint 1 (gtk_status_icon_init) pending.

Then it never breaks on that breakpoint even though I get the icon on replies.
Comment 15 Guillaume Desmottes 2012-05-25 08:22:30 UTC
Does this icon only appear when you receive incoming messages?
Does it if you start the conversation and don't receive a reply?

Are you receiving 2 notifications when receiving an incoming message?
Comment 16 Christian Smith 2012-05-30 17:00:26 UTC
If I receive a message and the empathy-chat window for that person is not up, I get one popup (the built-in gnome-shell chat ui), and can reply through gnome-shell like normal, so just one popup there (and none when I reply).

If I receive a message and the empathy-chat window for that person IS up , but not in focus, I get two popups, one telling me that basically the empathy-chat window has an update (like what happens when other programs out of focus need you attention), and I get the regular gnome-shell ui stuff. So with an unfocused window, I get two. I also get a new popup (telling me that empathy-chat needs my attention) if I send from the gnome-shell chat ui. That's two popups if I don't reply, and three if I do.

If the window is in focus, I don't get any popups, even if using the gnome-shell chat ui.

empathy just updated to 3.4.2-0ubuntu1 and still has the problem.

(though it seems to be looking like a ubuntu + gnome-shell problem, huh?)
Comment 17 Guillaume Desmottes 2012-05-31 09:28:05 UTC
Got it! That's actually a Shell regression, I'm experiencing it since I upgraded to 3.4. Thanks a lot for your help.
Comment 18 Guillaume Desmottes 2012-05-31 09:30:28 UTC
Created attachment 215313 [details] [review]
notificationDaemon.js: convert the hints dict at the beginning of the function

It's used right away to discard some Empathy notifications.

This regression has been introduced during the 3.4 cycle when 'hints' has been
turned to a GVariant.
Comment 19 Jasper St. Pierre (not reading bugmail) 2012-05-31 17:18:57 UTC
Review of attachment 215313 [details] [review]:

Yes.
Comment 20 Guillaume Desmottes 2012-06-01 07:39:58 UTC
Attachment 215313 [details] pushed as 406db19 - notificationDaemon.js: convert the hints dict at the beginning of the function