Multiple entries in messaging menu

Bug #650604 reported by Matthew Gregg
28
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Thunderbird Indicator
Confirmed
High
Unassigned

Bug Description

I am running thunderbird-indicator-1.1.xpi using TB 3.1.5. At times TB will crash and each restart creates a new menu section in the messaging menu. See attached screen shot.

Revision history for this message
Matthew Gregg (mcg) wrote :
Revision history for this message
Ruben Verweij (ruben-verweij) wrote :

Thank you for your bug report.
Could you please run Thunderbird from the command line and report any error messages that you get when it crashes?
Could you also report any error messages from the Error console? (Tools->Error console)
Thanks in advance!

Changed in libnotify-mozilla:
assignee: nobody → Ruben Verweij (ruben-verweij)
importance: Undecided → High
status: New → Incomplete
Revision history for this message
Matthew Gregg (mcg) wrote :

Running from the command line I get a crash with a "Segmentation fault" and am left with an orphaned Thunderbird Indicator menu section. The next restart of TB I get another section.

Revision history for this message
Ruben Verweij (ruben-verweij) wrote :

Could you please test this again using the latest version?
Thanks in advace!

Revision history for this message
Matthew Gregg (mcg) wrote :

Latest version of TB or Thunderbird Indicator? I'm currently using 3.1.7pre of TB with 1.1 Indicator and it is still happening.

Revision history for this message
bobhuber (bobhuber-tampabay) wrote :

I have the same problem. I had issued a killall TB from the command line (no crash) and discovered a duplicate entry in the messaging menu upon reloading TB. TB 3.1.7 with indicator applet 1.1

Revision history for this message
Jeremy Nickurak (nickurak) wrote :

I'm hitting this on xul-ext-indicator 1.3.1-0ubuntu1

Changed in libnotify-mozilla:
status: Incomplete → Confirmed
Revision history for this message
Jeremy Nickurak (nickurak) wrote :

Here's how it looks for me, when I've closed thunderbird.

Revision history for this message
Lee Hyde (anubeon) wrote :

I'm experiencing this same issue after having to kill an instance of Thunderbird yesterday. The entry has persisted between sessions (i.e. a reboot doesn't rid me of it). I vaguely recall something similar happening a while back, and having to issue a command to clear the errant entry. However, I can't for the life of me recall what that command was and Google has not been my friend on this one.

Anyone have any ideas how one might flush out a persistent, yet erroneous entry from the messaging menu?

Revision history for this message
Lee Hyde (anubeon) wrote :

Eureka!

I've managed to remove the erroneous entry from the messaging menu by typing the following into a terminal:

ps aux | grep thunderbird

This gave the following output:

ch2lah 2868 0.0 0.5 208492 20412 ? S Feb21 0:00 python /<email address hidden>/python/indicator.py thunderbird.tbindicator.default-fifo867
ch2lah 27950 0.0 0.0 8960 876 pts/1 S+ 01:13 0:00 grep --color=auto thunderbird

Which clearly shows an erroneous background process (possible a vestige of the session of Thunderbird that I unceremoniously killed) with a PID of 2868. After killing that process (sudo kill 2868) and removing/re-adding the indicator-applet the erroneous extra entry was gone. I hope that at least enables the rest of you to rid yourselves of those pesky duplicates.

Kind Regards,

Lee Hyde.

Revision history for this message
Anish Sane (anishsane) wrote :

Hi,
I added a few lines to indicator.py & the problem is taken care of... well mostly.
Developer: Please try this & let me know, if it is useful.

1. Add "import time" at the start of the script, where different external modules are imported.

2. After the line:
if __name__ == "__main__":

Add below code:
----------------------
    #Kill previous orphan instances
    os.system("bash -c \"eval `ps -ef | grep \\\"indicator.py\\\" | grep -v grep | awk '{if (($3==1) && ($1 == \\\"%s\\\")) printf \\\"kill -9 %%d;\\\", $2}'`\"" % getpass.getuser())
    time.sleep(1)

    #Exit, if new window is opened from same thunderbird window (there may exist better ways of doing it.)
    fp = open("/tmp/.tbIndicator.lock", 'w')
    try:
        fcntl.lockf(fp, fcntl.LOCK_EX | fcntl.LOCK_NB)
    except IOError:
        #os.system("zenity --info --text='could not get lock' &")
        sys.exit(0)
----------------------

tried & tested with most corner cases, which I could think of. Please check from your end. :-)

Revision history for this message
Anish Sane (anishsane) wrote :

Hi,
I added a few lines to indicator.py & the problem is taken care of... well mostly.
Developer: Please try this & let me know, if it is useful.

1. Add "import time, fcntl, getpass" at the start of the script, where different external modules are imported.

2. After the line:
if __name__ == "__main__":

Add below code:
----------------------
    #Kill previous orphan instances
    os.system("bash -c \"eval `ps -ef | grep \\\"indicator.py\\\" | grep -v grep | awk '{if (($3==1) && ($1 == \\\"%s\\\")) printf \\\"kill -9 %%d;\\\", $2}'`\"" % getpass.getuser())
    time.sleep(1)

    #Exit, if new window is opened from same thunderbird window (there may exist better ways of doing it.)
    fp = open("/tmp/.tbIndicator.lock", 'w')
    try:
        fcntl.lockf(fp, fcntl.LOCK_EX | fcntl.LOCK_NB)
    except IOError:
        #os.system("zenity --info --text='could not get lock' &")
        sys.exit(0)
----------------------

tried & tested with most corner cases, which I could think of. Please check from your end. :-)
You may also check the patch attached.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.