Adium

Opened 13 years ago

Closed 13 years ago

Last modified 12 years ago

#5678 closed defect (fixed)

Reconnect waking from sleep fails with GTalk

Reported by: mark.johnson Owned by:
Milestone: Adium X 1.1 Component: Service/Google Talk
Version: Severity: normal
Keywords: reconnect sleep error Cc:
Patch Status:

Description

I consistently get an error waking from sleep that Adium cannot connect to GTalk. Despite the fact that I have tried having a LAN cable connected (in case the airport was taking too long to acquire and IP) I still get this problem. It has been apparent in all the beta versions I have tried and I am on the latest right now.

Adium throws up an error dialog, even though I have configured it to use Growl for these errors (it also shows up in Growl but I would prefer the popup to go away).

By comparison, .Mac never has this error and reconnects fine once an internet connection is available. Unfortunately most of my contacts use GTalk so I have to keep reconnecting to GTalk.

I commented on a previous bug, but it has been marked as fixed, so I thought it was appropriate to raise my own defect.

I have a MacBook Pro running 10.4.8 and 1.0b14.

Attachments (1)

ticket5678.diff (837 bytes) - added by jad 13 years ago.
Patch from ticket:6466 that should allow Adium to correctly detect when a network is available.

Download all attachments as: .zip

Change History (12)

comment:1 Changed 13 years ago by Chris Forsythe

Milestone: Needs feedback from users
Owner: changed from nobody to Eric Richie

Needs repro

comment:2 Changed 13 years ago by Eric Richie

Keywords: TicketTaskForce added

comment:3 Changed 13 years ago by Carlos Morales

I'm running 1.0b20 on a Powerbook, and I have not been able to reproduce this. Maybe it has something to do with running adium on a mactel.

comment:4 Changed 13 years ago by Mark Johnson

There are a number of bugs raised with the same attributes:

  • reconnect from sleep
  • potentially changing networks in between
  • Jabber/GTalk

Yes I am on mactel, and if you don't have one then PLEASE just ask me what I need to do to provide information so that this can be fixed.

It is really frustrating that this is the one thing that is failing for me and despite the fact that others seem to be reporting it as well no action is being taken.

comment:5 in reply to:  4 ; Changed 13 years ago by Evan Schoenberg

Replying to mark.johnson:

It is really frustrating that this is the one thing that is failing for me and despite the fact that others seem to be reporting it as well no action is being taken.

A lack of a fix does not mean no action is being taken. It means a fix has not yet been made. Please feel free to submit a patch correcting the problem.

comment:6 in reply to:  5 Changed 13 years ago by Mark Johnson

Replying to evands:

Please feel free to submit a patch correcting the problem.

I am not in a position to diagnose the code, code a solution and send that in.

I am more than happy to provide logs, etc that could help someone with Adium code knowledge to attempt to solve the problem. I am also happy to run debug code if required, etc.

comment:7 Changed 13 years ago by jad

I think the incorrect logic causing ticket:6466 is also causing this bug. On Macs experiencing this issue, basically what is happening is the following:

  1. The Mac wakes from sleep, but is not yet connected to an Airport network because the OS is moving slowly. On my machine, it frequently takes ~20 seconds before my Airport connection is restored.
  2. With Airport still disconnected, Adium is notified via the hostReachabilityChangedCallback() function that the network status has changed. Adium incorrectly parses the reachability flags and determines the network is available when in fact it is not.
  3. With Airport still disconnected, Adium tries to connect.
  4. With Airport still disconnected, Adium's connection attempt fails, and Adium throws up the error message. You are now forced to reconnect manually once your Airport connection comes back.

If some people are not able to reproduce this bug, I think it is only due to the fact that some Macs are able to restore their Airport connections between steps 3 and 4 above. This will allow the IM connections to be succesfully restored despite the fact that Adium incorrectly started trying to connect when no connection was available. In the testing on my machine, about 10% of the time my network connection would be established quickly enough that I would receive no error messages and it would reconnect as expected. The other 90% I had a delay long enough to get me to step 4. I also tested on a PowerBook 12", and the network connection came back very quickly, so I had a difficult time reproducing this problem. Again, I think that was pure luck.

The patch attached to ticket:6466 should fix this issue as well, but I'm going to attach it here anyway. I suspect this will also fix several other similar sounding bugs (ticket:5891, ticket:5948, ticket:6045, others?).

Environment
MacBook Pro
Mac OS X 10.4.8
Adium code from the SVN trunk

Changed 13 years ago by jad

Attachment: ticket5678.diff added

Patch from ticket:6466 that should allow Adium to correctly detect when a network is available.

comment:8 Changed 13 years ago by Eric Richie

Milestone: Needs feedback from usersNeeds Feedback - Received

comment:9 Changed 13 years ago by Evan Schoenberg

Milestone: Needs Feedback - ReceivedAdium X 1.1
Patch Status: None
pending: 0

Going to apply #6466 in the 1.1 timeframe, so milestoning appropriately.

comment:10 Changed 13 years ago by Eric Richie

Keywords: TicketTaskForce removed
Owner: Eric Richie deleted

comment:11 Changed 13 years ago by Evan Schoenberg

Resolution: fixed
Status: newclosed

(In [20040]) Patch from jad (thanks!): Don't treat 'Direct' as an acceptable way of reaching a host. This appears to fix a problem for some network configrations in which Adium would incorrectly think it could reach a host and therefore try to connect. I'm not backporting this to adium-1.0, so it will be present only in the 1.1 beta; let's see if it fixes more problems than it causes.

Fixes #6466. Fixes #5678.

Note: See TracTickets for help on using tickets.