GNOME Bugzilla – Bug 172029
Crash when clicking connect with no account
Last modified: 2005-05-08 14:00:28 UTC
Against current CVS HEAD 1. Apply the 2 patches I sent to the ML tonight to avoid crashes on startup 2. Make sure that no accounts were created or setup using Gossip 3. Cancel the first-time wizard 4. Click on "Connect" in the Chat window 5. Segfault
+ Trace 57477
The "Connect..." button probably shouldn't be available if no accounts have been setup. I have no idea where to plug this stuff in though.
I would say that might be slightly confusing and that perhaps on Connect if there is no account, the accounts dialog should be shown instead? At the very least a dialog box telling the user why they can not connect.
Created attachment 45756 [details] [review] Fixes the bug. This patch does a few things: * Stops the crash from occuring. * Added dialog to tell the user they can't connect when there are no accounts set up and then take them to the accounts dialog. * Makes it able to now change the account settings and connect to a server without needing to restart the client first. Basically to do this, the GossipProtocol code needs to send the account information up just before a login is attempted. What I have done is added a gossip_protocol_setup() function which the backend implements and that gets passed the GossipAccount. Not sure if this could be done better using basic constructors of the init functions here? Also - just a thought, but the GossipProtocols are iterated and initiated that way, wouldn't it be better to iterate the GossipAccounts (which perhaps should have a protocol associated with them) and initiate that way?
Great work Martyn.
Martyn, great, could this be reworked to apply to the new structure too? Cheers,
Created attachment 46128 [details] [review] Reworked to fit in with the new code reorg.
Fixed without the changes to gossip_startup_druid which are unused.