ios15,WKWebView,UITextField crash - ios15

iOS15 system:
1.click UITextField crash
2.Click the second layer WebView to crash
log:
Incident Identifier: 4F61CB1C-53DB-4EFD-B38F-93B973BE5CCC
CrashReporter Key: 6fa29e4a6b7c708a032c474dff75ab04a89a6a5e Hardware
Model: iPhone12,5 Process: AppName [2986] Path:
/private/var/containers/Bundle/Application/***/AppName.app/AppName
Identifier: com.***** Version: 8.0.0 (1) Code Type: ARM-64 (Native)
Role: Foreground Parent Process: launchd [1] Coalition: com.*****
[1262] Date/Time: 2022-01-28 16:14:58.8262 +0800 Launch Time:
2022-01-28 16:14:41.9927 +0800 OS Version: iPhone OS 15.2.1 (19C63)
Release Type: User Baseband Version: 3.01.02 Report Version: 104
Exception Type: EXC_BREAKPOINT (SIGTRAP) Exception Codes:
0x0000000000000001, 0x00000001812e01ec Exception Note:
EXC_CORPSE_NOTIFY Termination Reason: SIGNAL 5 Trace/BPT trap: 5
Terminating Process: 888 handler [2986] Triggered by Thread: 0 Thread
0 name: Dispatch queue: com.apple.main-thread Thread 0 Crashed: 0
CoreFoundation 0x1812e01ec __NSI0 + 748 1 CoreFoundation 0x181333ad4
-[NSInvocation getArgument:atIndex:] + 148 2 Foundation 0x182b4f0dc _NSGetValueWithMethod + 220 3 Foundation 0x182b0ab2c -[NSObject(NSKeyValueCoding) valueForKey:] + 320 4 AccessibilityUtilities 0x196f8787c
__57-[NSObject(UIAccessibilitySafeCategory) safeValueForKey:]_block_invoke + 40 5 AccessibilityUtilities
0x196f87640 -[NSObject(UIAccessibilitySafeCategory)
_accessibilityPerformSafeValueKeyBlock:withKey:onClass:] + 96 6 AccessibilityUtilities 0x196f879a4
-[NSObject(UIAccessibilitySafeCategory) safeValueForKey:] + 240 7 UIKit 0x1f2042e38 -[UIViewControllerAccessibility
_accessibilityLoadAccessibilityInformation] + 144 8 UIAccessibility 0x198c430e0 -[UIAccessibilityInformationLoader
_loadAccessibilityInformationOnMainThread:] + 828 9 Foundation 0x182b15780 __NSFireTimer + 104 10 CoreFoundation 0x18136e318
[CFRUN IS_CALLING_OUT_TO A_TIMER_CALLBACK_FUNCTION] + 32 11
CoreFoundation 0x1812f2cf0 __CFRunLoopDoTimer + 1076 12
CoreFoundation 0x1812ed4ec __CFRunLoopDoTimers + 328 13
CoreFoundation 0x1812cbd08 __CFRunLoopRun + 1944 14 CoreFoundation
0x1812df468 CFRunLoopRunSpecific + 600 15 GraphicsServices
0x19ce6a38c GSEventRunModal + 164 16 UIKitCore 0x183c81088
-[UIApplication _run] + 1100 17 UIKitCore 0x1839ff958 UIApplicationMain + 2092 18 AppName 0x10060fed0 main + 352 19 dyld
0x105151aa4 start + 520 .......

问题在avoidCrash中,
[AvoidCrash makeAllEffective];改成[AvoidCrash becomeEffective];不再全局捕获
发现崩溃在avoidCrashMethodSignatureForSelector:
这个方法里转发底层方法_navigationControllerContentInsetAdjustment时候崩溃

Related

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFType pointSize]

