VLCMobileKit iOS crash on screen lock on iPhone 4 - ios

I am facing a strange issue in MobileVLCKit for iOS.I am playing RTSP links in my app. I have set the flag to play audio and video in background to true in my app. So when the app goes in background the video playing in my VLC player keeps playing without any problem.
But on iPhone 4 (with iOS 7.0.4) when I lock the screen of my iPhone when the video is playing, the app crashes without showing any logs. Strange thing is that if I send the app in background by pressing home button then the app doesn't crash. The issue is only on iPhone 4 and not on iPhone 5.
Have somebody come across such issue before?
Bellow is device crash log:
May 27 03:18:41 My-iPhone-VI kernel[0] <Debug>: 019323.846533 wlan.A[400] AppleBCMWLANNetManager::updateLinkQualityMetrics(): Report LQM to User Land 100, fAverageRSSI -69
May 27 03:18:41 My-iPhone-VI kernel[0] <Debug>: ALS: AppleARMBacklight::setBacklightEnableGated 0 (set level to 0x1c8)
May 27 03:18:41 My-iPhone-VI kernel[0] <Debug>: AppleMultitouchN1SPI: updating power statistics
May 27 03:18:41 My-iPhone-VI kernel[0] <Debug>: ALS: AppleARMBacklight::handleMessageGated - framebufferState -> 0
May 27 03:18:41 My-iPhone-VI backboardd[28] <Notice>: Posting 'com.apple.iokit.hid.displayStatus' notifyState=0
May 27 03:18:41 My-iPhone-VI SpringBoard[34] <Warning>: [MPUNowPlayingController] Not registered for now playing notifications. Ignoring call to -unregisterForNotifications.
May 27 03:18:41 My-iPhone-VI backboardd[28] <Notice>: MultitouchHID: detection mode: 0->255
May 27 03:18:41 My-iPhone-VI MyApp[817] <Warning>: log: applicationWillResignActive
May 27 03:18:41 My-iPhone-VI MyApp[817] <Warning>: log: applicationDidEnterBackground
May 27 03:18:42 My-iPhone-VI profiled[818] <Notice>: (Note ) profiled: Service starting...
May 27 03:18:42 My-iPhone-VI ReportCrash[819] <Notice>: ReportCrash acting against PID 817
May 27 03:18:43 My-iPhone-VI ReportCrash[819] <Notice>: Formulating crash report for process MyApp[817]
May 27 03:18:43 My-iPhone-VI com.apple.launchd[1] (UIKitApplication:com.My.MyApp[0x19d8][817]) <Warning>: (UIKitApplication:com.My.MyApp[0x19d8]) Job appears to have crashed: Segmentation fault: 11
May 27 03:18:43 My-iPhone-VI backboardd[28] <Warning>: Application 'UIKitApplication:com.My.MyApp[0x19d8]' exited abnormally with signal 11: Segmentation fault: 11
May 27 03:18:43 My-iPhone-VI mediaserverd[46] <Warning>: Encountered an XPC error while communicating with backboardd: <error: 0x3cd9f744> { count = 1, contents =
"XPCErrorDescription" => <string: 0x3cd9f9dc> { length = 22, contents = "Connection interrupted" }
}
May 27 03:18:43 My-iPhone-VI ReportCrash[819] <Notice>: Saved crashreport to /var/mobile/Library/Logs/CrashReporter/MyApp_2014-05-27-031842_My-iPhone-VI.plist using uid: 0 gid: 0, synthetic_euid: 501 egid: 0
May 27 03:18:53 My-iPhone-VI profiled[818] <Notice>: (Note ) profiled: Service stopping.
Below is the stack trace taken in method didEnterBackground:
Stack trace : (
0 MyApp 0x0010a191 -[MyAppAppDelegate applicationDidEnterBackground:] + 76
1 UIKit 0x2fc85543 <redacted> + 590
2 UIKit 0x2fc06ae1 <redacted> + 764
3 UIKit 0x2fc06721 <redacted> + 72
4 UIKit 0x2fc6bb3d <redacted> + 664
5 GraphicsServices 0x320a270d <redacted> + 608
6 GraphicsServices 0x320a22f7 <redacted> + 34
7 CoreFoundation 0x2d4599df <redacted> + 34
8 CoreFoundation 0x2d45997b <redacted> + 346
9 CoreFoundation 0x2d45814f <redacted> + 1398
10 CoreFoundation 0x2d3c2c27 CFRunLoopRunSpecific + 522
11 CoreFoundation 0x2d3c2a0b CFRunLoopRunInMode + 106
12 GraphicsServices 0x320a1283 GSEventRunModal + 138
13 UIKit 0x2fc66049 UIApplicationMain + 1136
14 MyApp 0x001078e9 main + 116
15 libdyld.dylib 0x37d26ab7 <redacted> + 2
)

