Discussion:
Diagnosing memory problems
Casey McDermott
2018-11-27 22:56:08 UTC
Permalink
Our main window has a tool bar across the top, an outline view on the left, and a tab view on the right.  Choosing an item from the outline view fills a data entry screen into a new tab on the right.

We started out using OS 10.11, but just switched to newer OS versions.  10.12 has a couple display quirks but runs OK.  In 10.13 and newer, switching tabs often crashes.  It gives a warning about releasing a data entry field that is already released.

In C++, we would diagnose this with a breakpoint in the destructor and then check the stack trace.  But with ARC, a breakpoint at dealloc just shows performDelayedCleanup and then main. No clues to what's wrong.

Is there lore or are there tools for tracking object lifetimes in Obj-C/ARC?

Anything that changed in 10.13 that might be biting us?

Thanks,

Casey McDermott
TurtleSoft.com
_______________________________________________

Cocoa-dev mailing list (Cocoa-***@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/gegs%40ml-in.narkive.ne
Rob Petrovec
2018-11-27 23:52:31 UTC
Permalink
Check out the Leaks tool in Instruments (inside Xcode.app)

—Rob
Our main window has a tool bar across the top, an outline view on the left, and a tab view on the right. Choosing an item from the outline view fills a data entry screen into a new tab on the right.
We started out using OS 10.11, but just switched to newer OS versions. 10.12 has a couple display quirks but runs OK. In 10.13 and newer, switching tabs often crashes. It gives a warning about releasing a data entry field that is already released.
In C++, we would diagnose this with a breakpoint in the destructor and then check the stack trace. But with ARC, a breakpoint at dealloc just shows performDelayedCleanup and then main. No clues to what's wrong.
Is there lore or are there tools for tracking object lifetimes in Obj-C/ARC?
Anything that changed in 10.13 that might be biting us?
Thanks,
Casey McDermott
TurtleSoft.com
_______________________________________________
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
https://lists.apple.com/mailman/options/cocoa-dev/petrock%40mac.com
_______________________________________________

Cocoa-dev mailing list (Cocoa-***@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/gegs%40ml-in.nar
Rob Petrovec
2018-11-27 23:53:26 UTC
Permalink
Actually, you want the Zombies tool. That finds overreleased objects like ones that cause the spew you are seeing.

—Rob
Post by Rob Petrovec
Check out the Leaks tool in Instruments (inside Xcode.app)
—Rob
Our main window has a tool bar across the top, an outline view on the left, and a tab view on the right. Choosing an item from the outline view fills a data entry screen into a new tab on the right.
We started out using OS 10.11, but just switched to newer OS versions. 10.12 has a couple display quirks but runs OK. In 10.13 and newer, switching tabs often crashes. It gives a warning about releasing a data entry field that is already released.
In C++, we would diagnose this with a breakpoint in the destructor and then check the stack trace. But with ARC, a breakpoint at dealloc just shows performDelayedCleanup and then main. No clues to what's wrong.
Is there lore or are there tools for tracking object lifetimes in Obj-C/ARC?
Anything that changed in 10.13 that might be biting us?
Thanks,
Casey McDermott
TurtleSoft.com
_______________________________________________
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
https://lists.apple.com/mailman/options/cocoa-dev/petrock%40mac.com
_______________________________________________
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
https://lists.apple.com/mailman/options/cocoa-dev/petrock%40mac.com
_______________________________________________

Cocoa-dev mailing list (Cocoa-***@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/gegs%40ml-in.narkive.net

This email sent to ***@ml-in.nark
Sean McBride
2018-11-28 00:34:47 UTC
Permalink
Post by Rob Petrovec
Actually, you want the Zombies tool. That finds overreleased objects
like ones that cause the spew you are seeing.
See also:

1) man guardmalloc

2) <https://clang.llvm.org/docs/AddressSanitizer.html>

3) NSZombieEnabled

4) CFZombieLevel

Cheers,

Sean


_______________________________________________

Cocoa-dev mailing list (Cocoa-***@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/gegs%40ml-in.narkive.net

This email sent to ***@ml-in.narkive.net

Loading...