Opened 8 years ago

Closed 7 years ago

#3198 closed Defect (Fixed)

Dynamic removal of proxy configuration tab leaves zombie outlet

Reported by: jalkut@… Owned by: timothy
Component: Colloquy (Mac) Version: Local Build
Severity: Normal Keywords:


  1. Select a server in the IRC connections server list.
  2. Click the info button.
  3. Repeatedly click the info button until crash.

The issue is based in the dynamic removal from the config panel of the Proxy configuration tab. An outlet "editProxy" is left referencing the removed tab, which becomes deallocated. Later, when the panel is redisplayed, the editProxy outlet still points at garbage when it is messaged.

diff --git a/Inspectors/JVConnectionInspector.m b/Inspectors/JVConnectionInspector.m
index db63428..b11e3c9 100644
--- a/Inspectors/JVConnectionInspector.m
+++ b/Inspectors/JVConnectionInspector.m
@@ -67,8 +67,15 @@

NSInteger tabViewIndex = [tabView indexOfTabViewItemWithIdentifier:@"Proxy"];
if( tabViewIndex != NSNotFound )

+ {

[tabView removeTabViewItem:[tabView tabViewItemAtIndex:tabViewIndex]];

+ Removing the tab view item will cause outlet connections below to become
invalid e.g. editProxy may be a zombie and crash when messaged.
+ So we'll zero out the outlet as well to avoid that ...
+ editProxy = nil;
+ }

[editAutomatic setState:MVConnectionsController defaultController] autoConnectForConnection:_connection?;
[editShowConsoleOnConnect setState:MVConnectionsController defaultController] showConsoleOnConnectForConnection:_connection?;
[sslConnection setState:[_connection isSecure]];

Change History (1)

comment:1 Changed 7 years ago by zach

  • Resolution set to Fixed
  • Status changed from new to closed

Committed in r5528, thanks!

Note: See TracTickets for help on using tickets.