You need to disable video decoding prior to entering the background state. Otherwise, MobileVLCKit will try to draw OpenGL contents in the background which will be prevented by the OS by terminating the app.
You can disable video decoding by setting the current video track on your media player instance to -1. Once your app is moved to the foreground again, switch it back to the currently decoded video track (so you should cache it if your stream includes more than one video track).
When disabling video decoding, audio decoding is not affected and will continue just fine. This approach also got the benefit of saving CPU load and battery.. ;)
This is how VLC for iOS works, too. :)

i think You need to disable video decoding prior to entering the background state,this will work for sure this is major thing Apple says that a fix for the home screen crashes is coming also you can read here more How to take a screenshot on iphone without using lock button

Related

App terminated due to cpu use in iOS 13.2

I have a location service based tracking and geofencing app which would run for days and weeks in the background on and iOS 12.2 ff device.
Now with iOS 13.2 the app gets terminated after a variable amount of time, but at least several hours, due to excessive cpu usage:
Date/Time: 2019-11-09 23:25:18 +0200
End time: 2019-11-09 23:26:06 +0200
OS Version: iPhone OS 13.2 (Build 17B84)
Architecture: arm64
Report Version: 29
Incident Identifier: 5B46660C-A347-477F-8AE2-B1401080892B
Data Source: Microstackshots
Shared Cache: 0x44db8000 94FD24C8-F407-3A82-8D27-367F5B6C7BEC
Command: Anchorwatch
Path: /private/var/containers/Bundle/Application/32CD03B2-449C-4E84-8E06-79FA9B50F3A9/Anchorwatch.app/Anchorwatch
Identifier: de.sioned.Anchorwatch
Version: 2.2.1 (14)
Beta Identifier: 68A95EFC-B341-476C-9277-D711242471EC
PID: 57424
Event: cpu usage
Action taken: Process killed
CPU: 48 seconds cpu time over 48 seconds (99% cpu average), exceeding limit of 80% cpu over 60 seconds
CPU limit: 48s
Limit duration: 60s
CPU used: 48s
CPU duration: 48s
Duration: 48.39s
Duration Sampled: 14.08s
Steps: 16
Hardware model: iPad6,12
Active cpus: 2
Heaviest stack for the target process:
16 ??? (libsystem_pthread.dylib + 49032) [0x1c4f64f88]
16 ??? (libdispatch.dylib + 74516) [0x1c4ecb314]
16 ??? (libdispatch.dylib + 36344) [0x1c4ec1df8]
16 ??? (libdispatch.dylib + 33488) [0x1c4ec12d0]
16 ??? (libdispatch.dylib + 104312) [0x1c4ed2778]
16 ??? (libdispatch.dylib + 33948) [0x1c4ec149c]
16 ??? (libdispatch.dylib + 124996) [0x1c4ed7844]
16 ??? (libdispatch.dylib + 125216) [0x1c4ed7920]
16 ??? (libsystem_kernel.dylib + 158196) [0x1c50419f4]
Powerstats for: Anchorwatch [57424]
Bundle ID: de.sioned.Anchorwatch
Adam ID: 0
Is first party: No
App version: 2.2.1
Build version: 14
Is Beta: No
Share with Devs: No
UUID: 1C943425-70F9-3670-98D0-45D3051B4BB7
Path: /private/var/containers/Bundle/Application/32CD03B2-449C-4E84-8E06-79FA9B50F3A9/Anchorwatch.app/Anchorwatch
Architecture: arm64
Footprint: 1046.66 MB
Start time: 2019-11-09 23:25:52 +0200
End time: 2019-11-09 23:26:06 +0200
Num samples: 16 (100%)
CPU Time: 13.971s
Primary state: 15 samples Non-Frontmost App, Non-Suppressed, Kernel mode, Effective Thread QoS Background, Requested Thread QoS Default, Override Thread QoS Unspecified
User Activity: 0 samples Idle, 0 samples Active, 16 samples Unknown
Power Source: 0 samples on Battery, 0 samples on AC, 16 samples Unknown
16 _pthread_wqthread + 275 (libsystem_pthread.dylib + 49032) [0x1c4f64f88]
16 _dispatch_workloop_worker_thread + 587 (libdispatch.dylib + 74516) [0x1c4ecb314]
16 _dispatch_lane_invoke$VARIANT$mp + 419 (libdispatch.dylib + 36344) [0x1c4ec1df8]
16 _dispatch_lane_serial_drain$VARIANT$mp + 299 (libdispatch.dylib + 33488) [0x1c4ec12d0]
16 _dispatch_mach_invoke$VARIANT$mp + 471 (libdispatch.dylib + 104312) [0x1c4ed2778]
16 _dispatch_lane_serial_drain$VARIANT$mp + 759 (libdispatch.dylib + 33948) [0x1c4ec149c]
16 _dispatch_event_loop_drain$VARIANT$mp + 315 (libdispatch.dylib + 124996) [0x1c4ed7844]
16 _dispatch_kq_drain + 123 (libdispatch.dylib + 125216) [0x1c4ed7920]
16 kevent_id + 8 (libsystem_kernel.dylib + 158196) [0x1c50419f4]
1 <User mode>
Binary Images:
0x102d80000 - ??? Anchorwatch <1C943425-70F9-3670-98D0-45D3051B4BB7> /private/var/containers/Bundle/Application/32CD03B2-449C-4E84-8E06-79FA9B50F3A9/Anchorwatch.app/Anchorwatch
0x1c4eb9000 - 0x1c4f2dfff libdispatch.dylib <B7EED4C7-560D-3DA6-9B50-ED52A150AAC6> /usr/lib/system/libdispatch.dylib
0x1c4f59000 - 0x1c4f69fff libsystem_pthread.dylib <F8B082D8-24D9-3B1E-B80B-645FC8A88E14> /usr/lib/system/libsystem_pthread.dylib
0x1c501b000 - 0x1c5048fff libsystem_kernel.dylib <AE4C3D7A-7D08-33E7-BCC6-11AC821B4E48> /usr/lib/system/libsystem_kernel.dylib
While in background the app does nothing more than to write each location update to a sqlite database and checking the current location against a safety perimeter.
There is no reason to assume that the app suddenly after several hours would require such a high cpu usage.
I have not the slightest idea how to approach the problem and I am not even sure if I can do anything about it or if it is a bug in 13.2 and I have to wait for a fix.
My first assumption was, that the old iOS 12.0 bug which terminated background apps without reason and which was fixed in 12.2 was back. But that here seems to be something new. I was able to run the test app iOS 12 terminates apps in the background for no reason for several days.
Any hint how to interprete the log and take action ?
Edit:
It seems, that this is related to iOS 13.2 message: nehelper sent invalid result code [1] for Wi-Fi information request
Location service queries the WiFi interface in second intervals. Instrument shows that these query calls have a memory leak.
Turning off WiFi on the device seems to solve the problem, though that is no true solution. Now waiting for iOS 13.3 to leave beta.
It turned out, that a third party framework that I am using launches calls to CNCopyNetworkInfo in second intervals. These calls could not fullfilled as my App had no WiFi capabilities enabled and thus the calls to CNCopyNetworkInfo caused small memory leaks that added up over time.
After enabling WiFi access capabilities the memory leaks vanished.

