How to avoid exception EXC_RESOURCE - WAKEUPS? - ios

In my iPad app I often get a crash report with the exception EXC_RESOURCE and the subtype WAKEUPS.
However the strange thing is that the message says (Limit 150/sec) Observed 0/sec over 300 sec
How can it become an exception when it observed 0 wakeups/sec? - and how do I avoid it?
The reason I care is that the generation of the report delays some time critical threads in the app.
Mainly are we recording from the microphone and playing audio at the same time, and while the report is generated, the audio stutters.
The exception is always triggered by one of 3 threads: Main thread, AURemoteIO: IOThread and com.apple.coreaudio.AQClient. See fragments of report below:
Hardware Model: iPad2,5
Code Type: ARM (Native)
Parent Process: debugserver [3109]
Date/Time: 2016-05-18 12:15:59.59 +0200
Launch Time: 2016-05-18 12:11:44.44 +0200
OS Version: iOS 9.1 (13B143)
Report Version: 104
Exception Type: EXC_RESOURCE
Exception Subtype: WAKEUPS
Exception Message: (Limit 150/sec) Observed 0/sec over 300 secs
Exception Note: NON-FATAL CONDITION (this is NOT a crash)
Triggered by Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Attributed:
0 CoreFoundation 0x25ef8c4e 0x25ef6000 + 11342
1 CoreFoundation 0x25fab760 0x25ef6000 + 743264
...
Thread 10 name: AURemoteIO::IOThread
Thread 10:
0 libsystem_kernel.dylib 0x382acff0 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x382acdf4 mach_msg + 40
2 AudioToolbox 0x2544ec50 AURemoteIO::IOThread::Run() + 104
3 AudioToolbox 0x25452500 AURemoteIO::IOThread::Entry(void*) + 8
4 AudioToolbox 0x25369fee CAPThread::Entry(CAPThread*) + 186
5 libsystem_pthread.dylib 0x3836385a _pthread_body + 138
6 libsystem_pthread.dylib 0x383637ce _pthread_start + 110
7 libsystem_pthread.dylib 0x38361724 thread_start + 8
...
Thread 12 name: com.apple.coreaudio.AQClient
Thread 12:
0 libsystem_kernel.dylib 0x382acff0 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x382acdf4 mach_msg + 40
2 CoreFoundation 0x25fad8c4 __CFRunLoopServiceMachPort + 136
3 CoreFoundation 0x25fabc4c __CFRunLoopRun + 1036
4 CoreFoundation 0x25eff118 CFRunLoopRunSpecific + 520
5 CoreFoundation 0x25efef04 CFRunLoopRunInMode + 108
6 AudioToolbox 0x253810b4 GenericRunLoopThread::Entry(void*) + 132
7 AudioToolbox 0x25369fee CAPThread::Entry(CAPThread*) + 186
8 libsystem_pthread.dylib 0x3836385a _pthread_body + 138
9 libsystem_pthread.dylib 0x383637ce _pthread_start + 110
10 libsystem_pthread.dylib 0x38361724 thread_start + 8

The main confusion was the Observed 0/sec statement, but I found that this number was wrong. When running the same code on a newer and faster iPad it suddenly showed a number here (200-400), so it was simply due to a slow iPad that it could not calculate a number.
Secondly I found that there was indeed a thread that was starting and stopping way too often, but it was not the one that triggered the error, so that made it a lot more difficult to locate.

Related

SIGSEGV crash in iOS (Objective-C) at -[VPXDecoder decode:rawOutFrame:inFrameSize:frameInfo:]

