1

早上好,

我最近刚买了一台新的 iPad Air,我的应用程序由于某种原因不断崩溃,只在那个设备上。我对此有一种奇怪的感觉。它在 64 位模拟器上运行良好,我认为这是问题所在。我目前在 UITableView 单元格中使用 AsyncImageView https://github.com/nicklockwood/AsyncImageView 。这以前从未发生在我身上,但现在我不断得到:

Incident Identifier: 363B4423-1A21-4104-8067-0EDFFFFF7248
CrashReporter Key:   2fd30a27b8ab4d0d360bedb48cdda187c2ee2242
Hardware Model:      iPad4,1
Path:                /var/mobile/Applications/848571DF-F961-4B38-BA25-C86E6D0BC36D/XXXXX.app/XXXXX
Identifier:          com.leclerc.XXXXX
Version:             0.0.0.6 (0.0.0.6)
Code Type:           ARM-64 (Native)
Parent Process:      launchd [1]

Date/Time:           2013-11-12 16:45:47.036 -0500
OS Version:          iOS 7.0.3 (11B511)
Report Version:      104

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000100001da0
Triggered by Thread:  0

Thread 0 Crashed:
0   libobjc.A.dylib                 0x0000000193dd5548 objc_retain + 24
1   XXXXX                           0x000000010012c48c -[AsyncImageView setImage:] (AsyncImageView.m:691)
2   XXXXX                           0x0000000100129fb4 -[AsyncImageLoader imageLoaded:] (AsyncImageView.m:399)
3   CoreFoundation                  0x0000000187a576d8 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 16
4   CoreFoundation                  0x00000001879a4018 _CFXNotificationPost + 2060
5   Foundation                      0x000000018852ea14 -[NSNotificationCenter postNotificationName:object:userInfo:] + 68
6   XXXXX                           0x0000000100128390 -[AsyncImageConnection cacheImage:] (AsyncImageView.m:164)
7   Foundation                      0x000000018861c92c __NSThreadPerformPerform + 324
8   CoreFoundation                  0x0000000187a63778 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 20
9   CoreFoundation                  0x0000000187a62ad4 __CFRunLoopDoSources0 + 252
10  CoreFoundation                  0x0000000187a60d6c __CFRunLoopRun + 628
11  CoreFoundation                  0x00000001879a1b34 CFRunLoopRunSpecific + 448
12  GraphicsServices                0x000000018d37382c GSEventRunModal + 164
13  UIKit                           0x000000018a9e00e4 UIApplicationMain + 1152
14  XXXXX                           0x00000001000f6eb0 main (main.m:16)
15  libdyld.dylib                   0x00000001943c3a9c start + 0

它在这段代码中崩溃:

- (void)setImageURL:(NSURL *)imageURL
{
    super.imageURL = imageURL;
    if (_showActivityIndicator && !self.image && imageURL)
    {
        if (_activityView == nil)
        {
            _activityView = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:_activityIndicatorStyle];
            _activityView.hidesWhenStopped = YES;
            _activityView.center = CGPointMake(self.bounds.size.width / 2.0f, self.bounds.size.height / 2.0f);
            _activityView.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleRightMargin | UIViewAutoresizingFlexibleBottomMargin;
            [self addSubview:_activityView];
        }
        [_activityView startAnimating];
    }
}
4

2 回答 2

2

我在 iPhone 5S 上经历过同样的崩溃。将 AsyncImage 更新到 1.5.1 版为我解决了这个问题。从这里获取:https ://github.com/nicklockwood/AsyncImageView

于 2014-02-26T09:37:10.787 回答
0

我也尝试了 1.5.1 版本,但没有用。您必须将应用程序的最大部署目标设置为 5.1.1,否则此库无论如何都会崩溃。

于 2014-05-15T07:53:11.083 回答