when I want to generate a canvas on node this error is displayed and I don't know how to fix the problem.
2022-11-28 15:16:20.203 node[72232:1100211] -[__NSCFType pointSize]: unrecognized selector sent to instance 0x6000005e34e0
2022-11-28 15:16:20.210 node[72232:1100211] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFType pointSize]: unrecognized selector sent to instance 0x6000005e34e0'
*** First throw call stack:
(
0 CoreFoundation 0x00007ff80ea337c3 __exceptionPreprocess + 242
1 libobjc.A.dylib 0x00007ff80e793bc3 objc_exception_throw + 48
2 CoreFoundation 0x00007ff80eab836b -[NSObject(NSObject) __retain_OA] + 0
3 CoreFoundation 0x00007ff80e99a515 ___forwarding___ + 1356
4 CoreFoundation 0x00007ff80e999f38 _CF_forwarding_prep_0 + 120
5 UIFoundation 0x00007ff81224426c +[NSFont initialize] + 381
6 libobjc.A.dylib 0x00007ff80e7864e5 CALLING_SOME_+initialize_METHOD + 17
7 libobjc.A.dylib 0x00007ff80e7861ee initializeNonMetaClass + 736
8 libobjc.A.dylib 0x00007ff80e785f6a initializeNonMetaClass + 92
9 libobjc.A.dylib 0x00007ff80e785f6a initializeNonMetaClass + 92
10 libobjc.A.dylib 0x00007ff80e785c18 _ZL24initializeAndMaybeRelockP10objc_classP11objc_objectR8mutex_ttILb0EEb + 232
11 libobjc.A.dylib 0x00007ff80e785995 lookUpImpOrForward + 1087
12 libobjc.A.dylib 0x00007ff80e78853d object_setClass + 88
13 CoreFoundation 0x00007ff80e93bd78 _CFRuntimeCreateInstance + 544
14 CoreText 0x00007ff810026f23 _Z11TCFBase_NEWI6CTFontJPK18__CTFontDescriptorRdRPK17CGAffineTransformRS3_EE6TCFRefIPT_EDpOT0_ + 43
15 CoreText 0x00007ff810026e1e CTFontCreateWithFontDescriptor + 108
16 libpangocairo-1.0.0.dylib 0x000000014572e9a2 _pango_cairo_core_text_font_new + 96
17 libpangocairo-1.0.0.dylib 0x000000014572d963 pango_core_text_font_map_new_font + 143
18 libpangocairo-1.0.0.dylib 0x000000014572d6a7 pango_core_text_fontset_new + 417
19 libpangocairo-1.0.0.dylib 0x000000014572d173 pango_core_text_font_map_load_fontset + 126
20 libpango-1.0.0.dylib 0x000000014585441d pango_itemize_with_font + 1249
21 libpango-1.0.0.dylib 0x000000014585f0d3 pango_layout_check_lines + 828
22 libpango-1.0.0.dylib 0x0000000145861993 pango_layout_get_line + 27
23 canvas.node 0x00000001456d16ca _ZN9Context2d11setTextPathEdd + 154
24 canvas.node 0x00000001456d14e0 _Z9paintTextRKN3Nan20FunctionCallbackInfoIN2v85ValueEEEb + 928
25 canvas.node 0x00000001456adfad _ZN3Nan3impL23FunctionCallbackWrapperERKN2v820FunctionCallbackInfoINS1_5ValueEEE + 189
26 node 0x00000001034d7589 _ZN2v88internal25FunctionCallbackArguments4CallENS0_15CallHandlerInfoE + 265
27 node 0x00000001034d7056 _ZN2v88internal12_GLOBAL__N_119HandleApiCallHelperILb0EEENS0_11MaybeHandleINS0_6ObjectEEEPNS0_7IsolateENS0_6HandleINS0_10HeapObjectEEESA_NS8_INS0_20FunctionTemplateInfoEEENS8_IS4_EENS0_16BuiltinArgumentsE + 550
28 node 0x00000001034d67cf _ZN2v88internal21Builtin_HandleApiCallEiPmPNS0_7IsolateE + 255
29 node 0x0000000103d4b439 Builtins_CEntry_Return1_DontSaveFPRegs_ArgvOnStack_BuiltinExit + 57
30 node 0x0000000103cdde2a Builtins_InterpreterEntryTrampoline + 202
)
libc++abi: terminating with uncaught exception of type NSException
node version: 16;17.1
I tried to change the version of node, to reinstall the canvas package, it did not change anything.

Python get segmentation fault after update macos to 10.15.5

