adium-1.4 3041:27f792221eaf: Enabled CONTACT_OBSERVER_MEMORY_MAN...

commits at adium.im commits at adium.im
Mon Sep 20 03:06:17 UTC 2010


details:	http://hg.adium.im/adium-1.4/rev/27f792221eaf
revision:	3041:27f792221eaf
author:		Evan Schoenberg
date:		Sun Sep 19 21:43:59 2010 -0500

Enabled CONTACT_OBSERVER_MEMORY_MANAGEMENT_DEBUG as we have a reported crash against 1.4b18 which shows messaging a freed contact list observer, and I can't find any way that this could happen. Refs #14158 - we'll need complete debug logging from someone reproducing this crash to investigate.
Subject: adium-1.4 3042:c6ef8efaf14f: Initialize the AMPurpleJabberAdHocServer when the account initializes, before we ever attempt to connect. This ensures that jabber_add_feature() is called before any JabberStream is created by libpurple, which in turns keeps our advertised capabilities consistent with the hash generated ot describe them. Fixes #14273

details:	http://hg.adium.im/adium-1.4/rev/c6ef8efaf14f
revision:	3042:c6ef8efaf14f
author:		Evan Schoenberg
date:		Sun Sep 19 22:06:04 2010 -0500

Initialize the AMPurpleJabberAdHocServer when the account initializes, before we ever attempt to connect. This ensures that jabber_add_feature() is called before any JabberStream is created by libpurple, which in turns keeps our advertised capabilities consistent with the hash generated ot describe them. Fixes #14273

diffs (74 lines):

diff -r 16f39493eae4 -r c6ef8efaf14f Adium.xcodeproj/project.pbxproj
--- a/Adium.xcodeproj/project.pbxproj	Sun Sep 19 20:58:33 2010 -0400
+++ b/Adium.xcodeproj/project.pbxproj	Sun Sep 19 22:06:04 2010 -0500
@@ -9514,6 +9514,7 @@
 			};
 			buildConfigurationList = DADE8E3A085507450062B664 /* Build configuration list for PBXProject "Adium" */;
 			compatibilityVersion = "Xcode 3.1";
+			developmentRegion = English;
 			hasScannedForEncodings = 1;
 			knownRegions = (
 				en,
diff -r 16f39493eae4 -r c6ef8efaf14f Frameworks/Adium Framework/Source/AIContactObserverManager.m
--- a/Frameworks/Adium Framework/Source/AIContactObserverManager.m	Sun Sep 19 20:58:33 2010 -0400
+++ b/Frameworks/Adium Framework/Source/AIContactObserverManager.m	Sun Sep 19 22:06:04 2010 -0500
@@ -24,11 +24,9 @@
 #import <Adium/AIMetaContact.h>
 #import <Adium/AISortController.h>
 
-/*
- #ifdef DEBUG_BUILD
+#ifdef DEBUG_BUILD
  #define CONTACT_OBSERVER_MEMORY_MANAGEMENT_DEBUG	TRUE
- #endif
- */
+#endif
 
 #ifdef CONTACT_OBSERVER_MEMORY_MANAGEMENT_DEBUG
 	#import <Foundation/NSDebug.h>
diff -r 16f39493eae4 -r c6ef8efaf14f Frameworks/Adium Framework/Source/AIListObject.m
--- a/Frameworks/Adium Framework/Source/AIListObject.m	Sun Sep 19 20:58:33 2010 -0400
+++ b/Frameworks/Adium Framework/Source/AIListObject.m	Sun Sep 19 22:06:04 2010 -0500
@@ -161,6 +161,7 @@
 
 - (NSSet *) groups
 {
+#warning Very inefficient
 	return [[m_groups copy] autorelease];
 }
 
diff -r 16f39493eae4 -r c6ef8efaf14f Plugins/Purple Service/ESPurpleJabberAccount.m
--- a/Plugins/Purple Service/ESPurpleJabberAccount.m	Sun Sep 19 20:58:33 2010 -0400
+++ b/Plugins/Purple Service/ESPurpleJabberAccount.m	Sun Sep 19 22:06:04 2010 -0500
@@ -48,6 +48,13 @@
 
 @implementation ESPurpleJabberAccount
 
+- (void)initAccount
+{
+	[super initAccount];
+
+	adhocServer = [[AMPurpleJabberAdHocServer alloc] initWithAccount:self];
+}
+
 /*!
  * @brief The UID will be changed. The account has a chance to perform modifications
  *
@@ -97,6 +104,8 @@
 {
 	[xmlConsoleController close];
 	[xmlConsoleController release];
+	[adhocServer release];
+	[gateways release];
 
 	[super dealloc];
 }
@@ -730,8 +739,6 @@
 	[gateways release];
 	gateways = [[NSMutableArray alloc] init];
 
-	[adhocServer release];
-	adhocServer = [[AMPurpleJabberAdHocServer alloc] initWithAccount:self];
 	[adhocServer addCommand:@"ping" delegate:(id<AMPurpleJabberAdHocServerDelegate>)[AMPurpleJabberAdHocPing class] name:@"Ping"];
 	
     [super didConnect];




More information about the commits mailing list