L4LoggerStore line 167, in the function -[L4LoggerStore loggerForName🏭] makes a reference to potentially invalidated object 'theNode'.
On line 166:
[repository setObject:theLogger forKey:aName];
theLogger replaces theNode as the value for key aName, and theNode is deallocated if it has no more references (per NSMutableDictionary documentation) and the theNode is now an invalid object reference. That reference is then passed to updateChildren:withParent:
A simple retain/release of theNode should do the trick. I'll submit a patch.
Here's the patch:
Index: L4LoggerStore.m
--- L4LoggerStore.m (revision 112)
+++ L4LoggerStore.m (working copy)
@@ -163,10 +163,13 @@
//
theLogger = [aFactory newLoggerInstance:aName];
[theLogger setLoggerRepository:self];
+ [theNode retain];
[repository setObject:theLogger forKey:aName];
[self updateChildren:theNode withParent:theLogger ];
[self updateParentsOfLogger:theLogger];
[loggers addObject:theLogger];
+ [theNode release];
+ theNode = nil;
} else {
// We should hopefully never end up here. ### TODO ??? - Internal Consistency Error
I wasn't logged in when I created this issue and it appears it will not let me attach the patch as a file attachment.