Posts

Post not yet marked as solved
0 Replies
72 Views
Hi all, I have an application which is getting a segmentation fault when releasing an autorelease pool, but weirdly, it seems to be happening only on earlier OS versions. I and another person have tested it on Monterey and it works, but a tester has High Sierra and it's crashing. I have tested it on my system for zombies, with address sanitizer turned on, everything I can think of, and no issues. This is part of the the stack trace: Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x000070ff5dfdbec0 Exception Note: EXC_CORPSE_NOTIFY Application Specific Information: objc_msgSend() selector name: release 0 Crashed:: Dispatch queue: com.apple.main-thread libobjc.A.dylib 0x00007fff5ef99e9d objc_msgSend + 29 1 com.apple.Foundation 0x00007fff3a2f0c01 NSKVODeallocate +192 2 libobjc.A.dylib 0x00007fff5ef9d042 (anonymous namespace)::AutoreleasePoolPage::pop(void*) + 812 3 com.apple.AppKit 0x00007fff35f25f24 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 4028 4 com.apple.AppKit 0x00007fff35784d6d -[NSApplication run] + 764 5 com.apple.AppKit 0x00007fff35753f1a NSApplicationMain + 804 6 libdyld.dylib 0x00007fff5fb94115 start + 1 I am at a bit of a loss as to how to debug this, since nothing is turning up on my system, and it seems to be occurring only on an older version of the OS where I can't debug it. Any clues or ideas for how to track it down would be most welcome.
Posted
by mcgddd.
Last updated
.
Post not yet marked as solved
0 Replies
64 Views
I have a window controller that stores a lot of objects, and when its window is closed it is not being deallocated. This was actually working ok before the project was converted to ARC, and now is not. The window controller is allocated and stored in a local variable: SettingsAdjustments *settingsCtrl=[SettingsAdjustments alloc]; Later its window is opened: [settingsCtrl showWindow:nil]; [[settingsCtrl window] makeKeyAndOrderFront:nil]; In the pre-ARC code it was released at the end of the function. Now I assume the local reference should be released when it goes out of scope. So far as I know there are no other permanent references to it. I tried instrumenting the application with Allocations, and the only thing that shows in the allocation history for the object is the allocation. There is no sign of it being released when the variable goes out of scope, or a reference being retained when the window is opened. Maybe I'm not using the Allocations tool correctly. I understood it was meant to show this. Anyone have any ideas as to what might be holding onto the reference, or how to dig further?
Posted
by mcgddd.
Last updated
.
Post not yet marked as solved
2 Replies
69 Views
Hi all, I am trying to enable ARC on a project that was started by someone else a long time ago. When I selected Edit->Convert to Objective-C ARC I got a large number of errors which I eventually fixed. But now when I run the converter, I get the message that Xcode found 1 issue that prevents conversion from succeeding, but there are no errors displayed. I have a few warnings, but these are related to XIB files and digital signatures, rather than anything ARC-related. If the issue is one of the warnings, I don't know which one. There is no warning that stands out as different from the others. So I am at a loss as to how to find out what this issue actually is, and how to fix it. Any ideas much appreciated.
Posted
by mcgddd.
Last updated
.