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 635513 - Message displayed TWICE (in chat msg overlay) when opening a chat window for unread msg
Message displayed TWICE (in chat msg overlay) when opening a chat window for ...
Status: RESOLVED FIXED
Product: empathy
Classification: Core
Component: Notifications
2.32.x
Other Linux
: Normal normal
: ---
Assigned To: empathy-maint
: 638068 638921 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2010-11-22 11:27 UTC by Mandeep Sandhu
Modified: 2011-08-29 10:12 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
IM msg arrives for the firt time. (147.66 KB, image/jpeg)
2010-11-24 09:22 UTC, Mandeep Sandhu
  Details
Clicking on notification applet (180.53 KB, image/jpeg)
2010-11-24 09:23 UTC, Mandeep Sandhu
  Details
DBUS monitor log (187.05 KB, text/plain)
2010-11-24 09:24 UTC, Mandeep Sandhu
  Details
http://git.collabora.co.uk/?p=user/cassidy/empathy;a=shortlog;h=refs/heads/msg-notif-635513 (3.16 KB, patch)
2010-11-30 13:58 UTC, Guillaume Desmottes
none Details | Review

Description Mandeep Sandhu 2010-11-22 11:27:41 UTC
I'm using Empathy 2.32.0.1 that comes bundled with Ubuntu 10.10

To replicate the issue, do the following:

* Ask a friend to IM you.
* Unread IM notification is shown in the notification applet. Simultaneously, a black bubble-like overlay is shown in the top-right corner with the IM text.
* Click on the notification applet to open the IM chat window.
* The black bubble shows the IM text _again_ right below the original text. This looks as if the IM msg is repeated twice.

This does not happen if the chat window (with that particular buddy) is already open.

PS: I cannot find the right technical term for "black bubble", so pardon my layman terms! :)
Comment 1 Guillaume Desmottes 2010-11-22 12:51:01 UTC
I can't reproduce this issue. What happen exactly? The first bubble disappears and then a new one re-appear once you click on the status icon? Or is the bubble stay displayed and is extended to display the same msg twice ?
Comment 2 Mandeep Sandhu 2010-11-23 04:50:47 UTC
The second scenario happens i.e "the bubble stay displayed and is extended to display the same msg twice"

I was able to reproduce it in another machine as well. Basically you have to open the chat window and then you 'll see the msg come twice in the overlay bubble. If the chat window (with that buddy) was already open, it does NOT happen.

Let me know if you need more info.

Thanks,
-mandeep
Comment 3 Guillaume Desmottes 2010-11-23 10:05:11 UTC
I can't reproduce this. Could you please start "dbus-monitor" before receiving the msg, reproduce the bug and then attach its log?
Comment 4 Mandeep Sandhu 2010-11-24 09:22:15 UTC
Created attachment 175148 [details]
IM msg arrives for the firt time.
Comment 5 Mandeep Sandhu 2010-11-24 09:23:10 UTC
Created attachment 175149 [details]
Clicking on notification applet
Comment 6 Mandeep Sandhu 2010-11-24 09:24:56 UTC
Created attachment 175150 [details]
DBUS monitor log

dbus-monitor was run _before_ receiving the IM message. I stopped it _after_ opening the IM chat window by clicking on the notification applet.

Let me know if you need more info.
Comment 7 Guillaume Desmottes 2010-11-25 09:52:29 UTC
Indeed Notify() is called twice. Do you have the "Enable notifications when the chat is not focused" on ?
Comment 8 Mandeep Sandhu 2010-11-25 10:29:58 UTC
Yes, I have "Enable notifications when the chat is not focused" checked.
Comment 9 Guillaume Desmottes 2010-11-25 11:04:35 UTC
Does it still happen if you uncheck it?
Comment 10 Mandeep Sandhu 2010-11-25 11:32:07 UTC
No, it does not happen if I uncheck it. But then I won't get notifications in case the chat window is not in focus.
Comment 11 Guillaume Desmottes 2010-11-30 13:58:37 UTC
Created attachment 175532 [details] [review]
http://git.collabora.co.uk/?p=user/cassidy/empathy;a=shortlog;h=refs/heads/msg-notif-635513

 libempathy-gtk/empathy-chat.c |   16 ++++++++++------
 src/empathy-chat-window.c     |    7 ++++++-
 2 files changed, 16 insertions(+), 7 deletions(-)
Comment 12 Emilio Pozuelo Monfort 2010-11-30 14:32:12 UTC
Comment on attachment 175532 [details] [review]
http://git.collabora.co.uk/?p=user/cassidy/empathy;a=shortlog;h=refs/heads/msg-notif-635513

> #include <libempathy/empathy-debug.h>
> 
>+
> #define CHAT_DIR_CREATE_MODE  (S_IRUSR | S_IWUSR | S_IXUSR)

That seems unnecessary

> static void
> chat_window_new_message_cb (EmpathyChat       *chat,
> 			    EmpathyMessage    *message,
>+			    gboolean pending,
> 			    EmpathyChatWindow *window)

Maybe add spaces after gboolean to align pending with the other params?

And update the copyright year.

Other than those cosmetic changes the patch looks good to me.
Comment 13 Guillaume Desmottes 2010-11-30 15:15:32 UTC
(In reply to comment #12)
> (From update of attachment 175532 [details] [review])
> > #include <libempathy/empathy-debug.h>
> > 
> >+
> > #define CHAT_DIR_CREATE_MODE  (S_IRUSR | S_IWUSR | S_IXUSR)
> 
> That seems unnecessary

Removed.

> > static void
> > chat_window_new_message_cb (EmpathyChat       *chat,
> > 			    EmpathyMessage    *message,
> >+			    gboolean pending,
> > 			    EmpathyChatWindow *window)
> 
> Maybe add spaces after gboolean to align pending with the other params?

I usually don't do it in files style using the old style. It doesn't buy us anything, make diff confusing (if you have to extend the spaces of all args) and is not done in the new style anway.

> And update the copyright year.

done.
Comment 14 Emilio Pozuelo Monfort 2010-11-30 15:19:40 UTC
(In reply to comment #13)
> > > static void
> > > chat_window_new_message_cb (EmpathyChat       *chat,
> > > 			    EmpathyMessage    *message,
> > >+			    gboolean pending,
> > > 			    EmpathyChatWindow *window)
> > 
> > Maybe add spaces after gboolean to align pending with the other params?
> 
> I usually don't do it in files style using the old style. It doesn't buy us
> anything, make diff confusing (if you have to extend the spaces of all args)
> and is not done in the new style anway.

If it's not done in the new style then it's alright.

BTW I've found a typo:

>+		/* Pending messages have already be displayed in the approver, so we don't
>+		* display a notification for those. */

s/be/been/. Feel free to fix it and push directly :)
Comment 15 Guillaume Desmottes 2010-11-30 15:31:00 UTC
Amended and merged to master; thanks!

This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.
Comment 16 Guillaume Desmottes 2011-01-10 12:58:39 UTC
*** Bug 638921 has been marked as a duplicate of this bug. ***
Comment 17 Guillaume Desmottes 2011-01-11 08:47:36 UTC
*** Bug 638068 has been marked as a duplicate of this bug. ***
Comment 18 Omer Akram 2011-03-02 17:35:25 UTC
This issue seems to be back in empathy 2.33.2 in Natty. I can reproduce and there is also a confirmation from someone else too. should I open a a new bug report?
Comment 19 Guillaume Desmottes 2011-03-03 13:21:24 UTC
Yes open a new one and attach empathy-chat logs please.