Post

Replies

Boosts

Views

Activity

Crash in NSDictionaryController -addObject:
Consider the following code fragments: @property (readonly) NSDictionaryController *loggedConfigsController; _loggedConfigs = NSMutableDictionary.dictionary; _loggedConfigsController = [NSDictionaryController.alloc initWithContent:self.loggedConfigs]; _loggedConfigsController.sortDescriptors = @[[NSSortDescriptor sortDescriptorWithKey:@"value" ascending:YES]]; _loggedConfigsController.preservesSelection = YES; _loggedConfigsController.avoidsEmptySelection = YES; _loggedConfigsController.selectsInsertedObjects = NO; _loggedConfigsController.automaticallyRearrangesObjects = YES; - (void)logEventWithTitle:(NSString *)title ident:(p_ident_t)ident { // called from main queue and dispatch queues NSString *identString = [self identStringForIdent:ident]; NSNumber *dictIdent = self.loggedConfigs[identString]; if (dictIdent == nil) { NSDictionaryControllerKeyValuePair *c = self.loggedConfigsController.newObject; c.key = identString; c.value = title; [self.loggedConfigsController addObject:c];// crash } } Crash log: Thread 4 Crashed:: Dispatch queue: Pinger #9 0 libobjc.A.dylib 0x7ff81bb7fcc3 objc_retain + 35 1 AppKit 0x7ff81f18d831 -[NSArrayController _setObjects:] + 49 2 AppKit 0x7ff81f18e502 -[NSArrayController _arrangeObjectsWithSelectedObjects:avoidsEmptySelection:operationsMask:useBasis:] + 365 Does anyone know why -addObject: fails? Any help is appreciated. Thanks in advance!
1
0
708
Mar ’23
Xcode 15.1 doesn't create Objective-C Category files anymore
Create a new Project: macOS / App / Language: Objective-C Create a new Cocoa Class. Name it “Foo” Create a new Objective-C File. Name it “Bar”. Set File Type to “Category”. Set class to “Foo”. Click Next, then Create. Nothing happens. FB13465308 Yes, I'm one of those old fashioned people who still use Objective-C...
Replies
10
Boosts
8
Views
3.8k
Activity
Mar ’24
macos 15.4 beta 3: NSStatusNone et. al. not rendered
In the new beta, NSStatusNone et. al. are either missing or not rendered. Example screenshot is from Xcode, but other apps are also affected. Filed as FB16822441
Topic: UI Frameworks SubTopic: AppKit
Replies
3
Boosts
0
Views
235
Activity
Mar ’25
Crash in NSDictionaryController -addObject:
Consider the following code fragments: @property (readonly) NSDictionaryController *loggedConfigsController; _loggedConfigs = NSMutableDictionary.dictionary; _loggedConfigsController = [NSDictionaryController.alloc initWithContent:self.loggedConfigs]; _loggedConfigsController.sortDescriptors = @[[NSSortDescriptor sortDescriptorWithKey:@"value" ascending:YES]]; _loggedConfigsController.preservesSelection = YES; _loggedConfigsController.avoidsEmptySelection = YES; _loggedConfigsController.selectsInsertedObjects = NO; _loggedConfigsController.automaticallyRearrangesObjects = YES; - (void)logEventWithTitle:(NSString *)title ident:(p_ident_t)ident { // called from main queue and dispatch queues NSString *identString = [self identStringForIdent:ident]; NSNumber *dictIdent = self.loggedConfigs[identString]; if (dictIdent == nil) { NSDictionaryControllerKeyValuePair *c = self.loggedConfigsController.newObject; c.key = identString; c.value = title; [self.loggedConfigsController addObject:c];// crash } } Crash log: Thread 4 Crashed:: Dispatch queue: Pinger #9 0 libobjc.A.dylib 0x7ff81bb7fcc3 objc_retain + 35 1 AppKit 0x7ff81f18d831 -[NSArrayController _setObjects:] + 49 2 AppKit 0x7ff81f18e502 -[NSArrayController _arrangeObjectsWithSelectedObjects:avoidsEmptySelection:operationsMask:useBasis:] + 365 Does anyone know why -addObject: fails? Any help is appreciated. Thanks in advance!
Replies
1
Boosts
0
Views
708
Activity
Mar ’23
Streaming live video capture from one iPhone to another
What's the best way of capturing live video from the iPhone camera and streaming it over the network to another iPhone for display? Ideally using Apple APIs only, on iOS 12 or later.
Replies
0
Boosts
0
Views
593
Activity
Apr ’23