Incident Identifier: 64E7437E-C37F-425C-8582-18A14C43F95A
CrashReporter Key: b90a1226375d6bce87d7c4fc6288d7951058aec4
Hardware Model: iPad2,1
Process: LolMess [428]
Path: /private/var/mobile/Containers/Bundle/Application/B1A322EE-F140-49CB-B1D2-84601F0BE962/LolMess.app/LolMess
Identifier: com.mobulous.LolMess
Version: 1 (1.0)
Code Type: ARM (Native)
Parent Process: launchd [1]
Date/Time: 2016-03-14 17:55:49.49 +0530
Launch Time: 2016-03-14 17:42:36.36 +0530
OS Version: iOS 9.2.1 (13D15)
Report Version: 104
**Exception Type: EXC_BAD_ACCESS (SIGSEGV)**
Exception Subtype: KERN_INVALID_ADDRESS at 0x0002c9f0
Triggered by Thread: 24
Filtered syslog:
None found
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0:
0 libsystem_kernel.dylib 0x245c0c24 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x245c0a28 mach_msg + 40
2 CoreFoundation 0x24903354 __CFRunLoopServiceMachPort + 136
3 CoreFoundation 0x249016dc __CFRunLoopRun + 1036
4 CoreFoundation 0x24854bf8 CFRunLoopRunSpecific + 520
5 CoreFoundation 0x248549e4 CFRunLoopRunInMode + 108
6 GraphicsServices 0x25aa0ac8 GSEventRunModal + 160
7 UIKit 0x28ae4ba0 UIApplicationMain + 144
8 LolMess 0x002171d0 main (main.m:15)
9 libdyld.dylib 0x24503872 start + 2
Thread 1 name: Dispatch queue: com.apple.libdispatch-manager
Thread 1:
0 libsystem_kernel.dylib 0x245d6320 kevent_qos + 24
1 libdispatch.dylib 0x244ce098 _dispatch_mgr_invoke + 256
2 libdispatch.dylib 0x244cddf6 _dispatch_mgr_thread$VARIANT$mp + 38
Thread 22:
0 libsystem_kernel.dylib 0x245c0c74 semaphore_wait_trap + 8
1 LolMess 0x0078ea9e thread_encoding_proc + 510
2 libsystem_pthread.dylib 0x2467985a _pthread_body + 138
3 libsystem_pthread.dylib 0x246797ce _pthread_start + 110
4 libsystem_pthread.dylib 0x24677724 thread_start + 8
Thread 23:
0 libsystem_kernel.dylib 0x245c0c74 semaphore_wait_trap + 8
1 LolMess 0x0078efda thread_loopfilter + 54
2 libsystem_pthread.dylib 0x2467985a _pthread_body + 138
3 libsystem_pthread.dylib 0x246797ce _pthread_start + 110
4 libsystem_pthread.dylib 0x24677724 thread_start + 8
Thread 24 Crashed:
0 LolMess 0x00781380 vp8_copy_mem16x16_neon + 16
1 LolMess 0x0077f828 vp8_build_inter16x16_predictors_mb + 188
2 LolMess 0x0077fa76 vp8_build_inter_predictors_mb + 414
3 LolMess 0x007a9f00 vp8_decode_frame + 11088
4 LolMess 0x007ab088 vp8dx_receive_compressed_data + 276
5 LolMess 0x007a537e vp8_decode + 1114
6 LolMess 0x007776ae vpx_codec_decode + 62
7 LolMess 0x007363ca -[VPXDecoder decode:rawOutFrame:inFrameSize:frameInfo:] (VPXDecoder.m:105)
8 LolMess 0x006f93ea -[RTPVideoHandler getDecodedVideoFrame:frameInfo:forStream:withOptions:] (RTPVideoHandler.m:1145)
9 LolMess 0x006f95ba -[RTPVideoHandler getDecodedVideoFrame:] (RTPVideoHandler.m:1184)
10 LolMess 0x00603b20 -[SCVideoCallController run:] (SCVideoCallController.m:896)
11 Foundation 0x25159164 __NSThread__start__ + 1148
12 libsystem_pthread.dylib 0x2467985a _pthread_body + 138
13 libsystem_pthread.dylib 0x246797ce _pthread_start + 110
14 libsystem_pthread.dylib 0x24677724 thread_start + 8
Error Formulating Crash Report:
Failed while requesting activity/breadcrumb diagnostics
Using C2callSdk in app
Looks like you are trying to access a object already released from memory.
Check it by Enabling NSZombie objects, that will make compiler to stop at the line which causing crash.

