Why application crash for "failed to resume" when using MFMailComposeViewController - objective-c

My application need supporting user feedback through eMail. We prefer to use MFMailComposeViewController rather than url schema, because we need attaching some log files in the mail.
However application may crash for "failed to resume in time", when user act as follow steps.
1. Get into message editing view;
2. "Cancel-->Save Draft";
3. When saving draft, presh home button. Application will enter background state;
4. User launch application again, application will block in launch image. After few second, application will crash.
The device log said :
Jul 2 15:38:58 unknown SpringBoard[57] <Warning>: com.XXX failed to resume in time
Jul 2 15:38:58 unknown SpringBoard[57] <Warning>: Forcing crash report of XXX[461]...
Jul 2 15:38:59 unknown SpringBoard[57] <Warning>: Finished crash reporting.
Jul 2 15:38:59 unknown com.apple.launchd[1] <Notice>: (UIKitApplication:com.XXX[0x8c58]) Exited: Killed: 9
Questions:
Why my application block during resume?
Why MFMailComposeViewController use so long time to save draft?
How can I walk around to avoiding crash?
Crash Report:
Date/Time: 2012-07-03 09:25:40.222 +0800
OS Version: iPhone OS 5.0.1 (9A405)
Report Version: 104
Exception Type: 00000020
Exception Codes: 0x8badf00d
Highlighted Thread: 0
Application Specific Information:
com.XXX failed to resume in time
Elapsed total CPU time (seconds): 1.720 (user 1.720, system 0.000), 17% CPU
Elapsed application CPU time (seconds): 0.009, 0% CPU
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0:
0 libsystem_kernel.dylib 0x35ca8010 0x35ca7000 + 4112
1 libsystem_kernel.dylib 0x35ca8206 0x35ca7000 + 4614
2 AppSupport 0x376c68c4 0x376b4000 + 75972
3 AppSupport 0x376c52f0 0x376b4000 + 70384
4 AppSupport 0x376c59a6 0x376b4000 + 72102
5 AppSupport 0x376c3cfc 0x376b4000 + 64764
6 AppSupport 0x376c3b8a 0x376b4000 + 64394
7 MessageUI 0x305dea90 0x305d5000 + 39568
8 MessageUI 0x306048b2 0x305d5000 + 194738
9 MessageUI 0x305f3914 0x305d5000 + 125204
10 MessageUI 0x305f2fa0 0x305d5000 + 122784
11 MessageUI 0x306025ce 0x305d5000 + 185806
12 UIKit 0x3727fcd4 0x37143000 + 1297620
13 CoreFoundation 0x33cf742e 0x33ce4000 + 78894
14 UIKit 0x371619e4 0x37143000 + 125412
15 UIKit 0x371619a0 0x37143000 + 125344
16 UIKit 0x3716197e 0x37143000 + 125310
17 UIKit 0x371616ee 0x37143000 + 124654
18 UIKit 0x37162026 0x37143000 + 127014
19 UIKit 0x37160508 0x37143000 + 120072
20 UIKit 0x3715fefa 0x37143000 + 118522
21 UIKit 0x371464e6 0x37143000 + 13542
22 UIKit 0x37145d26 0x37143000 + 11558
23 GraphicsServices 0x30578dec 0x30574000 + 19948
24 CoreFoundation 0x33d7154c 0x33ce4000 + 578892
25 CoreFoundation 0x33d714ee 0x33ce4000 + 578798
26 CoreFoundation 0x33d7033c 0x33ce4000 + 574268
27 CoreFoundation 0x33cf34d6 0x33ce4000 + 62678
28 CoreFoundation 0x33cf339e 0x33ce4000 + 62366
29 GraphicsServices 0x30577fc6 0x30574000 + 16326
30 UIKit 0x3717473c 0x37143000 + 202556
31 XXX 0x00002d26 0x1000 + 7462
32 XXX 0x00002ce4 0x1000 + 7396

Related

App crashing from ipa file but run from xcode

