4
votes

I have an app here that could be boiled down to uiscrollviews with images that you can flick through. I'm experiencing something really strange here though.

When flicking through each image (have roughly 60 of them in total), at some point the app just quits. I'm running it in XCode 4 (GM seed 2), and I'm getting no debug info, and no messages in the console at all. Turned on NSZombieEnabled, but that didn't change anything.

I'm not even getting a crash log on the device. I've run it through instruments, and it doesn't report any leaks, and my memory usage goes between 700 and 1100KB when run on the device.

I even checked each of my "pages" (the ones you flick through) and added messages at init and dealloc, and I can confirm that they're all getting deallocated properly (only keep the current and the pages on each side loaded).

Now, this seem to mostly happen at the same point in the app when I just start at the beginning and flick through each page going right, plus or minus a few pages, all pointing toward a memory issue, I do get a memory warning from the device, but there is absolutely nothing pointing to me using a lot of memory at all, nor that there are any leaks.

I got this from the console on the device when the app quits:

Mar 8 14:13:37 unknown configd[26] : jetsam: kernel memory event (92), free: 451, active: 2894, inactive: 2267, purgeable: 0, wired: 16709

Mar 8 14:13:37 unknown configd[26] : jetsam: kernel termination snapshot being created

Mar 8 14:13:37 unknown com.apple.launchd[1] : (com.apple.AOSNotification) Exited: Killed: 9

Mar 8 14:13:37 unknown com.apple.launchd[1] : (UIKitApplication:com.apple.mobilemail[0xc2ee]) Exited: Killed: 9

Mar 8 14:13:37 unknown com.apple.launchd[1] : (UIKitApplication:no.NRC.NRCMag[0x3c6c]) Exited: Killed: 9

Mar 8 14:13:37 unknown com.apple.launchd[1] : (com.apple.dataaccess.dataaccessd) Exited: Killed: 9

Mar 8 14:13:37 unknown SpringBoard[30] : Received memory warning. Level=1

Mar 8 14:13:37 unknown SpringBoard[30] : Application 'Perspective' exited abnormally with signal 9: Killed: 9

Mar 8 14:13:38 unknown SpringBoard[30] : Application 'Mail' exited abnormally with signal 9: Killed: 9

Mar 8 14:13:38 unknown SpringBoard[30] : Memory level is not normal (60%). Delaying auto-relaunch of 'Mail' for 30 seconds.

Mar 8 14:13:38 unknown SpringBoard[30] : Received memory warning. Level=2

Mar 8 14:13:38 unknown kernel[0] : launchd[1253] Builtin profile: dataaccessd (sandbox)

Mar 8 14:13:39 unknown AOSN[1252] : AOSNotification Daemon Starting...

Mar 8 14:13:39 unknown AOSN[1252] : Device Information. Name: Calypso, BuildVersion: 8F190, Product Type: iPad1,1, Unique Device ID: f02b304ed9a62109de1f3efd3e1e23158a76b2d4

Mar 8 14:13:40 unknown ReportCrash[1254] : Saved crashreport to /Library/Logs/CrashReporter/LowMemory-2011-03-08-141339.plist using uid: 0 gid: 0, synthetic_euid: 0 egid: 0

Mar 8 14:13:40 unknown SpringBoard[30] : Received memory warning. Level=1

Mar 8 14:13:40 unknown dataaccessd[1253] : DA|Registered for wake notification

Mar 8 14:13:40 unknown AOSN[1252] : Push: Loading...

Mar 8 14:13:41 unknown profiled[1257] : profiled|Service starting...

Mar 8 14:13:41 unknown dataaccessd[1253] : EAS|EAS Protocol Manager set to ASProtocolUnknown

Mar 8 14:13:41 unknown dataaccessd[1253] : CalDAV|A refresh fired, but we're still waiting on a gatekeeper lock

Mar 8 14:13:42 unknown dataaccessd[1253] : EAS|EAS Protocol Manager set to ASProtocol12_1

Now this mentions a crash report, but how do I get a hold of this when it doesn't show up in the Organizer in XCode? And why am I getting memory warnings when Instruments (and a thorough look at my code) says that I'm not using much memory, nor leaking?

Help!

EDIT: Got 3.2.6 up and running here and the console now gives me this:

Program received signal: “0”.

Data Formatters temporarily unavailable, will re-try after a 'continue'. (Unknown error loading shared library "/Developer/usr/lib/libXcodeDebuggerSupport.dylib")

1
the only place where you can legally ask XCode4 question is devforums.apple.com/community/xcode4Matthias Bauch
This isn't really a XCode4 question. :)Christian A. Strømmen
i am getting a same problem in my app when i have more dataganesh manoj

1 Answers

-1
votes

Okay, so I figured it out here, and it's a bit silly.

I use UIImage's imageNamed method to load each image/page, and apparently this was causing the memory warnings.

There's a couple of things that bother me a bit about this.

  1. The caching is obviously a good thing, but apparently in 4.3 GM it doesn't seem to actually empty its cache when a memory warning occurs.
  2. The memory usage building up isn't being reported as being used by my app.