I use python3.8.3 for work and after update MAC OS X to 10.15.5 python3 crushed with a segfault
I tried to update OpenSSL macOS Catalina: Python Quit unexpectedly error but it didn't help
See error below
Process: Python [27175]
Path: /Library/Frameworks/Python.framework/Versions/3.8/Resources/Python.app/Contents/MacOS/Python
Identifier: Python
Version: 3.8.3 (3.8.3)
Code Type: X86-64 (Native)
Parent Process: zsh [24697]
Responsible: pycharm [8636]
User ID: 501
Date/Time: 2020-06-01 13:42:23.958 +0300
OS Version: Mac OS X 10.15.5 (19F96)
Report Version: 12
Bridge OS Version: 4.5 (17P5290)
Anonymous UUID: 5797C183-EB8E-7120-EC7D-EC0F2C1BF8E7
Sleep/Wake UUID: 986C6236-FC1E-46A9-BFBC-76EA8B17CB65
Time Awake Since Boot: 110000 seconds
Time Since Wake: 32000 seconds
System Integrity Protection: enabled
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Termination Signal: Segmentation fault: 11
Termination Reason: Namespace SIGNAL, Code 0xb
Terminating Process: exc handler [27175]
VM Regions Near 0:
-->
__TEXT 000000010b324000-000000010b325000 [ 4K] r-x/rwx SM=COW /Library/Frameworks/Python.framework/Versions/3.8/Resources/Python.app/Contents/MacOS/Python
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystem_platform.dylib 0x00007fff6cde3e52 _platform_strlen + 18
1 etree.cpython-38-darwin.so 0x000000010c2d3e9f __pyx_f_4lxml_5etree_funicode + 15
2 etree.cpython-38-darwin.so 0x000000010c392c03 __pyx_f_4lxml_5etree_8iterwalk__start_node + 195
3 etree.cpython-38-darwin.so 0x000000010c390f00 __pyx_pw_4lxml_5etree_8iterwalk_5__next__ + 1856
4 etree.cpython-38-darwin.so 0x000000010c2fdcc1 __pyx_f_4lxml_5etree__tree_to_target + 3537
5 etree.cpython-38-darwin.so 0x000000010c3d5445 __pyx_pw_4lxml_5etree_33tostring + 4229
6 org.python.python 0x000000010b351565 _PyObject_MakeTpCall + 373
7 org.python.python 0x000000010b41fca5 call_function + 533
8 org.python.python 0x000000010b41cbd8 _PyEval_EvalFrameDefault + 25976
9 org.python.python 0x000000010b420a94 _PyEval_EvalCodeWithName + 2804
10 org.python.python 0x000000010b35204e _PyFunction_Vectorcall + 270
11 org.python.python 0x000000010b41fc4c call_function + 444
12 org.python.python 0x000000010b41cb45 _PyEval_EvalFrameDefault + 25829
13 org.python.python 0x000000010b420a94 _PyEval_EvalCodeWithName + 2804
14 org.python.python 0x000000010b35204e _PyFunction_Vectorcall + 270
15 org.python.python 0x000000010b41fc4c call_function + 444
16 org.python.python 0x000000010b41cbd8 _PyEval_EvalFrameDefault + 25976
17 org.python.python 0x000000010b36222e gen_send_ex + 206
18 _asyncio.cpython-38-darwin.so 0x000000010baa7ed1 task_step + 865
19 _asyncio.cpython-38-darwin.so 0x000000010baa7aee TaskWakeupMethWrapper_call + 430
20 org.python.python 0x000000010b351565 _PyObject_MakeTpCall + 373
21 org.python.python 0x000000010b43c7cd context_run + 253
22 org.python.python 0x000000010b38df64 cfunction_vectorcall_FASTCALL_KEYWORDS + 132
.......

Core Data, NSPredicate causes NSInvalidArgumentException