My app is crashing from ipa file. This is my console log. I am using firebase in this project? I can not figure out the problem. Is it arising for firebase or other causes?
Version: 3.5 (3.5)
Code Type: ARM-64 (Native)
Role: Foreground
Parent Process: launchd [1]
Date/Time: 2018-05-07 14:00:50.9291 +0600
Launch Time: 2018-05-07 14:00:50.7374 +0600
OS Version: iPhone OS 11.2.1 (15C153)
Baseband Version: 4.30.02
Report Version: 104
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Triggered by Thread: 0
Application Specific Information:
abort() called
Filtered syslog:
None found
Last Exception Backtrace:
0 CoreFoundation 0x1823be364 __exceptionPreprocess + 124
1 libobjc.A.dylib 0x181604528 objc_exception_throw + 55
2 CoreFoundation 0x1823be2ac +[NSException raise:format:] + 115
3 Photo 0x1049f62e0 _h`enter code here`idden#57437_ + 171
4 Photo 0x1049f60a4 _hidden#57435_ + 383
5 Photo 0x1049f5e44 _hidden#57433_ + 359
6 CoreFoundation 0x18235033c __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 19
7 CoreFoundation 0x18234f8dc _CFXRegistrationPost + 419
8 CoreFoundation 0x18234f640 ___CFXNotificationPost_block_invoke + 59
9 CoreFoundation 0x1823cd024 -[_CFXNotificationRegistrar find:object:observer:enumerator:] + 1407
10 CoreFoundation 0x182285f60 _CFXNotificationPost + 379
11 Foundation 0x182cb3348 -[NSNotificationCenter postNotificationName:object:userInfo:] + 67
12 Photo 0x104973d30 _hidden#53366_ + 387
13 Photo 0x104972bdc _hidden#53351_ + 287
14 Photo 0x104972a10 _hidden#53349_ + 391
15 Photo 0x1047056e8 _hidden#31344_ + 3348200 (__hidden#31777_:205)
16 UIKit 0x18b90e37c -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 383
17 UIKit 0x18baffc58 -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 3435
18 UIKit 0x18bb04aa8 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1711
19 UIKit 0x18bda02d4 __111-[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:]_block_invoke + 799
20 UIKit 0x18c07812c +[_UICanvas _enqueuePostSettingUpdateTransactionBlock:] + 159
21 UIKit 0x18bd9ff38 -[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:] + 251
22 UIKit 0x18bda0798 -[__UICanvasLifecycleMonitor_Compatability activateEventsOnly:withContext:completion:] + 731
23 UIKit 0x18c5257d0 __82-[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:]_block_invoke + 259
How to solve this problem. Please help.

What is the reason of the crash at CFNetWork _CFURLRequestCopyContentDispositionEncodingFallbackArray

This crash is from crash report of app. Multiple URL requests crash cause of it. I want to figure out how to repeat the crash and why the crash happened.
Incident Identifier: 4A2BA2B1-9174-410F-9D51-88A151884484
CrashReporter Key: TODO
Hardware Model: iPhone8,1
Code Type: ARM-64
Parent Process: ??? [1]
Date/Time: 2016-09-28 02:43:26 +0000
OS Version: iPhone OS 10.0.2 (14A456)
Report Version: 104
Exception Type: SIGSEGV
Exception Codes: SEGV_ACCERR at 0x0
Crashed Thread: 21
Thread 21 Crashed:
0 CFNetwork _CFURLRequestCopyContentDispositionEncodingFallbackArray + 48
1 CFNetwork HTTPProtocol::updateForHeader(__CFHTTPMessage*) + 260
2 CFNetwork HTTPProtocol::performHeaderReadPostProcessing(__CFHTTPMessage*, unsigned char) + 156
3 CFNetwork HTTPProtocol::performHeaderRead(__CFHTTPMessage*) + 992
4 CFNetwork HTTPProtocol::handleStreamEvent(__CFHTTPMessage*, dispatch_data_s*, CFStreamError const*) + 496
5 CFNetwork ___ZN15HTTPTransaction22_onqueue_invokeHandlerEv_block_invoke.64 + 60
6 libdispatch.dylib _dispatch_client_callout + 16
7 libdispatch.dylib _dispatch_block_invoke_direct + 376
8 CFNetwork RunloopBlockContext::_invoke_block(void const*, void*) + 36
9 CoreFoundation CFArrayApplyFunction + 68
10 CFNetwork RunloopBlockContext::perform() + 136
11 CFNetwork MultiplexerSource::perform() + 312
12 CFNetwork MultiplexerSource::_perform(void*) + 64
13 CoreFoundation __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24
14 CoreFoundation __CFRunLoopDoSources0 + 524
15 CoreFoundation __CFRunLoopRun + 804
16 CoreFoundation CFRunLoopRunSpecific + 444
17 CFNetwork +[NSURLConnection(Loader) _resourceLoadLoop:] + 336
18 Foundation __NSThread__start__ + 1024
19 libsystem_pthread.dylib _pthread_body + 240
20 libsystem_pthread.dylib _pthread_body + 0
21 libsystem_pthread.dylib thread_start + 4

