0

My application crashed when I analyze memory leaks in instruments.

Does instruments have a stack trace? (I want to see why my app crashed.)

Mat
  • 202,337
  • 40
  • 393
  • 406
Voloda2
  • 12,359
  • 18
  • 80
  • 130
  • Does your app only crash when using instruments? – Mick MacCallum Mar 04 '12 at 09:37
  • @MDT, no. May be I need to fix some bugs and then use instruments. – Voloda2 Mar 04 '12 at 09:47
  • FWIW, there is a build option to have the app capture the stack trace for every allocation (which is extremely useful when you identify a leak or strong reference cycle that needs to be resolved, as you can see precisely where and how in the app the object was originally allocated, greatly simplifying the diagnostic process). See https://stackoverflow.com/a/30993476/1271826. But re crash, yes, you should solve that separately. – Rob Apr 22 '19 at 16:21

1 Answers1

2

Instruments shows stack traces in the extended detail view, which you can open by choosing View > Extended Detail. But the Leaks instrument shows stack traces of memory leaks. It doesn't show the stack trace if your app crashes.

If you want to find the source of your crash, setting up NSZombie can help. The following questions shows how to set up NSZombie in Xcode 4:

How do I setup NSZombieEnabled in Xcode 4?

Community
  • 1
  • 1
Swift Dev Journal
  • 19,282
  • 4
  • 56
  • 66