React Native ios app crashes when run outside of xcode with failed to scene-create after 19.88s error

My react native app is crashing when launched outside of Xcode with the following exception showing up in the crash report on the device logs for thread 0.
Incident Identifier: DB5E0F81-977F-44B0-BD8B-FAAF33F98119
CrashReporter Key: e3b8d0751b47b37db0d7d6fcc5dde46051f8d30c
Hardware Model: iPhone7,1
Process: crashTest [388]
Path: /var/mobile/Containers/Bundle/Application/CE56E818-7288-4A39-8220-16E17158C916/crashTest.app/crashTest
Identifier: org.reactjs.native.example.crashTest
Version: 1 (1.0)
Code Type: ARM-64 (Native)
Parent Process: launchd [1]
Date/Time: 2017-04-25 12:42:30.30 -0400
Launch Time: 2017-04-25 12:42:10.10 -0400
OS Version: iOS 9.1 (13B143)
Report Version: 105
Exception Type: 00000020
Exception Codes: 0x000000008badf00d
Exception Note: SIMULATED (this is NOT a crash)
Highlighted by Thread: 0
Application Specific Information:
org.reactjs.native.example.crashTest failed to scene-create after 19.92s (launch took 0.08s of total time limit 20.00s)
Elapsed total CPU time (seconds): 9.230 (user 9.230, system 0.000), 23% CPU
Elapsed application CPU time (seconds): 0.113, 0% CPU
Filtered syslog:
None found
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0:
0 libsystem_kernel.dylib 0x0000000199ff0a7c semaphore_wait_trap + 8
1 libdispatch.dylib 0x0000000199ece614 _dispatch_semaphore_wait_slow + 244
2 CFNetwork 0x0000000184246ac0 CFURLConnectionSendSynchronousRequest + 288
3 CFNetwork 0x000000018426a07c +[NSURLConnection sendSynchronousRequest:returningResponse:error:] + 120
4 crashTest 0x0000000100128858 -[RCTBundleURLProvider isPackagerRunning:] (RCTBundleURLProvider.m:76)
5 crashTest 0x0000000100128b00 -[RCTBundleURLProvider guessPackagerHost] (RCTBundleURLProvider.m:92)
6 crashTest 0x0000000100128d10 -[RCTBundleURLProvider packagerServerHost] (RCTBundleURLProvider.m:106)
7 crashTest 0x0000000100128ed4 -[RCTBundleURLProvider jsBundleURLForBundleRoot:fallbackResource:] (RCTBundleURLProvider.m:123)
8 crashTest 0x000000010006a8cc -[AppDelegate application:didFinishLaunchingWithOptions:] (AppDelegate.m:21)
9 UIKit 0x000000018a0f5324 -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 400
10 UIKit 0x000000018a323acc -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 2904
11 UIKit 0x000000018a327e0c -[UIApplication _runWithMainScene:transitionContext:completion:] + 1656
12 UIKit 0x000000018a324f50 -[UIApplication workspaceDidEndTransaction:] + 168
13 FrontBoardServices 0x000000018e90b7c4 -[FBSSerialQueue _performNext] + 184
14 FrontBoardServices 0x000000018e90bb44 -[FBSSerialQueue _performNextFromRunLoopSource] + 56
15 CoreFoundation 0x0000000184aa4544 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24
16 CoreFoundation 0x0000000184aa3fd8 __CFRunLoopDoSources0 + 540
17 CoreFoundation 0x0000000184aa1cd8 __CFRunLoopRun + 724
18 CoreFoundation 0x00000001849d0ca0 CFRunLoopRunSpecific + 384
19 UIKit 0x000000018a0ee1c8 -[UIApplication _run] + 460
20 UIKit 0x000000018a0e8ffc UIApplicationMain + 204
21 crashTest 0x000000010006ad08 main (main.m:16)
22 libdyld.dylib 0x0000000199eee8b8 start + 4
I understand that my app is taking too long to launch and display. If I run directly from Xcode with my device tethered there are no issues (but it does take forever to launch)
I am testing this with the default react project produced with react-native init
When I build the project in Xcode I see the following warning:
[tid:com.facebook.react.JavaScript][RCTModuleData.mm:220] RCTBridge required dispatch_sync to load RCTDevSettings. This may lead to deadlocks
I am new to react-native, and I am assuming maybe this is running in some sort of dev mode that does not allow me to launch the app when un-tethered or on a different network? Are there special instructions I am missing that I need to follow when building the app to run independently on the device without having to archive the app in Xcode?
Check if you're connected to the same WiFi network. Just had this.
In your -[AppDelegate application:didFinishLaunchingWithOptions:] function you're kicking off a synchronous network request, and that request appears to be taking too long. iOS kills your app because it has failed to finish launching (specifically, it's failed to return from application:didFinishLaunchingWithOptions:) after 20 seconds.
I've run into the same issue, and don't have a solution, but a temporary workaround that helped me. I've posted it here - https://github.com/facebook/react-native/issues/10187 in the hopes that someone better versed with objective-c and url loading will take a look and put in the proper fix. Hope this helps. Thanks.
The issue, as Aaron Golden has pointed out, is that a synchronous request is made from the main thread at load time in order to figure out whether the react packager (remote server running on the same network) is accessible. This can take awhile for reasons beyond my knowledge (if someone can expound on this, I'd be grateful), but apple will crash the app if this takes longer than 19 seconds (approx).

Application crashes after first launch

I already have this app on app store. I released an updated version with some changes. This app is using CoreData for data persistence. I have tested its new version before releasing it on app store, it was working as required. But after submitting on app store and updating it from there the app is crashing after each launch. I have that crash report, but it doesn't make any sense to me. I didn't change anything in CoreData.
After launch, this app is showing a UITableView and this tableView is getting data from CoreData.
Here is the crash report.
Incident Identifier: 7A9713FF-40CB-45E0-961F-F4D1B003F2B5
CrashReporter Key: 891c38a57639ab8e2bcc3012687292ce9aa818f5
Hardware Model: iPhone6,2
Process: APPName [7461]
Path: /var/mobile/Applications/A9028B70-0878-40FA-944B-584B15E49B69/APPName.app/APPName
Identifier: co.identifier.app
Version: 2.5 (2.5)
Code Type: ARM (Native)
Parent Process: launchd [1]
Date/Time: 2014-03-13 09:39:17.309 +0000
OS Version: iOS 7.0.6 (11B651)
Report Version: 104
Exception Type: 00000020
Exception Codes: 0x000000008badf00d
Highlighted Thread: 0
Application Specific Information:
co.identifier.app failed to launch in time
Elapsed total CPU time (seconds): 1.660 (user 1.660, system 0.000), 4% CPU
Elapsed application CPU time (seconds): 0.304, 1% CPU
Thread 0:
0 libsystem_kernel.dylib 0x3a161fa8 __psynch_mutexwait + 24
1 libsystem_pthread.dylib 0x3a1c6f4d _pthread_mutex_lock + 305
2 CoreData 0x2f595a91 -[_PFLock lock] + 21
3 CoreData 0x2f5a6b35 -[NSPersistentStoreCoordinator executeRequest:withContext:error:] + 777
4 CoreData 0x2f5a5777 -[NSManagedObjectContext executeFetchRequest:error:] + 611
5 APPName 0x000ecc11 +[DataManager dataEntryEntity:] (DataManager.m:385)
6 APPName 0x000ebca9 +[DataManager dataForDateKey:] (DataManager.m:126)
7 APPName 0x000cff9d -[CalendarCell setDateKey:] (CalendarCell.m:820)
8 APPName 0x000bd969 -[CalendarViewController tableView:cellForRowAtIndexPath:] (CalendarViewController.m:832)
9 UIKit 0x32108311 -[UITableView _createPreparedCellForGlobalRow:withIndexPath:] + 405
10 UIKit 0x320b06c9 -[UITableView _updateVisibleCellsNow:] + 1797
11 UIKit 0x320afeed -[UITableView layoutSubviews] + 181
12 UIKit 0x31fd634f -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 343
13 QuartzCore 0x31c5c93f -[CALayer layoutSublayers] + 139
14 QuartzCore 0x31c58163 CA::Layer::layout_if_needed(CA::Transaction*) + 347
15 QuartzCore 0x31c57ff5 CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 13
16 QuartzCore 0x31c57a09 CA::Context::commit_transaction(CA::Transaction*) + 225
17 QuartzCore 0x31c5781b CA::Transaction::commit() + 311
18 UIKit 0x32055a37 -[UIApplication _reportAppLaunchFinished] + 39
19 UIKit 0x32040edb -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 1643
20 UIKit 0x31fdba03 -[UIApplication handleEvent:withNewEvent:] + 3139
21 UIKit 0x31fdacf9 -[UIApplication sendEvent:] + 69
22 UIKit 0x3204031d _UIApplicationHandleEvent + 661
23 GraphicsServices 0x344ba76b _PurpleEventCallback + 607
24 GraphicsServices 0x344ba353 PurpleEventCallback + 31
25 CoreFoundation 0x2f81c775 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 33
26 CoreFoundation 0x2f81c70f __CFRunLoopDoSource1 + 343
27 CoreFoundation 0x2f81aedb __CFRunLoopRun + 1403
28 CoreFoundation 0x2f78546d CFRunLoopRunSpecific + 521
29 CoreFoundation 0x2f78524f CFRunLoopRunInMode + 103
30 UIKit 0x3203f5bf -[UIApplication _run] + 759
31 UIKit 0x3203a841 UIApplicationMain + 1133
32 APPName 0x000b6ba7 main (main.m:11)
33 libdyld.dylib 0x3a0abab5 start + 1
This crash is producing on every device which updates the app and this is not reproducing in simulator testing or in testing build through testFlight distribution.
As Phillip stated in the comment, the reason for this crash is due to the watchdog.
If your app is stuck in the method -applicationDidFinishLauchingWithOptions: for a long time, the system kills it.
The reason is that probably you are doing an expensive time task on the main thread inside this method, that could be a migration, copying or deleting a lot of files.
You never experienced in your tests because probably you used small amount of data or because in debug mode the watchdog isn't active (not sure about it).
Unfortunately I think that you should release another version as soon as possible to fix that, the solution could be launch those long running task on a background thread.
To prevent those problems always to try updating an old app using ad-hoc distribution before releasing it.
From http://www.raywenderlich.com/23704/demystifying-ios-application-crash-logs
Here are some of the more common exception codes:
0x8badf00d: Reads as “ate bad food”! (If you squint your eyes and replace the digits with alphabetic characters. :p) This code indicates that an application was terminated by iOS because a watchdog timeout occurred. Basically, the application took too long to launch, terminate, or respond to system events.
The crash is because of a long wait, what's causing it is in 1 of 321 task items listed in the log.
I am really curious about your send event / handle event items in the log. Is there any chance that you are waiting for something before launching the rootViewController? ... it could be core data but if there is something very wrong I sort of expected another error to happen instead of along wait.

ios app strange crash on start

My project, called OBI, works fine when launched from Xcode, but when I create .ipa file its crashes with provided log.
In project no classes with names: Mutex, DelayedPointerDeletionManager or MemoryManager, so I can't understood from where this exception.
Thread 0 Crashed:
0 libsystem_pthread.dylib 0x396b7046 _pthread_mutex_check_init + 14
1 libsystem_pthread.dylib 0x396b6e32 _pthread_mutex_lock + 22
2 OBI 0x02a74f20 Mutex::Lock() (Mutex.cpp:152)
3 OBI 0x02838930 DelayedPointerDeletionManager::AddPointerToMainThreadDealloc(void*, MemLabelId) (Mutex.h:32)
4 OBI 0x028384a4 MemoryManager::Deallocate(void*, MemLabelId) (MemoryManager.cpp:1082)
5 OBI 0x028384e4 operator delete[](void*) (MemoryManager.cpp:114)
6 OBI 0x01d28010 std::locale::locale<boost::filesystem::detail::utf8_codecvt_facet>(std::locale const&, boost::filesystem::detail::utf8_codecvt_facet*) (locale_classes.h:581)
7 OBI 0x01d281c4 ___lldb_unnamed_function148423$$OBI + 232
8 dyld 0x2be5b59e ImageLoaderMachO::doModInitFunctions(ImageLoader::LinkContext const&) + 174
9 dyld 0x2be5b6ac ImageLoaderMachO::doInitialization(ImageLoader::LinkContext const&) + 16
10 dyld 0x2be58d34 ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&) + 356
11 dyld 0x2be58b88 ImageLoader::runInitializers(ImageLoader::LinkContext const&, ImageLoader::InitializerTimingList&) + 36
12 dyld 0x2be4fd38 dyld::initializeMainExecutable() + 164
13 dyld 0x2be52ab4 dyld::_main(macho_header const*, unsigned long, int, char const**, char const**, char const**, unsigned long*) + 1748
14 dyld 0x2be4f22a dyldbootstrap::start(macho_header const*, int, char const**, long, macho_header const*, unsigned long*) + 346
15 dyld 0x2be4f064 _dyld_start + 60
Edit, few lines from console.
Oct 16 14:43:18 Sergiys-iPad kernel[0] <Debug>: launchd[9526] Container: /private/var/mobile/Applications/AA46736B-6348-42BA-A8F0-DD63DC535AF6 (sandbox)
Oct 16 14:43:19 Sergiys-iPad ReportCrash[9527] <Notice>: ReportCrash acting against PID 9526
Oct 16 14:43:19 Sergiys-iPad ReportCrash[9527] <Notice>: Formulating crash report for process OBI[9526]
Oct 16 14:43:19 Sergiys-iPad com.apple.launchd[1] (UIKitApplication:com.mycompany.OBIQA[0x14dc][9526]) <Warning>: (UIKitApplication:com.mycompany.OBIQA[0x14dc]) Job appears to have crashed: Segmentation fault: 11
Oct 16 14:43:19 Sergiys-iPad com.apple.launchd[1] (UIKitApplication:com.mycompany.OBIQA[0x14dc]) <Notice>: (UIKitApplication:com.mycompany.OBIQA[0x14dc]) Throttling respawn: Will start in 2147483647 seconds
Oct 16 14:43:19 Sergiys-iPad backboardd[28] <Warning>: Application 'UIKitApplication:com.mycompany.OBIQA[0x14dc]' exited abnormally with signal 11: Segmentation fault: 11
Oct 16 14:43:19 Sergiys-iPad SpringBoard[33] <Warning>: Application 'com.mycompany.OBIQA' has failed to launch too many times. Not relaunching.
Oct 16 14:43:19 Sergiys-iPad ReportCrash[9527] <Notice>: Saved crashreport to /var/mobile/Library/Logs/CrashReporter/OBI_2013-10-16-144319_Sergiys-iPad.plist using uid: 0 gid: 0, synthetic_euid: 501 egid: 0
I will be very pleased for any help, or direction to dig
EDIT
Finally I found what causes this exception. Is symbol striping option in build setting, after I changed it from all symbols to debug symbols everything become fine.
This is crashing in the dynamic loader as iOS loads your classes into memory. Part of this process is calling +load on any classes that implement the method.
One possibility is that you are doing too much work in +load, and are being killed with a "Failed to launch in time". Providing the full crash log would show whether this is the case.
ImageLoader is linked to the loading of code pieces (external framework, libraries). You should make sure you all those are "see-able" by your binary. Building in XCode can put all in the same folder so you have no path issue but, an din particularly if you are referencing third parties framework you need to make sure they can be "seen" by the main executable. Does the console spit anything?
From what I can see (it would help if you show some code, especially your applicationDidFinishLaunching method) it looks like your app is taking too long to launch and is being killed by the OS.
An app has a certain time limit to set up a root view controller and do any basic set up. if it takes too long, the OS considers it non responsive and kills it. You won't notice this problem when launching from Xcode because the time limit is disabled when launching with a debugger attached: see here https://developer.apple.com/library/ios/qa/qa1592/_index.html
If you are downloading an image in your app delegate I would suggest switching to an asynchronous approach, and also probably handling the image loading from the view controller which will use the image
edit: it looks like you get a different error from the console than the Q&A describes, but without any code I can't help much more than that