CEF crashes on closing NSWindow in Macbook PRO(Only on Touchpad not for mouse click)

I have integrated CEF Framework into my project.
Its working fine for mouse based window close but it crashes If I use inbuilt touch pad of mac book pro while closing browser pop up window.
The pop up window is generate by CEF.
I am able to reproduce the crash like above most of the times.
Here is the crash log
Process: cefclient [1271] Path:
/Users/USER/Documents/*/cefclient.app/Contents/MacOS/cefclient
Identifier: com.genband.omni.mac Version:
1.0.0.30 (1.0.0.30) Code Type: X86-64 (Native) Parent Process: ??? [1] Responsible: cefclient [1271] User
ID: 501
Date/Time: 2016-07-07 14:54:14.865 +0530 OS Version:
Mac OS X 10.10.2 (14C1514) Report Version: 11 Anonymous UUID:
0F54FCED-4D82-FEB9-5CD2-3A541BF3C022
Sleep/Wake UUID: C774E441-04B7-4295-A913-3AD622E6B6F3
Time Awake Since Boot: 4300 seconds Time Since Wake: 710 seconds
Crashed Thread: 0 CrBrowserMain Dispatch queue:
com.apple.main-thread
Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes:
KERN_INVALID_ADDRESS at 0x0000443e46cfbec0
VM Regions Near 0x443e46cfbec0:
mapped file 0000000124936000-0000000124b36000 [ 2048K] rw-/rwx SM=ALI /private/var/folders//.3KjSNY
-->
MALLOC_NANO 0000600000000000-0000600000200000 [ 2048K] rw-/rwx SM=PRV
Application Specific Information: objc_msgSend() selector name:
respondsToSelector: Performing #selector(_close:) from sender
_NSThemeCloseWidget 0x608000186320
Thread 0 Crashed:: CrBrowserMain Dispatch queue:
com.apple.main-thread 0 libobjc.A.dylib
0x00007fff9303f0dd objc_msgSend + 29 1 com.apple.AppKit
0x00007fff87802735 -[NSWindow close] + 312 2 libsystem_trace.dylib
0x00007fff84178cd7 _os_activity_initiate + 75 3 com.apple.AppKit
0x00007fff877b9b71 -[NSApplication sendAction:to:from:] + 452 4
com.apple.AppKit 0x00007fff877b9970 -[NSControl
sendAction:to:] + 86 5 com.apple.AppKit
0x00007fff8798f86c __26-[NSCell _sendActionFrom:]_block_invoke + 131 6
libsystem_trace.dylib 0x00007fff84178cd7
_os_activity_initiate + 75 7 com.apple.AppKit 0x00007fff87802509 -[NSCell _sendActionFrom:] + 144 8
libsystem_trace.dylib 0x00007fff84178cd7
_os_activity_initiate + 75 9 com.apple.AppKit 0x00007fff87801d66 -[NSButtonCell performClick:] + 1027 10
com.apple.Foundation 0x00007fff83eaecdc
__NSThreadPerformPerform + 293 11 com.apple.CoreFoundation 0x00007fff90285681
__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 17 12 com.apple.CoreFoundation 0x00007fff902778dc
__CFRunLoopDoSources0 + 476 13 com.apple.CoreFoundation 0x00007fff90276e3f __CFRunLoopRun + 927 14 com.apple.CoreFoundation
0x00007fff90276858 CFRunLoopRunSpecific + 296 15 com.apple.HIToolbox
0x00007fff8ab26aef RunCurrentEventLoopInMode + 235 16
com.apple.HIToolbox 0x00007fff8ab2686a
ReceiveNextEventCommon + 431 17 com.apple.HIToolbox
0x00007fff8ab266ab _BlockUntilNextEventMatchingListInModeWithFilter +
71 18 com.apple.AppKit 0x00007fff875eaf81
_DPSNextEvent + 964 19 com.apple.AppKit 0x00007fff875ea730 -[NSApplication
nextEventMatchingMask:untilDate:inMode:dequeue:] + 194 20
com.apple.AppKit 0x00007fff875de593 -[NSApplication
run] + 594 21 org.chromium.ContentShell.framework 0x000000010d1b7c81
0x10d080000 + 1277057 22 org.chromium.ContentShell.framework
0x000000010d1b72e4 0x10d080000 + 1274596 23
org.chromium.ContentShell.framework 0x000000010d1ef893 0x10d080000 +
1505427 24 org.chromium.ContentShell.framework 0x000000010d1dd80d
0x10d080000 + 1431565 25 com.genband.omni.mac
0x000000010ceb9d69 client::MainMessageLoopStd::Run() + 9
(main_message_loop_std.cc:15) 26 com.genband.omni.mac
0x000000010cee6c12 main + 2354 (cefclient_mac.mm:1747) 27
libdyld.dylib 0x00007fff8433d5c9 start + 1
Any suggestions are highly welcome
Changing the window_ delegate to nil, in dealloc method of root_window_mac.mm cleared the crash problem for me.

Crash report - EXC_BAD_ACCESS (SIGABRT)

First time posting here and i'm new to this whole developer thing so please be nice!
I have submitted my app (a 3d game made in unity) and it has returned 3 crash reports, which all look pretty similar to me. I've put them through unity. I'll post one below (it was too long so i just posted the first bit) as they are so long, if you can help id be happy to post the other 2.
Any help would be greatly appreciated! Thanks!
Incident Identifier: 938FFF53-56A2-4A1D-BF23-4E24567BA101
CrashReporter Key: 3286a932eadfb6a4501de9b1e0044450b3f54fb3
Hardware Model: xxx
Process: Box [1376]
Path: /private/var/mobile/Containers/Bundle/Application/00E4561A-F30C-4C48-B2BD-355A71A4D971/Box.app/Box
Identifier: Bob.Bob
Version: 1 (1)
Code Type: ARM (Native)
Parent Process: launchd [1]
Date/Time: 2015-06-02 17:16:47.033 -0700
Launch Time: 2015-06-02 17:16:42.956 -0700
OS Version: iOS 8.3 (12F69)
Report Version: 105
Exception Type: EXC_BAD_ACCESS (SIGABRT)
Exception Subtype: KERN_INVALID_ADDRESS at 0x00000000ff222c47
Triggered by Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x32123df0 __pthread_kill + 8
1 libsystem_pthread.dylib 0x321a2cc3 pthread_kill + 59
2 libsystem_c.dylib 0x320bf905 abort + 73
3 Box 0x0182d908 mono_handle_native_sigsegv + 312
4 Box 0x0181d08c mono_sigsegv_signal_handler + 256
5 libsystem_platform.dylib 0x3219e879 _sigtramp + 41
6 Box 0x013e1f40 void ApplyMaterialPropertyBlockValuesMetal<SetValuesFunctorMetal>(MaterialPropertyBlock const&, GpuProgram*, GpuProgramParameters const*, ShaderType, SetValuesFunctorMetal&) (GpuProgramParamsApply.h:109)
7 Box 0x013de9c4 GfxDeviceMetal::SetMaterialProperties(MaterialPropertyBlock const&) (GfxDeviceMetal.mm:513)
8 Box 0x00ee48a0 ApplyBuiltinInstanceProperty::PerformFlushMaterialProperties() (ApplyBuiltinInstanceProperty.cpp:13)
9 Box 0x00f39ebc Skybox::SetupSun(Camera const&, GfxDevice&) (Skybox.cpp:256)
10 Box 0x00f3a218 Skybox::RenderSkybox(Unity::Material*, Camera const&) (Skybox.cpp:275)
11 Box 0x00ef941c Camera::RenderSkybox() (Camera.cpp:780)
12 Box 0x00ef3900 DoRenderLoop(RenderLoop&, RenderingPath, CullResults&, ShadowMapCache&, bool) (RenderLoopPrivate.cpp:416)
13 Box 0x00efa604 Camera::DoRender(CullResults&, void (*)(Camera&, RenderLoop&, CullResults&), int) (Camera.cpp:1175)
14 Box 0x00efad88 Camera::Render(CullResults&, ShaderLab::ShaderPassContext&, int) (Camera.cpp:1833)
15 Box 0x00f2c438 RenderManager::RenderCameras(int) (RenderManager.cpp:111)
16 Box 0x0104815c PlayerRender(bool) (Player.cpp:1490)
17 Box 0x01048c0c PlayerLoop(bool, bool, IHookEvent*) (Player.cpp:1990)
18 Box 0x00e13948 UnityPlayerLoopImpl(bool) (LibEntryPoint.mm:209)
19 Box 0x0008eb7c UnityRepaint (UnityAppController+Rendering.mm:199)
20 Box 0x0009e5a4 -[UnityAppController(ViewHandling) showGameUI] (UnityAppController+ViewHandling.mm:160)
21 Box 0x0009aeac -[UnityAppController startUnity:] (UnityAppController.mm:109)
22 Foundation 0x24378369 __NSFireDelayedPerform + 465
23 CoreFoundation 0x2360aedd __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 13
24 CoreFoundation 0x2360aa57 __CFRunLoopDoTimer + 647
25 CoreFoundation 0x23608ca7 __CFRunLoopRun + 1415
26 CoreFoundation 0x235551fd CFRunLoopRunSpecific + 473
27 CoreFoundation 0x2355500f CFRunLoopRunInMode + 103
28 GraphicsServices 0x2acf11fd GSEventRunModal + 133
29 UIKit 0x26cf9a55 UIApplicationMain + 1437
30 Box 0x000852b0 main (main.mm:40)
31 libdyld.dylib 0x32059aad start + 1

App is crashing when home button clicked

I have a strage crash scenario to crash the app!
When you do a fresh install by running the app from Xcode; the application will run perfectly.
But I installed by current app from app store, then run the application, now everything is perfect till you click on home button, the application will crash at that moment! What's the problem? And How could I solve it?
UPDATED (This is the log):
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x6f687370
Triggered by Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 ??? 0x6f687370 0 + 1869116272
1 CoreFoundation 0x291ad93c _CFXNotificationPost + 1784
2 Foundation 0x29edd9b8 -[NSNotificationCenter postNotificationName:object:userInfo:] + 72
3 UIKit 0x2c99b7ae -[UIApplication _handleApplicationDectivationWithScene:shouldForceExit:transitionContext:completion:] + 882
4 UIKit 0x2c9a29f0 __88-[UIApplication _handleApplicationLifecycleEventWithScene:transitionContext:completion:]_block_invoke + 76
5 UIKit 0x2c9a299c -[UIApplication _handleApplicationLifecycleEventWithScene:transitionContext:completion:] + 360
6 UIKit 0x2c997c82 -[UIApplication scene:didUpdateWithDiff:transitionContext:completion:] + 478
7 FrontBoardServices 0x2f9a21f8 __80-[FBSSceneImpl updater:didUpdateSettings:withDiff:transitionContext:completion:]_block_invoke_2 + 40
8 FrontBoardServices 0x2f9b10e8 __31-[FBSSerialQueue performAsync:]_block_invoke + 12
9 CoreFoundation 0x2925f5b4 __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 12
10 CoreFoundation 0x2925e878 __CFRunLoopDoBlocks + 216
11 CoreFoundation 0x2925d3b2 __CFRunLoopRun + 1714
12 CoreFoundation 0x291ab620 CFRunLoopRunSpecific + 476
13 CoreFoundation 0x291ab432 CFRunLoopRunInMode + 106
14 GraphicsServices 0x305310a8 GSEventRunModal + 136
15 UIKit 0x2c796358 UIApplicationMain + 1440
16 MyNiceTestApp 0x000cae9e 0xc4000 + 28318
17 libdyld.dylib 0x371bfaae start + 2
Since there is not source code to look at my guess would be you have registered for
an observer for NSNotificationCenter and you have not removed the observer before the
application terminates.
This will cause you problems if an NSNotification was delivered to a deallocated
listener.
It appears one of UIApplicationDidEnterBackgroundNotification listeners is deallocated without unregistering from observing UIApplicationDidEnterBackgroundNotification notification