Bug 31772 - Receiving a disco reply from a contact who's gone offline crashes Gabble
Summary: Receiving a disco reply from a contact who's gone offline crashes Gabble
Status: RESOLVED FIXED
Alias: None
Product: Telepathy
Classification: Unclassified
Component: gabble (show other bugs)
Version: git master
Hardware: Other All
: medium normal
Assignee: Telepathy bugs list
QA Contact: Telepathy bugs list
URL: http://git.collabora.co.uk/?p=telepat...
Whiteboard: review+
Keywords: patch
Depends on:
Blocks:
 
Reported: 2010-11-19 11:35 UTC by Will Thompson
Modified: 2010-11-21 05:26 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

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.