I am calling this code on a background thread.
backgroundContext.performAndWait {
let fetchRequest:NSFetchRequest<BlogPost> = BlogPost.fetchRequest()
fetchRequest.predicate = NSPredicate.init(format: "postid=%#", argumentArray: [someInt64Value]) // this line creates an exception
_ = try? fetchRequest.execute()
....
}
If I remove the predicate, it works fine. The same predicate works just fine if used inside a fetchResultController. postid is Int64 but if I changed the predicate to any other key it would give the same NSInvalidArgumentException
This is very similar to Core Data Error - NSDate localizedCaseInsensitiveCompare: unrecognised selector sent to instance
2016-10-11 21:58:13.918 BlogClient[44494:13192129] -[_SwiftValue longLongValue]: unrecognized selector sent to instance 0x618000243cc0
2016-10-11 21:58:13.922 BlogClient[44494:13192129] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[_SwiftValue longLongValue]: unrecognized selector sent to instance 0x618000243cc0'
*** First throw call stack:
(
0 CoreFoundation 0x000000010f59534b __exceptionPreprocess + 171
1 libobjc.A.dylib 0x000000010ebd921e objc_exception_throw + 48
2 CoreFoundation 0x000000010f604f34 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132
3 CoreFoundation 0x000000010f51ac15 ___forwarding___ + 1013
4 CoreFoundation 0x000000010f51a798 _CF_forwarding_prep_0 + 120
5 CoreData 0x000000010f09762e -[NSSQLiteConnection execute] + 2270
6 CoreData 0x000000010f0aeaba newFetchedRowsForFetchPlan_MT + 1658
7 CoreData 0x000000010f274467 _executeFetchRequest + 55
8 CoreData 0x000000010f1f3be5 -[NSSQLFetchRequestContext executeRequestUsingConnection:] + 53
9 CoreData 0x000000010f220eb7 __52-[NSSQLDefaultConnectionManager handleStoreRequest:]_block_invoke + 215
10 libdispatch.dylib 0x0000000112b8b0cd _dispatch_client_callout + 8
11 libdispatch.dylib 0x0000000112b6830a _dispatch_barrier_sync_f_invoke + 340
12 CoreData 0x000000010f220d8c -[NSSQLDefaultConnectionManager handleStoreRequest:] + 236
13 CoreData 0x000000010f22861f -[NSSQLCoreDispatchManager routeStoreRequest:] + 351
14 CoreData 0x000000010f1ab7d9 -[NSSQLCore dispatchRequest:withRetries:] + 233
15 CoreData 0x000000010f1a711d -[NSSQLCore processFetchRequest:inContext:] + 93
16 CoreData 0x000000010f09dcf8 -[NSSQLCore executeRequest:withContext:error:] + 568
17 CoreData 0x000000010f191b79 __65-[NSPersistentStoreCoordinator executeRequest:withContext:error:]_block_invoke + 5609
18 CoreData 0x000000010f189966 -[NSPersistentStoreCoordinator _routeHeavyweightBlock:] + 390
19 CoreData 0x000000010f09d87e -[NSPersistentStoreCoordinator executeRequest:withContext:error:] + 654
20 CoreData 0x000000010f09be24 -[NSManagedObjectContext executeFetchRequest:error:] + 548
21 CoreData 0x000000010f0e154f -[NSManagedObjectContext(_NestedContextSupport) _parentObjectsForFetchRequest:inContext:error:] + 431
22 CoreData 0x000000010f1626b3 __82-[NSManagedObjectContext(_NestedContextSupport) executeRequest:withContext:error:]_block_invoke + 611
23 CoreData 0x000000010f0e133d internalBlockToNSManagedObjectContextPerform + 93
24 libdispatch.dylib 0x0000000112b8b0cd _dispatch_client_callout + 8
25 libdispatch.dylib 0x0000000112b6d5e5 _dispatch_barrier_sync_f_slow_invoke + 617
26 libdispatch.dylib 0x0000000112b8b0cd _dispatch_client_callout + 8
27 libdispatch.dylib 0x0000000112b6b8d6 _dispatch_main_queue_callback_4CF + 406
28 CoreFoundation 0x000000010f5594f9 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
29 CoreFoundation 0x000000010f51ef8d __CFRunLoopRun + 2205
30 CoreFoundation 0x000000010f51e494 CFRunLoopRunSpecific + 420
31 GraphicsServices 0x0000000113b72a6f GSEventRunModal + 161
32 UIKit 0x000000010f9b8f34 UIApplicationMain + 159
33 BlogClient 0x000000010e5a8bdf main + 111
34 libdyld.dylib 0x0000000112bd768d start + 1
35 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
I found the issue. Passing an Int64 confuses the argumentArray, casting it to Int fixes the issue.
This seems to be a bug in NSPredicate() filed as radar 28749194
let id:Int64 = 5785905063264256 // Making this Int works
#objc class Test:NSObject {
let postid = id
}
let predicate = NSPredicate(format: "postid == %#"
, argumentArray: [id])
let mytest = Test()
predicate.evaluate(with: mytest) //false but should be true

Why would app try to save to PLSharedManagedObjectContext?