A very interesting crash log with Exception Type:"EXC_CRASH (SIGSEGV)"

  Firstly, the desymbolicated crash log is at the bottom. I cannot post all the content out of privacy reason. However the first 3 threads log is enough I thought, if you really want that please leave a message.
  And here is the thing, depending on this article Understanding iOS Exception Types | 5Neo.Be5Neo.Be, the mach exception type -- EXC_CRASH -- is not usual following with the C signal SIGSEGV (which means access an address you don't own).
  So I want to know what reason or when will EXC_CRASH (SIGSEGV) appear?
  Second question is if this crash is actually trigger by Thread 0 as the log said. And if it's ture, then what does
"__NSThreadPerformPerform"
and
"__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__"
means?
  What action is system doing? By the way, __NSThreadPerformPerform will appear when App call "performSelector:" method according to this answer -- iphone - SIGABRT crash on CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION - Stack Overflow.
Thanks.
-- Crash log is here: --
{"name":"XXXApp","bug_type":"109","os_version":"iPhone OS 7.1.1 (11D201)","bundleID":"com.xxx","version":"6.7.1.0 (6.7.1)","app_name":"XXXApp"}
Incident Identifier: EC2DC883-C0DB-4FD6-81FB-237626598366
CrashReporter Key: d5c091bc35732df06fcaf41e5786833159b04ea5
Hardware Model: iPhone5,2
Process: XXXApp [1912]
Path: /var/mobile/Applications/4E3E131C-5847-4B61-A0E0-D350830C1693/BaiduBoxApp.app/XXXApp
Identifier: com.xxx
Version: 6.7.1.0 (6.7.1)
Code Type: ARM (Native)
Parent Process: launchd [1]
Date/Time: 2015-08-28 00:37:32.658 +0800
OS Version: iOS 7.1.1 (11D201)
Report Version: 104
Exception Type: EXC_CRASH (SIGSEGV)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Triggered by Thread: 0
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x39c636d8 __kill + 8
1 Foundation 0x2f901c1e __NSThreadPerformPerform + 382
2 CoreFoundation 0x2eee3fec __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 12
3 CoreFoundation 0x2eee34b2 __CFRunLoopDoSources0 + 202
4 CoreFoundation 0x2eee1ca2 __CFRunLoopRun + 626
5 CoreFoundation 0x2ee4c764 CFRunLoopRunSpecific + 520
6 CoreFoundation 0x2ee4c546 CFRunLoopRunInMode + 102
7 GraphicsServices 0x33db96ce GSEventRunModal + 134
8 UIKit 0x317ab88c UIApplicationMain + 1132
9 BaiduBoxApp 0x0006d13e main (main.m:17)
10 libdyld.dylib 0x39badab4 start + 0
Thread 1:
0 libsystem_kernel.dylib 0x39c51804 kevent64 + 24
1 libdispatch.dylib 0x39ba0050 _dispatch_mgr_invoke + 228
2 libdispatch.dylib 0x39b9a2de _dispatch_mgr_thread + 34
Thread 2 name: com.apple.NSURLConnectionLoader
Thread 2:
0 libsystem_kernel.dylib 0x39c51a50 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x39c51848 mach_msg + 36
2 CoreFoundation 0x2eee3624 __CFRunLoopServiceMachPort + 152
3 CoreFoundation 0x2eee1d44 __CFRunLoopRun + 788
4 CoreFoundation 0x2ee4c764 CFRunLoopRunSpecific + 520
5 CoreFoundation 0x2ee4c546 CFRunLoopRunInMode + 102
6 Foundation 0x2f88c23c +[NSURLConnection(Loader) _resourceLoadLoop:] + 316
7 Foundation 0x2f901a0a __NSThread__main__ + 1058
8 libsystem_pthread.dylib 0x39ccb956 _pthread_body + 138
9 libsystem_pthread.dylib 0x39ccb8c6 _pthread_start + 98
10 libsystem_pthread.dylib 0x39cc9ae4 thread_start + 4
Thread 3 name: com.apple.CFSocket.private
Thread 3:
0 libsystem_kernel.dylib 0x39c64434 __select + 20
1 CoreFoundation 0x2eee751e __CFSocketManager + 482
2 libsystem_pthread.dylib 0x39ccb956 _pthread_body + 138
3 libsystem_pthread.dylib 0x39ccb8c6 _pthread_start + 98
4 libsystem_pthread.dylib 0x39cc9ae4 thread_start + 4
...

App Scanner crashing on uploading the app file

I am facing issue with the private apis used in my application.So,I found that App Scanner application is a good tool for scanning those kind of issues.So i have installed it from here .When trying to test my application it crashes giving me following crash report.
Process: App Scanner [1951]
Path: /Users/USER/Downloads/*/App Scanner.app/Contents/MacOS/App Scanner
Identifier: com.chimpstudios.appscanner
Version: 1.4 (1.4.1)
Code Type: X86-64 (Native)
Parent Process: launchd [137]
Date/Time: 2013-06-18 12:28:57.620 +0530
OS Version: Mac OS X 10.7.5 (11G63)
Report Version: 9
Interval Since Last Report: 571103 sec
Crashes Since Last Report: 13
Per-App Interval Since Last Report: 938 sec
Per-App Crashes Since Last Report: 7
Anonymous UUID: EC833868-1E25-4F4F-BC83-52C9B937E8A7
Crashed Thread: 8
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Application Specific Information:
objc[1951]: garbage collection is OFF
*** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[NSConcreteData subdataWithRange:]: range {1651465984, 1633641322} exceeds data length 4295932'
*** First throw call stack:
(
0 CoreFoundation 0x00007fff92809f56 __exceptionPreprocess + 198
1 libobjc.A.dylib 0x00007fff96085d5e objc_exception_throw + 43
2 CoreFoundation 0x00007fff92809d8a +[NSException raise:format:arguments:] + 106
3 CoreFoundation 0x00007fff92809d14 +[NSException raise:format:] + 116
4 Foundation 0x00007fff946b9a4b -[NSData(NSData) subdataWithRange:] + 291
5 App Scanner 0x000000010000376c App Scanner + 14188
6 Foundation 0x00007fff9470a72a -[NSThread main] + 68
7 Foundation 0x00007fff9470a6a2 __NSThread__main__ + 1575
8 libsystem_c.dylib 0x00007fff984308bf _pthread_start + 335
9 libsystem_c.dylib 0x00007fff98433b75 thread_start + 13
)
terminate called throwing an exception
abort() called
Thread 0:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x00007fff9854667a mach_msg_trap + 10
1 libsystem_kernel.dylib 0x00007fff98545d71 mach_msg + 73
2 com.apple.CoreFoundation 0x00007fff9279650c __CFRunLoopServiceMachPort + 188
3 com.apple.CoreFoundation 0x00007fff9279ec74 __CFRunLoopRun + 1204
4 com.apple.CoreFoundation 0x00007fff9279e486 CFRunLoopRunSpecific + 230
5 com.apple.HIToolbox 0x00007fff965892bf RunCurrentEventLoopInMode + 277
6 com.apple.HIToolbox 0x00007fff9659056d ReceiveNextEventCommon + 355
7 com.apple.HIToolbox 0x00007fff965903fa BlockUntilNextEventMatchingListInMode + 62
8 com.apple.AppKit 0x00007fff992a1779 _DPSNextEvent + 659
9 com.apple.AppKit 0x00007fff992a107d -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 135
10 com.apple.AppKit 0x00007fff9929d9b9 -[NSApplication run] + 470
11 com.apple.AppKit 0x00007fff99519eac NSApplicationMain + 867
12 com.chimpstudios.appscanner 0x0000000100001074 0x100000000 + 4212
Thread 1:: Dispatch queue: com.apple.libdispatch-manager
0 libsystem_kernel.dylib 0x00007fff985487e6 kevent + 10
1 libdispatch.dylib 0x00007fff92724786 _dispatch_mgr_invoke + 923
2 libdispatch.dylib 0x00007fff92723316 _dispatch_mgr_thread + 54
Thread 2:: WebCore: LocalStorage
0 libsystem_kernel.dylib 0x00007fff98547bca __psynch_cvwait + 10
1 libsystem_c.dylib 0x00007fff98434274 _pthread_cond_wait + 840
2 com.apple.JavaScriptCore 0x00007fff93546a60 WTF::ThreadCondition::timedWait(WTF::Mutex&, double) + 64
3 com.apple.WebCore 0x00007fff8efcdf9a WTF::MessageQueue<WebCore::LocalStorageTask>::waitForMessage() + 132
4 com.apple.WebCore 0x00007fff8efcdef3 WebCore::LocalStorageThread::threadEntryPoint() + 99
5 com.apple.WebCore 0x00007fff8efcde3b WebCore::LocalStorageThread::threadEntryPointCallback(void*) + 9
6 libsystem_c.dylib 0x00007fff984308bf _pthread_start + 335
7 libsystem_c.dylib 0x00007fff98433b75 thread_start + 13
Can anybody let me know what's the issue as it is not crashing in any of the device nor in the simulator?

Is there any helpful information in this crash report?

I am trying to identify the cause of a crash (iOS app), but the symbolicated crash report only points to my main method.
8 WxT 0x00002730 main (main.m:14)
9 WxT 0x000026e8 start + 32
Is there anything here that could help me track down the issue, or is this as useless as it appears to me? What does the "start + 32" tell me?
N.B. my app is WxT, and it only referenced a few times in the report. I've highlighted each occurence with a double asterisk (**).
Incident Identifier: 3A6D2AD3-0E9C-41B6-9EA6-4F05EF72B4E0
CrashReporter Key: 2b1b03e6298d7d5bebcb681de363022e7b319df1
Hardware Model: iPad3,2
**Process: WxT [3214]**
**Path: /var/mobile/Applications/613A46E1-5CDC-4A1F-85C5-8D29ACDA289C/WxT.app/WxT**
**Identifier: WxT**
Version: ??? (???)
Code Type: ARM (Native)
Parent Process: launchd [1]
Date/Time: 2012-05-23 15:21:02.300 -0500
OS Version: iPhone OS 5.1.1 (9B206)
Report Version: 104
Exception Type: 00000020
Exception Codes: 0x8badf00d
Highlighted Thread: 3
Application Specific Information:
**WxT[3214] has active assertions beyond permitted time:**
{(
**<SBProcessAssertion: 0x14005c20> identifier: Suspending process: WxT[3214] permittedBackgroundDuration: 10.000000 reason: suspend owner pid:23 preventSuspend preventThrottleDownCPU preventThrottleDownUI**
)}
Elapsed total CPU time (seconds): -4288.787 (user -4288.787, system 0.000), 100% CPU
Elapsed application CPU time (seconds): 0.061, 0% CPU
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0:
0 libsystem_kernel.dylib 0x35f83004 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x35f831fa mach_msg + 50
2 CoreFoundation 0x30b843ec __CFRunLoopServiceMachPort + 120
3 CoreFoundation 0x30b830ea __CFRunLoopRun + 818
4 CoreFoundation 0x30b0649e CFRunLoopRunSpecific + 294
5 CoreFoundation 0x30b06366 CFRunLoopRunInMode + 98
6 GraphicsServices 0x36eca432 GSEventRunModal + 130
7 UIKit 0x327e6cce UIApplicationMain + 1074
**8 WxT 0x00002730 main (main.m:14)**
**9 WxT 0x000026e8 start + 32**
Thread 1 name: Dispatch queue: com.apple.libdispatch-manager
Thread 1:
0 libsystem_kernel.dylib 0x35f833a8 kevent + 24
1 libdispatch.dylib 0x355f5f04 _dispatch_mgr_invoke + 708
2 libdispatch.dylib 0x355f5c22 _dispatch_mgr_thread + 30
Thread 2 name: WebThread
Thread 2:
0 libsystem_kernel.dylib 0x35f83004 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x35f831fa mach_msg + 50
2 CoreFoundation 0x30b843ec __CFRunLoopServiceMachPort + 120
3 CoreFoundation 0x30b83124 __CFRunLoopRun + 876
4 CoreFoundation 0x30b0649e CFRunLoopRunSpecific + 294
5 CoreFoundation 0x30b06366 CFRunLoopRunInMode + 98
6 WebCore 0x36523c9c _ZL12RunWebThreadPv + 396
7 libsystem_c.dylib 0x33bf472e _pthread_start + 314
8 libsystem_c.dylib 0x33bf45e8 thread_start + 0
Thread 3 name: com.apple.NSURLConnectionLoader
Thread 3:
0 libsystem_kernel.dylib 0x35f83004 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x35f831fa mach_msg + 50
2 CoreFoundation 0x30b843ec __CFRunLoopServiceMachPort + 120
3 CoreFoundation 0x30b83124 __CFRunLoopRun + 876
4 CoreFoundation 0x30b0649e CFRunLoopRunSpecific + 294
5 CoreFoundation 0x30b06366 CFRunLoopRunInMode + 98
6 Foundation 0x35a3dbb2 +[NSURLConnection(Loader) _resourceLoadLoop:] + 302
7 Foundation 0x35a3da7a -[NSThread main] + 66
8 Foundation 0x35ad158a __NSThread__main__ + 1042
9 libsystem_c.dylib 0x33bf472e _pthread_start + 314
10 libsystem_c.dylib 0x33bf45e8 thread_start + 0
Thread 4 name: com.apple.CFSocket.private
Thread 4:
0 libsystem_kernel.dylib 0x35f93570 __select + 20
1 CoreFoundation 0x30b8863a __CFSocketManager + 726
2 libsystem_c.dylib 0x33bf472e _pthread_start + 314
3 libsystem_c.dylib 0x33bf45e8 thread_start + 0
Thread 5 name: WebCore: CFNetwork Loader
Thread 5:
0 libsystem_kernel.dylib 0x35f83004 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x35f831fa mach_msg + 50
2 CoreFoundation 0x30b843ec __CFRunLoopServiceMachPort + 120
3 CoreFoundation 0x30b83124 __CFRunLoopRun + 876
4 CoreFoundation 0x30b0649e CFRunLoopRunSpecific + 294
5 CoreFoundation 0x30b06366 CFRunLoopRunInMode + 98
6 WebCore 0x3654d0d2 _ZN7WebCoreL15runLoaderThreadEPv + 122
7 libsystem_c.dylib 0x33bf472e _pthread_start + 314
8 libsystem_c.dylib 0x33bf45e8 thread_start + 0
Unknown thread crashed with unknown flavor: 5, state_count: 1
Binary Images:
**0x1000 - 0x2afff +WxT armv7 <d34067e47ac73d7390a27c79ab5582b3> /var/mobile/Applications/613A46E1-5CDC-4A1F-85C5-8D29ACDA289C/WxT.app/WxT**
0x2fee1000 - 0x2ff02fff dyld armv7 <77eddfd654df393ba9c95ff01715fd08> /usr/lib/dyld
It looks like:
Application Specific Information:
**WxT[3214] has active assertions beyond permitted time:**
{(
**<SBProcessAssertion: 0x14005c20> identifier: Suspending process: WxT[3214] permittedBackgroundDuration: 10.000000 reason: suspend owner pid:23 preventSuspend preventThrottleDownCPU preventThrottleDownUI**
)}
the system is trying to move your app to background, and your URL connection (thread.3) is preventing that from happening.
The error message states you tried to run for more than 10 minutes while in the background. By default, iOS apps must stop all processing within 10 minutes upon being put in the background.

iOS Application Crash while downloading resource from internet

I'm trying to debug an application that download a lot of resources from internet. The issue is that sometimes while downloading the app crashes (not in the same place or for the same resource).The memory seems ok, no memory warnings, no leaks, no zombies, the dirty size stay around 10M§B +o- 2MB the resident 50MB.
The other weird things is that the error is still never happened on the simulator bu just on the device.
The crash log identifies a crash in another thread (num3) with EXC_BAD_ACCES(something gone) on an Apple lib. I can't understand if it's an application error or an API error.
Incident Identifier: 9138742F-0160-4220-8E62-000001650CF4
CrashReporter Key: 6f0ba5a6bbc182f6798918f01ccd6bac4f8e4713 Hardware
Model: iPad1,1 Process: XXX-Upgraded [949] Path:
/var/mobile/Applications/C98657F3-B7E6-4542-B0DA-70D8239E5210/XXX-Upgraded.app/XXX-Upgraded
Identifier: XXX-Upgraded Version: ??? (???) Code Type:
ARM (Native) Parent Process: launchd 1
Date/Time: 2011-11-18 11:13:25.994 +0100 OS Version: iPhone
OS 5.0.1 (9A405) Report Version: 104
Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes:
KERN_INVALID_ADDRESS at 0xf006191c Crashed Thread: 3
Thread 0 name: Dispatch queue: com.apple.main-thread Thread 0: 0
libsystem_kernel.dylib 0x360ad010 0x360ac000 + 4112 1
libsystem_kernel.dylib 0x360ad206 0x360ac000 + 4614 2
CoreFoundation 0x33ac441c 0x33a37000 + 578588 3
CoreFoundation 0x33ac311a 0x33a37000 + 573722 4
CoreFoundation 0x33a464d6 0x33a37000 + 62678 5
CoreFoundation 0x33a4639e 0x33a37000 + 62366 6
GraphicsServices 0x35686fc6 0x35683000 + 16326 7 UIKit
0x34b8b73c 0x34b5a000 + 202556 8 XXX-Upgraded
0x000028a8 main (main.m:15) 9 XXX-Upgraded
0x00002860 start + 32
Thread 1 name: Dispatch queue: com.apple.libdispatch-manager Thread
1: 0 libsystem_kernel.dylib 0x360ad3b4 0x360ac000 + 5044 1
libdispatch.dylib 0x36dd3e78 0x36dc7000 + 52856 2
libdispatch.dylib 0x36dd3b96 0x36dc7000 + 52118
Thread 2 name: WebThread Thread 2: 0 libsystem_kernel.dylib
0x360ad010 0x360ac000 + 4112 1 libsystem_kernel.dylib
0x360ad206 0x360ac000 + 4614 2 CoreFoundation
0x33ac441c 0x33a37000 + 578588 3 CoreFoundation
0x33ac3154 0x33a37000 + 573780 4 CoreFoundation
0x33a464d6 0x33a37000 + 62678 5 CoreFoundation
0x33a4639e 0x33a37000 + 62366 6 WebCore
0x33f02128 0x33e5a000 + 688424 7 libsystem_c.dylib
0x3492bc16 0x3491c000 + 64534 8 libsystem_c.dylib
0x3492bad0 0x3491c000 + 64208
Thread 3 name: com.apple.NSURLConnectionLoader Thread 3 Crashed: 0
libobjc.A.dylib 0x35206fbc 0x35203000 + 16316 1
CoreFoundation 0x33a73d16 0x33a37000 + 249110 2
CoreFoundation 0x33a395bc 0x33a37000 + 9660 3
CFNetwork 0x32e56fd8 0x32dc7000 + 589784 4
CFNetwork 0x32e57cee 0x32dc7000 + 593134 5
CFNetwork 0x32e56940 0x32dc7000 + 588096 6
CoreFoundation 0x33a8555c 0x33a37000 + 320860 7
CoreFoundation 0x33a857a4 0x33a37000 + 321444 8
CoreFoundation 0x33ac4afc 0x33a37000 + 580348 9
CoreFoundation 0x33ac42c8 0x33a37000 + 578248 10
CoreFoundation 0x33ac306e 0x33a37000 + 573550 11
CoreFoundation 0x33a464d6 0x33a37000 + 62678 12
CoreFoundation 0x33a4639e 0x33a37000 + 62366 13
Foundation 0x3152abc2 0x3151a000 + 68546 14
Foundation 0x3152aa8a 0x3151a000 + 68234 15
Foundation 0x315be59a 0x3151a000 + 673178 16
libsystem_c.dylib 0x3492bc16 0x3491c000 + 64534 17
libsystem_c.dylib 0x3492bad0 0x3491c000 + 64208
Thread 4 name: com.apple.CFSocket.private Thread 4: 0
libsystem_kernel.dylib 0x360bd570 0x360ac000 + 71024 1
CoreFoundation 0x33ac866a 0x33a37000 + 595562 2
libsystem_c.dylib 0x3492bc16 0x3491c000 + 64534 3
libsystem_c.dylib 0x3492bad0 0x3491c000 + 64208
Thread 5: 0 libsystem_kernel.dylib 0x360bdcd4 0x360ac000 +
72916 1 libsystem_c.dylib 0x3492630a 0x3491c000 + 41738
2 libsystem_c.dylib 0x3492609c 0x3491c000 + 41116
Thread 6: 0 libsystem_kernel.dylib 0x360bdcd4 0x360ac000 +
72916 1 libsystem_c.dylib 0x3492630a 0x3491c000 + 41738
2 libsystem_c.dylib 0x3492609c 0x3491c000 + 41116
Thread 7: 0 libsystem_kernel.dylib 0x360bdcd4 0x360ac000 +
72916 1 libsystem_c.dylib 0x3492630a 0x3491c000 + 41738
2 libsystem_c.dylib 0x3492609c 0x3491c000 + 41116
Thread 3 crashed with ARM Thread State:
r0: 0x006eaf90 r1: 0x328c119e r2: 0xf0061914 r3: 0x3eeb09a8
r4: 0xf0061914 r5: 0x006eaf94 r6: 0x020014c0 r7: 0x0343b2b0
r8: 0x3eecc690 r9: 0x0ca30467 r10: 0x00000014 r11: 0x00000080
ip: 0x3eea6814 sp: 0x0343b2a0 lr: 0x33a73d1d pc: 0x35206fbc cpsr: 0x20000030
[Update]
Finally I was cable to catch the error. It seems to be an overreleased chunk of data right at the end of connection:didReceiveData:. Actually to simplify debugging I've just left one line of code that appends data using output stream. I can't understand where I'm over-releasing.
Instruments shows pretty weird stuffs:
-first the zombie seems to be created inside some Apple API calling
-second, if you take a look at the image of the stack trace you can see that there is a CFRetain that doesn't increment the reference count of the object, thus unbalancing the other operations
Can someone help me out?
Thanks,
Andrea
OK, after a lot of test a (DST request never taken in charge by Apple, NOT TRUE ANYMORE), headache, hysteria etc. It's turning out to be as a kind of false positive. If I test using leaks, allocation, zombie, the usual console debugger happens. If I run the application alone just on device (without connecting it) everything seems to run fine.
The DTS helped me out to find the bug, the issue refers probably to two bugs, one located in instruments and one CF.
The most important thing is that those bugs affect the application only while using allocation logging, so the app could run safe as I discovered during my tests session.

Resources