UITableviewcell中的Mapview在iOS7中崩溃

时间:2014-02-24 12:38:10

标签: ios uitableview ios7 mkmapview

在我的应用程序中,我有一张地图的表格视图。当我快速滚动或导航视图控制器时,应用程序崩溃与segmentationFault 11.我在Nib中创建了mapview。 这是cellforRowAtIndexPath中的代码部分,

    MKCoordinateRegion region ={ {0.0, 0.0 }, { 0.0, 0.0 } };
    CLLocationCoordinate2D  locationCoord=CLLocationCoordinate2DMake(item.locationLatitude,item.locationLongitude);

     region.center=locationCoord;
     MKCoordinateSpan span;
     span.latitudeDelta = 0.02;
     span.longitudeDelta = 0.02;
     region.span=span;
     XMapAnnotation *annotation = [[XMapAnnotation alloc] init];
     annotation.coordinate = locationCoord;
     annotation.title=@"xyz";
     [cell.mapView setRegion:region animated:NO];
     [cell.mapView addAnnotation:annotation];

在控制台中收到此错误: - [VKTileKeyList containsKey:]:发送到解除分配的实例0x193c78b0的消息。

在设备日志中:

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0xf06a7c79
Triggered by Thread:  0
Thread 0 Crashed:
0   libobjc.A.dylib                 0x39462b26 objc_msgSend + 6
1   VectorKit                       0x36b2edca -[VKTileProvider tileMatters:] + 74
2   VectorKit                       0x36b2ebfc -[VKTileProvider changeTileForKey:toState:withMetadata:withTile:forLayer:] + 88
3   VectorKit                       0x36b2eb98 -[VKTileProvider tileSource:didFetchTile:forKey:] + 56
4   VectorKit                       0x36b2eb50 -[VKTileSource fetchedTile:forKey:] + 40
5   VectorKit                       0x36b2fce4 -[VKTileSetBackedTileSource fetchedTile:forKey:] + 208
6   VectorKit                       0x36b2ead8 -[VKTileSource _fetchedTile:] + 220
7   VectorKit                       0x36b2e634 __49-[VKTileSource decodeData:downloadKey:sourceKey:]_block_invoke_3 + 104
8   libdispatch.dylib               0x3994ad18 _dispatch_call_block_and_release + 8
9   libdispatch.dylib               0x3994ad04 _dispatch_client_callout + 20
10  libdispatch.dylib               0x39951788 _dispatch_main_queue_callback_4CF$VARIANT$mp + 264
11  CoreFoundation                  0x2f11d814 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 4
12  CoreFoundation                  0x2f11c0e8 __CFRunLoopRun + 1296
13  CoreFoundation                  0x2f086c22 CFRunLoopRunSpecific + 518
14  CoreFoundation                  0x2f086a06 CFRunLoopRunInMode + 102
15  GraphicsServices                0x33d7627e GSEventRunModal + 134
16  UIKit                           0x3192a044 UIApplicationMain + 1132
17  xyz                         0x00016f04 main (main.m:16)
18  xyz                         0x0000bb7c start + 36

0 个答案:

没有答案