我收到了崩溃日志。似乎当UIAlertView显示时,我的应用程序崩溃了,而且它是workforme,崩溃日志就是那个
Exception Type: SIGABRT
Exception Codes: #0 at 0x30288dfc
Crashed Thread: 0
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x30288dfc __pthread_kill (in libsystem_kernel.dylib) + 8
1 libsystem_c.dylib 0x30228909 abort (in libsystem_c.dylib) + 77
2 libsystem_malloc.dylib 0x302b2331 szone_size (in libsystem_malloc.dylib) + 1
3 CoreUI 0x2811a0b7 _freeBOMFile (in CoreUI) + 35
4 CoreUI 0x28119da5 BOMFileNewFromFDWithSys (in CoreUI) + 245
5 CoreUI 0x280c8c95 _BOMFileNewFromCFReadStreamSys (in CoreUI) + 25
6 CoreUI 0x280fe6b5 __69-[_CSIRenditionBlockData expandCSIBitmapData:fromSlice:makeReadOnly:]_block_invoke (in CoreUI) + 137
7 CoreUI 0x280fe4a7 -[_CSIRenditionBlockData expandCSIBitmapData:fromSlice:makeReadOnly:] (in CoreUI) + 391
8 CoreUI 0x28102287 csiCompressImageProviderCopyImageBlockSetWithOptions (in CoreUI) + 1107
9 CoreGraphics 0x22763423 CGImageProviderCopyImageBlockSetWithOptions (in CoreGraphics) + 179
10 CoreGraphics 0x227630db img_blocks_create (in CoreGraphics) + 371
11 CoreGraphics 0x227560a5 img_data_lock (in CoreGraphics) + 1229
12 CoreGraphics 0x227553bb CGSImageDataLock (in CoreGraphics) + 95
13 libRIP.A.dylib 0x22ab27b7 ripc_AcquireImage (in libRIP.A.dylib) + 623
14 libRIP.A.dylib 0x22ab18df ripc_DrawImage (in libRIP.A.dylib) + 611
15 CoreGraphics 0x227552c1 CGContextDelegateDrawImage (in CoreGraphics) + 45
16 CoreGraphics 0x22755159 CGContextDrawImage (in CoreGraphics) + 269
17 UIKit 0x259d1453 -[UIImage drawInRect:blendMode:alpha:] (in UIKit) + 1467
18 UIKit 0x259d0e87 -[UIImage drawAtPoint:blendMode:alpha:] (in UIKit) + 99
19 UIKit 0x25a2fdf3 -[UIImage drawAtPoint:] (in UIKit) + 39
20 UIKit 0x259cf41b -[UIImageView _setImageViewContents:] (in UIKit) + 1179
21 UIKit 0x259ceaf5 +[UIView(Animation) performWithoutAnimation:] (in UIKit) + 73
22 UIKit 0x25cc0a69 -[UIImageView _updateImageViewForOldImage:newImage:] (in UIKit) + 677
23 UIKit 0x259ce507 -[UIImageView setImage:] (in UIKit) + 267
24 UIKit 0x25e254d5 -[_UIAlertControllerActionView initWithFrame:] (in UIKit) + 605
25 UIKit 0x259df275 -[UIView init] (in UIKit) + 45
26 UIKit 0x26065c27 -[_UIAlertControllerView _prepareCancelView] (in UIKit) + 67
27 UIKit 0x260653c7 -[_UIAlertControllerView _prepareViewsAndAddConstraints] (in UIKit) + 151
28 UIKit 0x25d42047 -[UIAlertController loadView] (in UIKit) + 75
29 UIKit 0x259c1f19 -[UIViewController loadViewIfRequired] (in UIKit) + 69
30 UIKit 0x259c1e9d -[UIViewController view] (in UIKit) + 25
31 UIKit 0x25ca7149 -[UIViewController _setPresentationController:] (in UIKit) + 93
32 UIKit 0x25ca2683 -[UIViewController _presentViewController:presentationController:animationController:interactionController:completion:] (in UIKit) + 767
33 UIKit 0x25ca364f -[UIViewController _presentViewController:withAnimationController:completion:] (in UIKit) + 2851
34 UIKit 0x25ca515b __62-[UIViewController presentViewController:animated:completion:]_block_invoke (in UIKit) + 259
35 UIKit 0x25aa1d93 -[UIViewController presentViewController:animated:completion:] (in UIKit) + 195
36 UIKit 0x2605fb9f -[_UIAlertControllerShimPresenterWindow presentAlertController:animated:completionBlock:] (in UIKit) + 335
37 UIKit 0x2605e757 -[_UIAlertControllerShimPresenter _presentAlertControllerAnimated:completion:] (in UIKit) + 191
38 UIKit 0x25d49377 -[UIAlertView _showAnimated:] (in UIKit) + 207
39 MyApp 0x00ff1a8b +[UIAlertView(Blocks) showConfirmationDialogWithTitle:message:cancel:confirm:handler:] (in MyApp) (UIAlertView+Blocks.m:140)
40 MyApp 0x000d8fdb -[MyAppViewController startUpdatingLocation] (in MyApp) (MyAppViewController.m:842)
41 MyApp 0x000d56f1 -[MyAppViewController viewDidAppear:] (in MyApp) (MyAppViewController.m:140)
42 UIKit 0x259d789f -[UIViewController _setViewAppearState:isAnimating:] (in UIKit) + 503
43 UIKit 0x25a841b7 -[UINavigationController viewDidAppear:] (in UIKit) + 175
44 UIKit 0x259d789f -[UIViewController _setViewAppearState:isAnimating:] (in UIKit) + 503
45 UIKit 0x259d7d63 -[UIViewController _endAppearanceTransition:] (in UIKit) + 291
46 UIKit 0x25cbd005 __97-[UITabBarController transitionFromViewController:toViewController:transition:shouldSetSelected:]_block_invoke749 (in UIKit) + 25
47 UIKit 0x25a3bd7f -[UIViewController _executeAfterAppearanceBlock] (in UIKit) + 55
48 UIKit 0x25a3bd0d _applyBlockToCFArrayCopiedToStack (in UIKit) + 309
49 UIKit 0x259b7c67 _afterCACommitHandler (in UIKit) + 487
50 CoreFoundation 0x224ea5cd __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ (in CoreFoundation) + 21
51 CoreFoundation 0x224e7c8b __CFRunLoopDoObservers (in CoreFoundation) + 279
52 CoreFoundation 0x224e8093 __CFRunLoopRun (in CoreFoundation) + 915
53 CoreFoundation 0x22436621 CFRunLoopRunSpecific (in CoreFoundation) + 477
54 CoreFoundation 0x22436433 CFRunLoopRunInMode (in CoreFoundation) + 107
55 GraphicsServices 0x2979f0a9 GSEventRunModal (in GraphicsServices) + 137
56 UIKit 0x25a21359 UIApplicationMain (in UIKit) + 1441
57 MyApp 0x00011f1f main (in MyApp) (main.m:26)
我尝试模拟低内存情况,它仍然是有效的。你有什么想法吗?
答案 0 :(得分:0)
-(void)addAlertView
{
UIAlertView *alertView = [[UIAlertView alloc]initWithTitle:
@"Title" message:@"This is a test alert" delegate:self
cancelButtonTitle:@"Cancel" otherButtonTitles:@"Ok", nil];
[alertView show];
}
希望它能帮到你..
根据您的需要设置消息和按钮
如果它不起作用,那么从模拟器&删除你的应用程序他们跑了
答案 1 :(得分:0)
我得到了相同的崩溃日志,并且在运行iOS 7.0.4的设备上发现了日志。 iOS 8.3之前的版本也有问题。
在查看代码之后,我发现使用AlertView的类没有声明UIAlterViewDelegate协议。 OC Runtime可以确保委托方法正常运行,但我认为iOS中存在一些未知的逻辑。
修复bug后,崩溃日志消失了......
我认为它已经在iOS 8.3中修复了iOS错误