Bug 31772

Summary: Receiving a disco reply from a contact who's gone offline crashes Gabble
Product: Telepathy Reporter: Will Thompson <will>
Component: gabbleAssignee: Telepathy bugs list <telepathy-bugs>
Status: RESOLVED FIXED QA Contact: Telepathy bugs list <telepathy-bugs>
Severity: normal    
Priority: medium Keywords: patch
Version: git master   
Hardware: Other   
OS: All   
URL: http://git.collabora.co.uk/?p=telepathy-gabble.git;a=commit;h=b0a393487bf0bbf9688db6683d0923141f15e40d
Whiteboard: review+
i915 platform: i915 features:

Description Will Thompson 2010-11-19 11:35:56 UTC
If Gabble gets a presence with an unknown caps node, it sends a disco query.

If the contact then sends an unavailable presence, Gabble removes the contact from the presence cache.

But if the pending reply to the disco arrives successfully (which seems improbable until you remember that invisible exists), Gabble crashes, because the disco reply code assumes the contact is in the presence cache.

Test case and fix to follow.
Comment 1 Will Thompson 2010-11-19 11:57:58 UTC
Here's a branch which fixes this issue, adds a test case, and does a little refactoring while it's there.

This issue only affects the unstable branch.
Comment 2 Jonny Lamb 2010-11-19 14:37:48 UTC
 mmmmm  mmmmmm mmmmm  m    m mmmmm   mmmm   mmmm  mmmmm   mmmm  mm   m
 #   "# #      #   "# ##  ##   #    #"   " #"   "   #    m"  "m #"m  #
 #mmm#" #mmmmm #mmmm" # ## #   #    "#mmm  "#mmm    #    #    # # #m #
 #      #      #   "m # "" #   #        "#     "#   #    #    # #  # #
 #      #mmmmm #    " #    # mm#mm  "mmm#" "mmm#" mm#mm   #mm#  #   ##



mmmmmmm  mmmm         m    m mmmmmm mmmmm    mmm  mmmmmm
   #    m"  "m        ##  ## #      #   "# m"   " #     
   #    #    #        # ## # #mmmmm #mmmm" #   mm #mmmmm
   #    #    #        # "" # #      #   "m #    # #     
   #     #mm#         #    # #mmmmm #    "  "mmm" #mmmmm



   mmm  mmmmm    mm   mm   mmmmmmmm mmmmmm mmmm
 m"   " #   "#   ##   #"m  #   #    #      #   "m
 #   mm #mmmm"  #  #  # #m #   #    #mmmmm #    #
 #    # #   "m  #mm#  #  # #   #    #      #    #
  "mmm" #    " #    # #   ##   #    #mmmmm #mmm"
Comment 3 Will Thompson 2010-11-21 05:26:56 UTC
╺┳╸╻ ╻┏━┓┏┓╻╻┏ ┏━┓╻   ╻╺┳╸   ╻ ╻╻╻  ╻  
 ┃ ┣━┫┣━┫┃┗┫┣┻┓┗━┓╹   ┃ ┃    ┃╻┃┃┃  ┃  
 ╹ ╹ ╹╹ ╹╹ ╹╹ ╹┗━┛╹   ╹ ╹    ┗┻┛╹┗━╸┗━╸
   ┏┓ ┏━╸   ╻┏┓╻   ┏━┓ ╺┓ ╺┓  ┏━┓
   ┣┻┓┣╸    ┃┃┗┫   ┃┃┃  ┃  ┃  ┏━┛
   ┗━┛┗━╸   ╹╹ ╹   ┗━┛╹╺┻╸╺┻╸╹┗━╸

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.