My current main Application is randomly crashing on iOS 6 devices when i compile with iOS 7. It is system deep i think and don't know how to fix this little nasty bug. In my App there are plenty of iOS 6 user with this crash and it's driving me nuts.
Thread : Fatal Exception: NSGenericException
0 CoreFoundation 0x32b902a3 __exceptionPreprocess + 162
1 libobjc.A.dylib 0x3a8b897f objc_exception_throw + 30
2 CoreFoundation 0x32b8fd85 -[NSException name]
3 UIKit 0x34d22f75 __54+[_UIAppearance _recordersExcludingSource:withWindow:]_block_invoke_0 + 332
4 CoreFoundation 0x32b8d62f __NSDictionaryEnumerate + 714
5 UIKit 0x34d22e1d +[_UIAppearance _recordersExcludingSource:withWindow:] + 136
6 UIKit 0x34e013a5 UIViewServiceCurrentAppearanceSerializedRepresentations + 60
7 UIKit 0x34d8f7c7 -[_UIRemoteViewControllerConnectionRequest _sendServiceViewControllerRequest] + 206
8 UIKit 0x34d8f65d __block_global_5 + 264
9 libdispatch.dylib 0x3acd39f7 _dispatch_barrier_sync_f_invoke + 30
10 UIKit 0x34d8f551 __76-[_UIRemoteViewControllerConnectionRequest _connectToViewControllerOperator]_block_invoke_0 + 92
11 UIKit 0x34d98bc5 __block_global_0 + 32
12 libdispatch.dylib 0x3acd53f7 dispatch_once_f$VARIANT$mp + 42
13 UIKit 0x34d98ba1 __73-[_UIViewServiceSessionEndpoint connectToDeputyOfType:connectionHandler:]_block_invoke_0 + 88
14 libdispatch.dylib 0x3acd011f _dispatch_call_block_and_release + 10
15 libdispatch.dylib 0x3acd3ecf _dispatch_queue_drain$VARIANT$mp + 142
16 libdispatch.dylib 0x3acd3dc1 _dispatch_queue_invoke$VARIANT$mp + 40
17 libdispatch.dylib 0x3acd491d _dispatch_root_queue_drain + 184
18 libdispatch.dylib 0x3acd4ac1 _dispatch_worker_thread2 + 84
19 libsystem_c.dylib 0x3ad04a11 _pthread_wqthread + 360
20 libsystem_c.dylib 0x3ad048a4 start_wqthread + 8
Add a Exception breakpoint you will get some more info about your crash.. for adding a Exception Breakpoint have a look on this https://developer.apple.com/library/ios/recipes/xcode_help-breakpoint_navigator/articles/adding_an_exception_breakpoint.html
Add breakpoints step into every line of code to find the bug , Or maybe this would help you read crash reports. http://www.raywenderlich.com/23704/demystifying-ios-application-crash-logs
Related
I have an iPhone app which is crashing on iOS9 devices only after being released through TestFlight or the App Store. The build specs are:
Deployment target 8.1
Base SDK: Latest iOS (iOS 10.1)
Before I post the crash logs I wanted to mention that this app has been on the app store for the past 2 years and has never had issues. We have done 3 updates to the app store this year with 2 of those being after iOS10 was released and there were no issues with iOS9 devices.
The odd thing is that we are using Crashlytics and it has reported over 600 crashes, each one of those a singular crash that points to either an internal apple framework or private API. I have got an iOS 9.2.1 device that is also crashing that I have pulled the logs from. They are starting to follow a trend however I need some help deciphering the cause of the crashes.
Crash 1:
Thread 0 Crashed:
0 libobjc.A.dylib 0x22fb3af6 objc_msgSend + 22
1 libobjc.A.dylib 0x22fc0f8a objc_object::sidetable_release(bool) + 150
2 libobjc.A.dylib 0x22fc13cc (anonymous namespace)::AutoreleasePoolPage::pop(void*) + 388
3 FrontBoardServices 0x24aebc7e -[FBSSerialQueue _performNext] + 242
4 FrontBoardServices 0x24aebf60 -[FBSSerialQueue _performNextFromRunLoopSource] + 44
5 CoreFoundation 0x2379d256 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 14
6 CoreFoundation 0x2379ce46 __CFRunLoopDoSources0 + 454
7 CoreFoundation 0x2379b1ae __CFRunLoopRun + 806
8 CoreFoundation 0x236edbb8 CFRunLoopRunSpecific + 516
9 CoreFoundation 0x236ed9ac CFRunLoopRunInMode + 108
10 UIKit 0x279dfa16 -[UIApplication _run] + 526
11 UIKit 0x279d9fb4 UIApplicationMain + 144
12 Where Next 0x000a7816 main (main.m:16)
13 libdyld.dylib 0x233a0872 start + 2
Crash 2:
Thread 0 Crashed:
0 libobjc.A.dylib 0x22fb3af6 objc_msgSend + 22
1 CoreUI 0x277e3022 -[CUICatalog _resolvedRenditionKeyFromThemeRef:withBaseKey:scaleFactor:devic eIdiom:deviceSubtype:sizeClassHorizontal:sizeClassVertical:memoryClass:graphicsClass:graphicsFallBackOrder:] + 646
2 CoreUI 0x277e2d98 -[CUICatalog _resolvedRenditionKeyForName:scaleFactor:deviceIdiom:deviceSubt ype:sizeClassHorizontal:sizeClassVertical:memoryClass:graphicsClass:graphicsFallBackOrder:withBaseKeySelector:] + 284
3 CoreUI 0x277e252a -[CUICatalog namedLookupWithName:scaleFactor:deviceIdiom:deviceSubtype:sizeClassHorizontal:sizeClassVertical:] + 94
4 UIKit 0x28183a2c __98-[_UIAssetManager imageNamed:scale:idiom:subtype:cachingOptions:sizeClassPair:attachCatalogImage:]_block_invoke + 496
5 UIKit 0x2818377e -[_UIAssetManager imageNamed:scale:idiom:subtype:cachingOptions:sizeClassPair:attachCatalogImage:] + 230
6 UIKit 0x2798bcd4 -[_UIAssetManager imageNamed:scale:idiom:subtype:] + 108
7 UIKit 0x2798bc62 -[_UIAssetManager imageNamed:idiom:subtype:] + 46
8 UIKit 0x2798bc2e -[_UIAssetManager imageNamed:idiom:] + 46
9 UIKit 0x27e1e438 -[UIImageNibPlaceholder initWithCoder:] + 456
10 UIKit 0x27f32180 UINibDecoderDecodeObjectForValue + 780
11 UIKit 0x27f31e68 -[UINibDecoder decodeObjectForKey:] + 296
12 UIKit 0x27e0a602 -[UIButtonContent initWithCoder:] + 382
13 UIKit 0x27f32180 UINibDecoderDecodeObjectForValue + 780
14 UIKit 0x27f3250c UINibDecoderDecodeObjectForValue + 1688
15 UIKit 0x27f31e68 -[UINibDecoder decodeObjectForKey:] + 296
16 UIKit 0x27e0d03c -[UIButton initWithCoder:] + 748
17 UIKit 0x27f32180 UINibDecoderDecodeObjectForValue + 780
18 UIKit 0x27f31e68 -[UINibDecoder decodeObjectForKey:] + 296
19 UIKit 0x27e1d202 -[UIRuntimeConnection initWithCoder:] + 114
20 UIKit 0x27e1d88c -[UIRuntimeEventConnection initWithCoder:] + 52
21 UIKit 0x27f32180 UINibDecoderDecodeObjectForValue + 780
22 UIKit 0x27f32112 UINibDecoderDecodeObjectForValue + 670
23 UIKit 0x27f31e68 -[UINibDecoder decodeObjectForKey:] + 296
24 UIKit 0x27e1c796 -[UINib instantiateWithOwner:options:] + 1110
25 UIKit 0x27cd6676 -[UIViewController _loadViewFromNibNamed:bundle:] + 322
26 UIKit 0x27aab9d6 -[UIViewController loadView] + 142
27 UIKit 0x27971a0a -[UIViewController loadViewIfRequired] + 150
28 UIKit 0x27971958 -[UIViewController view] + 24
29 UIKit 0x281edf4a __67-[UIStoryboardEmbedSegueTemplate newDefaultPerformHandlerForSegue:]_block_invoke + 498
30 UIKit 0x280642d4 -[UIStoryboardSegueTemplate _performWithDestinationViewController:sender:] + 432
31 UIKit 0x28064102 -[UIStoryboardSegueTemplate _perform:] + 66
32 UIKit 0x28064374 -[UIStoryboardSegueTemplate perform:] + 132
33 UIKit 0x27971bca -[UIViewController loadViewIfRequired] + 598
34 UIKit 0x27971958 -[UIViewController view] + 24
35 UIKit 0x279786d0 -[UIWindow addRootViewControllerViewIfPossible] + 68
36 UIKit 0x27975bf2 -[UIWindow _setHidden:forced:] + 278
37 UIKit 0x279ea914 -[UIWindow makeKeyAndVisible] + 48
38 UIKit 0x27c0f11c -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 3320
39 UIKit 0x27c12f0e -[UIApplication _runWithMainScene:transitionContext:completion:] + 1570
40 UIKit 0x27c26c14 __84-[UIApplication _handleApplicationActivationWithScene:transitionContext:completion:]_block_invoke3228 + 36
41 UIKit 0x27c103f6 -[UIApplication workspaceDidEndTransaction:] + 134
42 FrontBoardServices 0x24aebc74 -[FBSSerialQueue _performNext] + 232
43 FrontBoardServices 0x24aebf60 -[FBSSerialQueue _performNextFromRunLoopSource] + 44
44 CoreFoundation 0x2379d256 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 14
45 CoreFoundation 0x2379ce46 __CFRunLoopDoSources0 + 454
46 CoreFoundation 0x2379b1ae __CFRunLoopRun + 806
47 CoreFoundation 0x236edbb8 CFRunLoopRunSpecific + 516
48 CoreFoundation 0x236ed9ac CFRunLoopRunInMode + 108
49 UIKit 0x279dfa16 -[UIApplication _run] + 526
50 UIKit 0x279d9fb4 UIApplicationMain + 144
51 Where Next 0x000e8816 main (main.m:16)
52 libdyld.dylib 0x233a0872 start + 2
Crash 3:
Thread 0 Crashed:
0 libsystem_malloc.dylib 0x2349c43a tiny_free_list_remove_ptr + 126
1 libsystem_malloc.dylib 0x2349b4d0 szone_free_definite_size + 932
2 libcache.dylib 0x2330d6f4 cache_set_name + 20
3 CoreFoundation 0x2372eb94 -[NSCache setName:] + 136
4 CoreUI 0x277e2f0e -[CUICatalog _resolvedRenditionKeyFromThemeRef:withBaseKey:scaleFactor:devic eIdiom:deviceSubtype:sizeClassHorizontal:sizeClassVertical:memoryClass:graphicsClass:graphicsFallBackOrder:] + 370
5 CoreUI 0x277e2d98 -[CUICatalog _resolvedRenditionKeyForName:scaleFactor:deviceIdiom:deviceSubt ype:sizeClassHorizontal:sizeClassVertical:memoryClass:graphicsClass:graphicsFallBackOrder:withBaseKeySelector:] + 284
6 CoreUI 0x277e252a -[CUICatalog namedLookupWithName:scaleFactor:deviceIdiom:deviceSubtype:sizeClassHorizontal:sizeClassVertical:] + 94
7 UIKit 0x28183a2c __98-[_UIAssetManager imageNamed:scale:idiom:subtype:cachingOptions:sizeClassPair:attachCatalogImage:]_block_invoke + 496
8 UIKit 0x2818377e -[_UIAssetManager imageNamed:scale:idiom:subtype:cachingOptions:sizeClassPair:attachCatalogImage:] + 230
9 UIKit 0x28183f50 -[_UIAssetManager imageNamed:withTrait:] + 408
10 UIKit 0x27c4e94c +[UIImage imageNamed:inBundle:compatibleWithTraitCollection:] + 172
11 UIKit 0x27aae536 +[UIImage imageNamed:] + 110
12 Where Next 0x000e555e -[PreferenceObject resetLocations] (PreferenceObject.m:184)
13 Where Next 0x000e4b6e __33+[PreferenceObject sharedManager]_block_invoke (PreferenceObject.m:92)
14 libdispatch.dylib 0x23377dc2 _dispatch_client_callout + 22
15 libdispatch.dylib 0x233789b2 dispatch_once_f + 62
16 Where Next 0x000e4980 +[PreferenceObject sharedManager] (once.h:75)
17 Where Next 0x00102440 -[AppDelegate application:didFinishLaunchingWithOptions:] (AppDelegate.m:57)
18 Where Next 0x002ced6a VMDidFinishLaunchingWithOptions (UIApplication+VMRuntime.m:138)
19 UIKit 0x279e664e -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 394
20 UIKit 0x27c0f032 -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 3086
21 UIKit 0x27c12f0e -[UIApplication _runWithMainScene:transitionContext:completion:] + 1570
22 UIKit 0x27c26c14 __84-[UIApplication _handleApplicationActivationWithScene:transitionContext:completion:]_block_invoke3228 + 36
23 UIKit 0x27c103f6 -[UIApplication workspaceDidEndTransaction:] + 134
24 FrontBoardServices 0x24aebc74 -[FBSSerialQueue _performNext] + 232
25 FrontBoardServices 0x24aebf60 -[FBSSerialQueue _performNextFromRunLoopSource] + 44
26 CoreFoundation 0x2379d256 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 14
27 CoreFoundation 0x2379ce46 __CFRunLoopDoSources0 + 454
28 CoreFoundation 0x2379b1ae __CFRunLoopRun + 806
29 CoreFoundation 0x236edbb8 CFRunLoopRunSpecific + 516
30 CoreFoundation 0x236ed9ac CFRunLoopRunInMode + 108
31 UIKit 0x279dfa16 -[UIApplication _run] + 526
32 UIKit 0x279d9fb4 UIApplicationMain + 144
33 Where Next 0x00103816 main (main.m:16)
34 libdyld.dylib 0x233a0872 start + 2
The last two crashes look like they may be failing on finding an image asset... However because I cannot get this to replicate in debug mode or any form of "run" from Xcode I am stuck.
Appreciate the help community!
The same problem occurs to my app. It crashes in iOS9 on release only through TestFlight or AppStore.
See the accepted answer https://forums.developer.apple.com/thread/60919 . It works for me,and I fixed the bug.
How to resolve "ERROR ITMS-90682: Invalid Bundle - The asset catalog at 'Payload/XXXXX/Assets.car' can't contain 16-bit or P3 assets if the app supports iOS 8 or earlier."
With Xcode 8 GM, this error will occur if you include 16-bit or P3 assets in an app submission targeting iOS releases earlier then iOS 9.3. If your app requires wide color functionality you must change your Deployment Target to iOS 9.3 or later. If your app does not require wide color functionality and you wish to deploy it to older iOS versions then you should replace all 16-bit or P3 assets with 8-bit sRGB assets. You can find 16-bit or P3 assets by running “assetutil” on the asset catalog named in the error message from iTunes Connect. The following steps outline the process:
Create an Inspectable .ipa file. In the Xcode Organizer (Xcode->Window->Organizer), select an archive to inspect, click “Export...", and choose "Export for Enterprise or Ad-Hoc Deployment". This will create a local copy of the .ipa file for your app.
Locate that .ipa file and change its the extension to .zip.
Expand the .zip file. This will produce a Payload folder containing your .app bundle.
Open a terminal and change the working directory to the top level of your .app bundle cd path/to/Payload/your.app
Use the find tool to locate Assets.car files in your .app bundle as shown below: find . -name 'Assets.car'
Use the assetutil tool to find any 16-bit or P3 assets, in each Assets.car your application has as shown below. : sudo xcrun --sdk iphoneos assetutil --info /path/to/a/Assets.car > /tmp/Assets.json
Examine the resulting /tmp/Assets.json and look for any contents containing “DisplayGamut": “P3” and its associated “Name". This will be the name of your imageset containing one or more 16-bit or P3 assets.
Replace those assets with 8-bit / sRGB assets, then rebuild your app.
Update: If your Deployment Target is set to either 8.3 or 8.4 and you have an asset catalog then you will receive this same error message, even if you do not actually have 16-bit or P3 assets. In this case you will either need to lower your Deployment Target to 8.2, or move it up to 9.x.
Release crashes (crashes that happen on builds sent through the App Store or TestFlight) can be tough to nail down. I had one which was crashing on NSArray's containsObject: function, and could not reproduce it myself, or so I thought.
I did the following to reproduce the bug.
Went to Product -> Scheme -> Edit Scheme...
Clicked on the "Info" tab for my standard debug scheme
Changed the build configuration from "Debug" to "Release"
Rebuilt and ran the project
In some cases, this is not enough to reproduce a release crash. I did the next steps to reproduce it.
Unchecked the "Debug Executable" within that earlier Info tab on the scheme
Cleaned my project and build folder (Command-Shift-K and Command-Alt-Shift-K respectively)
Rebuilt and ran the project
Here is what it would look like on my configuration if I needed to do the same thing.
Once you are able to reproduce the crash (hopefully you can reproduce with logs), try your usual debugging methods to see where it is crashing. Play a sound when something executes, comment out lines, etc.
I unfortunately can't know your exact crash, though this method above helped me reproduce an issue 90% of our users were having and I wasn't, simply because I was building on debug before.
Recently we have received a crash on one of our application with the following stack trace:
0 libobjc.A.dylib 0x00000001806c1bd0 objc_msgSend + 12
1 CoreFoundation 0x0000000180f72d90 -[NSInvocation retainArguments] + 208
2 Foundation 0x00000001819e86b4 -[NSInvocationOperation initWithInvocation:] + 72
3 Foundation 0x00000001819e85c8 -[NSInvocationOperation initWithTarget:selector:object:] + 216
4 MyApp 0x0000000100054500 -[KrollObject forgetKeylessKrollObject:] (KrollObject.m:1079)
5 MyApp 0x00000001000a1cac -[TiProxy forgetProxy:] (TiProxy.m:725)
6 MyApp 0x000000010005b070 -[TiViewProxy remove:] (TiViewProxy.m:261)
7 MyApp 0x00000001000ba294 __TiThreadPerformOnMainThread_block_invoke (TiBase.m:270)
8 MyApp 0x00000001000ba570 TiThreadProcessPendingMainThreadBlocks (TiBase.m:367)
9 libdispatch.dylib 0x0000000180a95630 _dispatch_call_block_and_release + 20
10 libdispatch.dylib 0x0000000180a955f0 _dispatch_client_callout + 12
11 libdispatch.dylib 0x0000000180a9acf8 _dispatch_main_queue_callback_4CF + 1840
12 CoreFoundation 0x0000000180ff8bb0 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 8
13 CoreFoundation 0x0000000180ff6a18 __CFRunLoopRun + 1624
14 CoreFoundation 0x0000000180f25680 CFRunLoopRunSpecific + 380
15 GraphicsServices 0x0000000182434088 GSEventRunModal + 176
16 UIKit 0x0000000185d9cd90 UIApplicationMain + 200
17 MyApp 0x000000010003c584 main (main.m:37)
Dashboard suggests that the crash has happened at forgetKeylessKrollObjject method. From the stack trace it seems that during a view removal, this indicent happened. There are many places in the code where we have added and removed view. As there is no definite place defined in the log and nor we have the test case, we went through the framework code and saw that there is no null handling inside the method as TiProxy.m --> krollObjectForBridge function can return nil.
If anyone from the community has received such report and been able to resolve it. Please do let us know as there is no way to map this stack trace back to the JavaScript code.
SDK: 3.5.0.GA
OS: iOS 9.1
I'm analyzing the following stack traces in Crashlytics. I'm unable to reproduce the issue on my phones. Below are the crashed thread. The stack traces are slightly different between 64 and 32 bit CPUs.
The only interesting piece of information is that there is another thread resizing an image in the background (there is no UI manipulation involved).
Since resizing the image could put some pressure on the phone's memory, I suspect this is a memory-related error, but I wouldn't expect to see a stack trace in that case and I also don't see any memory warning in the logs. Does that make sense? Or should I look for something completely different? Any suggestion would be helpful.
Would you have any suggestion about what could be happening there?
On iPhone 5S, iPad Air, the crash thread is as follow:
Crashed: com.apple.main-thread
EXC_BAD_ACCESS KERN_INVALID_ADDRESS at 0x00000001e256bec8
Thread : Crashed: com.apple.main-thread
0 libobjc.A.dylib 0x000000018f65a984 objc_object::release() + 8
1 libsystem_blocks.dylib 0x000000018fc5f908 _Block_release + 256
2 libdispatch.dylib 0x000000018fc17fd4 _dispatch_client_callout + 16
3 libdispatch.dylib 0x000000018fc1b1dc _dispatch_main_queue_callback_4CF + 336
4 CoreFoundation 0x00000001830f6ddc __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12
5 CoreFoundation 0x00000001830f511c __CFRunLoopRun + 1452
6 CoreFoundation 0x0000000183035dd0 CFRunLoopRunSpecific + 452
7 GraphicsServices 0x0000000188d1dc0c GSEventRunModal + 168
While executing in a high priority thread:
Thread : com.apple.root.high-priority
0 CoreGraphics 0x00000001831cef88 resample_byte_h_4cpp_armv7 + 420
1 CoreGraphics 0x00000001831cec74 resample_band + 1188
2 CoreGraphics 0x00000001831cd9b0 img_interpolate_read + 816
3 CoreGraphics 0x00000001831c94cc img_data_lock + 4440
4 CoreGraphics 0x00000001831c7944 CGSImageDataLock + 148
5 libRIP.A.dylib 0x0000000183573dec ripc_AcquireImage + 160
6 libRIP.A.dylib 0x0000000183573460 ripc_DrawImage + 624
7 CoreGraphics 0x00000001831c7674 CGContextDrawImage + 408
8 My App 0x00000001005105a4 -[UIImage(Async) scaleWithMaxSize:quality:scale:] (UIImage+Async.m:50)
9 My App 0x0000000100144244 __38-[ViewController viewDidAppear:]_block_invoke (ViewController.m:79)
10 libdispatch.dylib 0x000000018fc18014 _dispatch_call_block_and_release + 24
11 libdispatch.dylib 0x000000018fc17fd4 _dispatch_client_callout + 16
12 libdispatch.dylib 0x000000018fc1f2b8 _dispatch_root_queue_drain + 556
13 libdispatch.dylib 0x000000018fc1f4fc _dispatch_worker_thread2 + 76
14 libsystem_pthread.dylib 0x000000018fdad6bc _pthread_wqthread + 356
On iPhone 5, 4S, 4, it's slightly different
Crashed: com.apple.root.default-priority
EXC_BAD_ACCESS KERN_INVALID_ADDRESS at 0x2146c7cf
Thread : Crashed: com.apple.root.default-priority
0 libobjc.A.dylib 0x382af66a objc_release + 9
1 libsystem_blocks.dylib 0x387caac5 _Block_release + 216
2 libsystem_blocks.dylib 0x387caac5 _Block_release + 216
3 libxpc.dylib 0x388d9e71 _xpc_connection_call_reply + 32
4 libdispatch.dylib 0x3878fad7 _dispatch_root_queue_drain + 222
5 libdispatch.dylib 0x3878fd29 _dispatch_worker_thread2 + 56
6 libsystem_pthread.dylib 0x388cabd3 _pthread_wqthread + 298
also while executing in a high priority thread:
Thread : com.apple.root.high-priority
0 CoreGraphics 0x2d6749e6 resample_byte_h_4cpp_armv7 + 117
1 ??? 0x00000002
2 CoreGraphics 0x2d67487d resample_band + 884
3 CoreGraphics 0x2d673a47 img_interpolate_read + 562
4 CoreGraphics 0x2d6701d3 img_data_lock + 4514
5 CoreGraphics 0x2d66e82d CGSImageDataLock + 88
6 libRIP.A.dylib 0x2d9bae67 ripc_AcquireImage + 98
7 libRIP.A.dylib 0x2d9ba20d ripc_DrawImage + 588
8 CoreGraphics 0x2d66e743 CGContextDelegateDrawImage + 50
9 CoreGraphics 0x2d66e5d9 CGContextDrawImage + 284
10 My App 0x0050f469 -[UIImage(Async) scaleWithMaxSize:quality:scale:] (UIImage+Async.m:50)
11 My App 0x00153fc7 __38-[ViewController viewDidAppear:]_block_invoke (ViewController.m:79)
12 libdispatch.dylib 0x38788833 _dispatch_call_block_and_release + 10
13 libdispatch.dylib 0x3878fad7 _dispatch_root_queue_drain + 222
14 libdispatch.dylib 0x3878fd29 _dispatch_worker_thread2 + 56
15 libsystem_pthread.dylib 0x388cabd3 _pthread_wqthread + 298
I'm using a UIWebview to play YouTube video on my iOS app, after iOS 7.1 release, I got lots of following crash report:
Exception Type: EXC_CRASH (SIGSEGV)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Triggered by Thread: 1
Thread 0:
0 libobjc.A.dylib 0x393dd637 objc_msgSend + 23
1 Foundation 0x2f563d57 +[NSConcreteNotification newTempNotificationWithName:object:userInfo:] + 119
2 Foundation 0x2f563ca9 -[NSNotificationCenter postNotificationName:object:userInfo:] + 45
3 Foundation 0x2f5685c3 -[NSNotificationCenter postNotificationName:object:] + 27
4 MediaPlayer 0x2feb17b9 __53-[MPAVItem _playerItemNewAccessLogEntryNotification:]_block_invoke + 69
5 libdispatch.dylib 0x398bcd51 _dispatch_call_block_and_release + 9
6 libdispatch.dylib 0x398bcd3d _dispatch_client_callout + 21
7 libdispatch.dylib 0x398bf6bf _dispatch_main_queue_callback_4CF + 275
8 CoreFoundation 0x2ec0d675 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 5
9 CoreFoundation 0x2ec0bf41 __CFRunLoopRun + 1305
10 CoreFoundation 0x2eb767a5 CFRunLoopRunSpecific + 521
11 CoreFoundation 0x2eb76587 CFRunLoopRunInMode + 103
12 GraphicsServices 0x33ad36cf GSEventRunModal + 135
13 UIKit 0x314d588d UIApplicationMain + 1133
14 myApp 0x000eb679 0xe7000 + 18041
15 myApp 0x000eb5c4 0xe7000 + 17860
Thread 1 Crashed:
0 libsystem_kernel.dylib 0x39975804 kevent64 + 24
1 libdispatch.dylib 0x398c4051 _dispatch_mgr_invoke + 229
2 libdispatch.dylib 0x398be2df _dispatch_mgr_thread + 35
Maybe the OS is trying to post a notification to an object that doesn't exist anymore. I didn't use MBAVItem directly, so it should be called while UIWebview is playing YouTube video. According iTunes connect, this crash just happened on iOS 7.1 (at least for now) and become the most frequent crash.
I used to create new YouTube HTML player for each song, and this crash happens after playing 5 - 10 songs.
After doing some experiments, this crash can be avoided by loading different songs with same YouTube HTML player (don't create a new one, just call loadVideoById()), hope this answer can help someone =)
I only replace the video files in my existing code, but if i replace all the video files my application will crash in iphone. it is an universal application but Ipad support all the new video files and crash on iphone. the following warning occur:
[NSCFType setLength:]: unrecognized selector sent to instance
0x19d790 2012-02-29 15:13:49.932[584:307] * Terminating app due to
uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFType
setLength:]: unrecognized selector sent to instance 0x19d790'
* Call stack at first throw: ( 0 CoreFoundation 0x3759dc7b __exceptionPreprocess + 114 1 libobjc.A.dylib
0x32d9bee8 objc_exception_throw + 40 2 CoreFoundation
0x3759f3e3 -[NSObject(NSObject) doesNotRecognizeSelector:] + 98 3
CoreFoundation 0x37544467 __forwarding + 506
4 CoreFoundation 0x37544220
_CF_forwarding_prep_0 + 48 5 Visionaries 0x00005179 -[Visionaries_ViewController
connection:didReceiveResponse:] + 56 6 Foundation
0x35183cd5 -[NSURLConnection(NSURLConnectionReallyInternal)
sendDidReceiveResponse:] + 92 7 Foundation
0x35183c3b _NSURLConnectionDidReceiveResponse + 86 8 CFNetwork
0x302941b4
_ZN19URLConnectionClient29_clientSendDidReceiveResponseEP14_CFURLResponsePNS_26ClientConnectionEventQueueE
+ 64 9 CFNetwork 0x30284bc8 _ZN19URLConnectionClient26ClientConnectionEventQueue33processAllEventsAndConsumePayloadEP20XConnectionEventInfoI12XClientEvent18XClientEventParamsEl
+ 332 10 CFNetwork 0x30284d84 _ZN19URLConnectionClient26ClientConnectionEventQueue33processAllEventsAndConsumePayloadEP20XConnectionEventInfoI12XClientEvent18XClientEventParamsEl
+ 776 11 CFNetwork 0x30284984 _ZN19URLConnectionClient13processEventsEv + 100 12 CFNetwork 0x3028484c _ZN17MultiplexerSource7performEv + 192 13 CFNetwork
0x30284788 _ZN17MultiplexerSource8_performEPv + 12 14 CoreFoundation
0x375518d1 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION
+ 14 15 CoreFoundation 0x37521ecd __CFRunLoopDoSources0 + 384 16 CoreFoundation 0x375216f9 __CFRunLoopRun + 264 17 CoreFoundation
0x3752150b CFRunLoopRunSpecific + 226 18 CoreFoundation
0x37521419 CFRunLoopRunInMode + 60 19 GraphicsServices
0x33e76d24 GSEventRunModal + 196 20 UIKit
0x3591d57c -[UIApplication _run] + 588 21 UIKit
0x3591a558 UIApplicationMain + 972 22 Visionaries
0x00002391 main + 80 23 Visionaries
0x0000233c start + 40 ) terminate called after throwing an instance of
'NSException'
Somebody has an idea, please help.
By the crash log we see that, inside -[Visionaries_ViewController connection:didReceiveResponse:], you are calling the method setLength: on an object that does not have that method.
Can be a memory or logic problem. Please provide more info.