Crash on iOS when system purges memory and closes a UIViewController

My application is crashing when one of the views is purged from memory because of low-memory condition. At least this is what I understand from the crashlog. It happens on numerous screens but only when opening a Facebook dialog (using the Facebook SDK). Basically, looks like the system sometimes runs out of memory when we need to present a Facebook dialog (e.g. to let user post something on the Facebook timeline).
Date/Time: 2012-03-14 19:47:33.819 +0000
OS Version: iPhone OS 5.1 (9B176)
Report Version: 104
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x30000008
Crashed Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libobjc.A.dylib 0x30f2bf78 objc_msgSend + 16
1 MyApp 0x00003c0e -LTBaseViewController viewDidUnload (LTBaseViewController.m:145)
2 MyApp 0x00004ea2 -LTBaseTableViewController viewDidUnload (LTBaseTableViewController.m:90)
3 UIKit 0x33766bd8 -[UIViewController unloadViewForced:] + 244
4 UIKit 0x338ae492 -[UIViewController purgeMemoryForReason:] + 58
5 Foundation 0x3071a4f8 __57-NSNotificationCenter addObserver:selector:name:object:_block_invoke_0 + 12
6 CoreFoundation 0x30e95540 ___CFXNotificationPost_block_invoke_0 + 64
7 CoreFoundation 0x30e21090 _CFXNotificationPost + 1400
8 Foundation 0x3068e3e4 -NSNotificationCenter postNotificationName:object:userInfo: + 60
9 Foundation 0x3068fc14 -NSNotificationCenter postNotificationName:object: + 24
10 UIKit 0x3387926a -UIApplication _performMemoryWarning + 74
11 UIKit 0x33879364 -UIApplication _receivedMemoryNotification + 168
12 libdispatch.dylib 0x36a12252 _dispatch_source_invoke + 510
13 libdispatch.dylib 0x36a0fb1e _dispatch_queue_invoke$VARIANT$up + 42
14 libdispatch.dylib 0x36a0fe64 _dispatch_main_queue_callback_4CF$VARIANT$up + 152
15 CoreFoundation 0x30e9c2a6 __CFRunLoopRun + 1262
16 CoreFoundation 0x30e1f49e CFRunLoopRunSpecific + 294
17 CoreFoundation 0x30e1f366 CFRunLoopRunInMode + 98
18 GraphicsServices 0x33fb6432 GSEventRunModal + 130
19 UIKit 0x336f5e76 UIApplicationMain + 1074
20 MyApp 0x00004818 main (main.m:16)
21 MyApp 0x000023b4 0x1000 + 5044
I checked and there are almost no memory leaks, e.g. when testing the app for an hour the total memory leaked was around 2-3Kb caused by some string-copying libraries. So I don't believe this is caused by the application. I guess that when the phone is not restarted for some time there are applications running in the background and when using Facebook SDK the memory becomes a problem and the system tries to recover the memory from random applications, including my application.
My question is, how can I prevent this crash from happening? How should I handle unloadViewForced on a view controller to make the app more robust in low-memory conditions? And lastly, am I right that this crashlog suggests the crash occurred because the system tried to free memory and my application didn't handle it properly?
Any help greatly appreciated.
What is most likely happening is that one of the objects being referred to and probably being released by LTBaseViewController viewDidUnload method is being doubly released. In fact, since the backtrace indicates that the crash is happing on line 145 of LTBaseViewController.m you should be able to quickly see which object is the culprit.

Resources