The following is a crash report I received from my crash reporting service, HockeyApp. The reason for the failure is a failure to save in PLSharedManagedObjectContext. I (think) I am doing all of my saves in the main app delegate managedObjectContext. Why is the PLSharedManagedObjectContext the one being saved to?
I think this is the relevant code:
-(void) imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
{
__ENTERING_METHOD__
DLog(#"info:%#",info);
NSURL *assetURL = [info objectForKey:UIImagePickerControllerReferenceURL];
__block UIImage *originalImage = [info objectForKey:UIImagePickerControllerOriginalImage];
CGSize cropSize = CGSizeMake(320,320);
CGFloat previewWindowHeight = 100.0f;
ALAssetsLibrary *library = [[ALAssetsLibrary alloc] init];
__block UIImage *previewImage;
if (originalImage) {
DLog(#"WE DO HAVE AN ORIGINAL IMAGE");
}
else {
DLog(#"WE DO NOT HAVE AN ORIGINAL IMAGE");
}
ImageEditor *imageEditor = [[ImageEditor alloc] initWithNibName:nil bundle:nil];
[imageEditor setRotateEnabled:NO];
[imageEditor setCheckBounds:NO];
[imageEditor setSourceImage:originalImage];
[imageEditor setPreviewHeight1:[NSNumber numberWithDouble:previewWindowHeight]];
[imageEditor setCropSize:cropSize];
imageEditor.doneCallback = ^(UIImage *editedImage, UIImage *originalImageMax1024, BOOL canceled){
picker.delegate = nil;
if(!canceled) {
if (editedImage) {
UIImage *scaledThumbnail = [HFImageEditorViewController getThumbnailForImage:editedImage size:CGSizeMake(PERSON_THUMBNAIL_SIZE,PERSON_THUMBNAIL_SIZE) round:PERSON_THUMBNAIL_ROUND];
[self setObjectCroppedImage:editedImage thumbnail:scaledThumbnail updateHeaderView:YES mocSave:NO];
[self setObjectMainImage:originalImageMax1024 mocSave:NO];
[Helper mocSave];
self.imageToShow = originalImage;
}
}
[Helper controller:self dismissControllerModal:YES];
};
[library assetForURL:assetURL resultBlock:^(ALAsset *asset) {
if (!originalImage) {
originalImage = [UIImage imageWithCGImage:[[asset defaultRepresentation] fullResolutionImage]];
}
[imageEditor setSourceImage:originalImage];
previewImage = [UIImage imageWithCGImage:[asset aspectRatioThumbnail]];
[imageEditor setPreviewImage:previewImage];
[imageEditor reset:NO];
//DLog(#"originalImage.imageOrientation:%d",originalImage.imageOrientation);
[picker pushViewController:imageEditor animated:YES];
} failureBlock:^(NSError *error) {
DLog(#"Failed to get asset from library");
if (originalImage) {
[imageEditor setSourceImage:originalImage];
[imageEditor setPreviewImage:nil];
[imageEditor reset:NO];
[picker pushViewController:imageEditor animated:YES];
}
else {
[Helper showSimpleAlertWithTitle:NSLocalizedString(#"Image Could Not Be Set", #"Image Could Not Be Set") message:NSLocalizedString(#"Failed to retrieve selected image asset from the Library.", #"Failed to retrieve selected image asset from the Library.")];
[Helper controller:self dismissControllerModal:YES];
}
}];
}
This is the crash log I am receiving:
Incident Identifier: 4DD4FE03-B8D4-4625-9039-64E4EE725AAB
CrashReporter Key: 129951E7-CF2A-4BB0-A8AB-7BA954275E29
Hardware Model: iPhone5,2
Process: MyApp [144]
Path: /Users/USER/MyApp.app/MyApp
Identifier: com.myCom.myApp
Version: 1.5.1
Code Type: ARM
Parent Process: launchd [1]
Date/Time: 2013-11-23 12:15:43 +0000
OS Version: iPhone OS 7.0.4 (11B554a)
Report Version: 104
Exception Type: SIGABRT
Exception Codes: #0 at 0x3a9031fc
Crashed Thread: 0
Application Specific Information:
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Failed to save context <PLSharedManagedObjectContext: 0x157b6110>: Error Domain=NSCocoaErrorDomain Code=134030 "The operation couldn’t be completed. (Cocoa error 134030.)" (null)'
Last Exception Backtrace:
0 CoreFoundation 0x2fff6e83 __exceptionPreprocess + 131
1 libobjc.A.dylib 0x3a3536c7 objc_exception_throw + 38
2 PhotoLibraryServices 0x3667441d __copy_helper_block_279 + 1
3 CoreData 0x2fdd1855 developerSubmittedBlockToNSManagedObjectContextPerform + 89
4 libdispatch.dylib 0x3a8380af _dispatch_client_callout + 23
5 libdispatch.dylib 0x3a83a9a9 _dispatch_main_queue_callback_4CF + 268
6 CoreFoundation 0x2ffc15b1 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
7 CoreFoundation 0x2ffbfe7d __CFRunLoopRun + 1309
8 CoreFoundation 0x2ff2a471 CFRunLoopRunSpecific + 524
9 CoreFoundation 0x2ff2a253 CFRunLoopRunInMode + 106
10 GraphicsServices 0x34c642eb GSEventRunModal + 138
11 UIKit 0x327df845 UIApplicationMain + 1136
12 MyApp 0x0005b10b main (main.m:5)
13 libdyld.dylib 0x3a84cab7 start + 3
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x3a9031fc __pthread_kill + 8
1 libsystem_c.dylib 0x3a8b402d abort + 76
2 MyApp 0x002235c7 uncaught_exception_handler + 27
3 CoreFoundation 0x2fff7185 __handleUncaughtException + 581
4 libobjc.A.dylib 0x3a353927 _objc_terminate() + 175
5 libc++abi.dylib 0x39d191b3 std::__terminate(void (*)()) + 79
6 libc++abi.dylib 0x39d18a09 __cxxabiv1::exception_cleanup_func(_Unwind_Reason_Code, _Unwind_Exception*) + 1
7 libobjc.A.dylib 0x3a35379b objc_exception_throw + 250
8 PhotoLibraryServices 0x3667441d __copy_helper_block_279 + 1
9 CoreData 0x2fdd1855 developerSubmittedBlockToNSManagedObjectContextPerform + 89
10 libdispatch.dylib 0x3a8380af _dispatch_client_callout + 23
11 libdispatch.dylib 0x3a83a9a9 _dispatch_main_queue_callback_4CF + 268
12 CoreFoundation 0x2ffc15b1 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
13 CoreFoundation 0x2ffbfe7d __CFRunLoopRun + 1309
14 CoreFoundation 0x2ff2a471 CFRunLoopRunSpecific + 524
15 CoreFoundation 0x2ff2a253 CFRunLoopRunInMode + 106
16 GraphicsServices 0x34c642eb GSEventRunModal + 138
17 UIKit 0x327df845 UIApplicationMain + 1136
18 MyApp 0x0005b10b main (main.m:5)
19 libdyld.dylib 0x3a84cab7 start + 3
Thread 1:
0 libsystem_kernel.dylib 0x3a8f0838 kevent64 + 24
1 libdispatch.dylib 0x3a839623 _dispatch_mgr_thread + 39
Thread 2:
0 libsystem_kernel.dylib 0x3a8f0a84 mach_msg_trap + 20
1 CoreFoundation 0x2ffc1559 __CFRunLoopServiceMachPort + 157
2 CoreFoundation 0x2ffbfc79 __CFRunLoopRun + 793
3 CoreFoundation 0x2ff2a471 CFRunLoopRunSpecific + 524
4 CoreFoundation 0x2ff6e0db CFRunLoopRun + 98
5 CoreMotion 0x305e2369 CLSF_thorntonUpdate_6x6 + 57225
6 libsystem_pthread.dylib 0x3a969c5d _pthread_body + 141
7 libsystem_pthread.dylib 0x3a969bcf _pthread_start + 102
8 libsystem_pthread.dylib 0x3a967cd0 thread_start + 8
Thread 3:
0 libsystem_kernel.dylib 0x3a903c7c __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x3a967cc4 start_wqthread + 8
Thread 4:
0 libsystem_kernel.dylib 0x3a903c7c __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x3a967cc4 start_wqthread + 8
Thread 5:
0 libsystem_kernel.dylib 0x3a8f0a84 mach_msg_trap + 20
1 CoreFoundation 0x2ffc1559 __CFRunLoopServiceMachPort + 157
2 CoreFoundation 0x2ffbfc79 __CFRunLoopRun + 793
3 CoreFoundation 0x2ff2a471 CFRunLoopRunSpecific + 524
4 CoreFoundation 0x2ff2a253 CFRunLoopRunInMode + 106
5 Foundation 0x309654c1 +[NSURLConnection _resourceLoadLoop:] + 320
6 Foundation 0x309dac37 __NSThread__main__ + 1063
7 libsystem_pthread.dylib 0x3a969c5d _pthread_body + 141
8 libsystem_pthread.dylib 0x3a969bcf _pthread_start + 102
9 libsystem_pthread.dylib 0x3a967cd0 thread_start + 8
Thread 6:
0 libsystem_kernel.dylib 0x3a903440 __select + 20
1 libsystem_pthread.dylib 0x3a969c5d _pthread_body + 141
2 libsystem_pthread.dylib 0x3a969bcf _pthread_start + 102
3 libsystem_pthread.dylib 0x3a967cd0 thread_start + 8
Thread 7:
0 libsystem_kernel.dylib 0x3a903c7c __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x3a967cc4 start_wqthread + 8
Thread 8:
0 libsystem_kernel.dylib 0x3a8f0ad4 semaphore_wait_trap + 8
1 MediaToolbox 0x31419a0f fpa_AsyncMovieControlThread + 1755
2 CoreMedia 0x30556217 figThreadMain + 195
3 libsystem_pthread.dylib 0x3a969c5d _pthread_body + 141
4 libsystem_pthread.dylib 0x3a969bcf _pthread_start + 102
5 libsystem_pthread.dylib 0x3a967cd0 thread_start + 8
Thread 9:
0 libsystem_kernel.dylib 0x3a903c7c __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x3a967cc4 start_wqthread + 8
Thread 0 crashed with ARM Thread State:
pc: 0x3a9031fc r7: 0x27dae3a4 sp: 0x27dae398 r0: 0x00000000
r1: 0x00000000 r2: 0x00000000 r3: 0xffffffff r4: 0x00000006
r5: 0x3c73018c r6: 0x15734ff0 r8: 0x32d7cdb2 r9: 0x3c730e30
r10: 0x32d62122 r11: 0x0000000e ip: 0x00000148 lr: 0x3a96aa53
cpsr: 0x00000010
EDIT: I think this code in ImageEditor may have something to do with it:
- (IBAction)doneAction:(id)sender
{
__ENTERING_METHOD__
self.view.userInteractionEnabled = NO;
[self startTransformHook];
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
CGImageRef resultRef = [HFImageEditorViewController newTransformedImage:self.imageView.transform sourceImage:self.sourceImage.CGImage sourceSize:self.sourceImage.size sourceOrientation:self.sourceImage.imageOrientation outputWidth:self.outputWidth ? self.outputWidth : self.sourceImage.size.width cropSize:self.cropSize imageViewSize:self.imageView.bounds.size];
dispatch_async(dispatch_get_main_queue(), ^{
UIImage *transform = [UIImage imageWithCGImage:resultRef scale:1.0 orientation:UIImageOrientationUp];
CGImageRelease(resultRef);
UIImage *scaledThumbnail = [HFImageEditorViewController getThumbnailForImage:transform size:_thumbnailSize round:_thumbnailRound];
self.view.userInteractionEnabled = YES;
if(self.doneCallback) {
self.doneCallback(transform, _sourceImage, NO);
}
[self endTransformHook];
});
});
}
+ (UIImage*)getThumbnailForImage:(UIImage*)mySourceImage size:(CGSize)size round:(BOOL)round {
//TODO THIS SHOULD BE MOVED TO THE BACKGROUND
UIImage *scaledImage = [HFImageEditorViewController scaledImage:mySourceImage toSize:size withQuality:kCGInterpolationHigh];
if (round) {
CALayer *imageLayer = [CALayer layer];
imageLayer.frame = CGRectMake(0, 0, scaledImage.size.width, scaledImage.size.height);
imageLayer.contents = (id) scaledImage.CGImage;
imageLayer.masksToBounds = YES;
imageLayer.cornerRadius = scaledImage.size.width/2;
UIGraphicsBeginImageContext(scaledImage.size);
[imageLayer renderInContext:UIGraphicsGetCurrentContext()];
scaledImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
}
return scaledImage;
}
PLSharedManagedObjectContext appears to be an undocumented class that's part of PhotoLibraryServices.framework. That framework is itself undocumented, but the fact that it shows up in your backtrace implicates it.
As a result I don't think that this exception has anything really to do with your Core Data code. PhotoLibraryServices is using Core Data internally somewhere, and failing to do so. This might mean that you're doing something wrong with your photo handling, or it might be a framework bug. Either way, looking at your own Core Data code will almost certainly miss the point.
Having said that, there's also an indication that a performBlock call might have been involved somehow. Depending on what your mocSave method does, there might be a connection.

UIAlertViewStyleSecureTextInput not working with ios 7

i have a issues to use a uialertView with a TextFiled in ios 7.
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:#"title" message:nil delegate:self cancelButtonTitle:#"ok" otherButtonTitles:#"cancel", nil];
alert.alertViewStyle = UIAlertViewStyleSecureTextInput;
[[alert textFieldAtIndex:0] setKeyboardType:UIKeyboardTypeNumberPad];
[alert show];
but in new SDK of ios 7 Creasing and Cresh Can-sol like
AssertMacros: queueEntry, file: /SourceCache/IOKitUser_Sim/IOKitUser-920.1.11/hid.subproj/IOHIDEventQueue.c, line: 512
2013-09-09 10:39:51.659 Food.de[912:a0b] *** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayM objectAtIndex:]: index 2 beyond bounds [0 .. 1]'
*** First throw call stack:
(
0 CoreFoundation 0x037a16f4 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x02cc08b6 objc_exception_throw + 44
2 CoreFoundation 0x03742616 -[__NSArrayM objectAtIndex:] + 246
3 Food.de 0x0006583f -[HomeViewController addButtonToKeyboard] + 735
4 Food.de 0x00065e8e -[HomeViewController keyboardDidShow:] + 238
5 Foundation 0x02787089 __57-[NSNotificationCenter addObserver:selector:name:object:]_block_invoke + 40
6 CoreFoundation 0x037fd634 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 20
7 CoreFoundation 0x0375513b _CFXNotificationPost + 2859
8 Foundation 0x026c0de1 -[NSNotificationCenter postNotificationName:object:userInfo:] + 98
9 UIKit 0x01cb8e97 -[UIInputViewTransition postNotificationsForTransitionEnd] + 1054
10 UIKit 0x01caf4b8 __53-[UIPeripheralHost(UIKitInternal) executeTransition:]_block_invoke1329 + 455
11 UIKit 0x0188dc15 -[UIViewAnimationBlockDelegate _didEndBlockAnimation:finished:context:] + 306
12 UIKit 0x018778bc -[UIViewAnimationState sendDelegateAnimationDidStop:finished:] + 267
13 UIKit 0x01877ba4 -[UIViewAnimationState animationDidStop:finished:] + 80
14 QuartzCore 0x00cb2e84 _ZN2CA5Layer23run_animation_callbacksEPv + 304
15 libdispatch.dylib 0x0316b4b0 _dispatch_client_callout + 14
16 libdispatch.dylib 0x03159766 _dispatch_main_queue_callback_4CF + 340
17 CoreFoundation 0x03806b6e __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 14
18 CoreFoundation 0x037477eb __CFRunLoopRun + 1963
19 CoreFoundation 0x03746bf3 CFRunLoopRunSpecific + 467
20 CoreFoundation 0x03746a0b CFRunLoopRunInMode + 123
21 GraphicsServices 0x03e8fa27 GSEventRunModal + 192
22 GraphicsServices 0x03e8f84e GSEventRun + 104
23 UIKit 0x0182bf0b UIApplicationMain + 1225
24 Food.de 0x00006c1d main + 141
25 Food.de 0x00006b85 start + 53
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
if any one develop with ios 7 and know how to solve this problem then help .
.....
if alert.alertViewStyle = UIAlertViewStyleSecureTextInput;
my xcode Version 5.0 (5A11386k)
is not working with ios 7 then we use old strategy like we do for ios 5 ?
thanks .
The problem is on your HomeViewController. You have a
[__NSArrayM objectAtIndex:]: index 2 beyond bounds [0 .. 1]
This means you are trying to access an index that doesn't exists, I think on line 246

Resources