gpt4 book ai didi

objective-c - EXC_BAD_ACCESS (SIGSEGV) - KERN_INVALID_ADDRESS

转载 作者:太空狗 更新时间:2023-10-30 03:52:36 24 4
gpt4 key购买 nike

我已经上传了应用程序,但它被拒绝了

我们发现您的应用在运行 iOS 7 的 iPad 上崩溃,这不符合 App Store 审核指南。

我上传的时候iOS7还没有启动

崩溃报告说

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0xb1b1f20b

Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libobjc.A.dylib 0x3a2f5b26 objc_msgSend + 6
1 MapKit 0x30ca46a6 -[MKMapView mapViewDidFinishLoadingTiles:] + 46
2 VectorKit 0x376bbaf4 -[VKTileSource didFinishWithNetwork] + 68
3 VectorKit 0x376bc196 __32-[VKTileSource performDownload:]_block_invoke126 + 38
4 GeoServices 0x345b6fdc ___ZNK49-[GEOTileLoaderInternal _loadedTile:forKey:info:]66__49-[GEOTileLoaderInternal _loadedTile:forKey:info:]_block_invoke3$_1clERKN8LoadItem9RequesterE_block_invoke_2 + 52
5 libdispatch.dylib 0x3a7ddd78 _dispatch_call_block_and_release + 8
6 libdispatch.dylib 0x3a7ddd64 _dispatch_client_callout + 20
7 libdispatch.dylib 0x3a7e47bc _dispatch_main_queue_callback_4CF$VARIANT$mp + 264
8 CoreFoundation 0x2fab881c __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 4
9 CoreFoundation 0x2fab70f0 __CFRunLoopRun + 1296
10 CoreFoundation 0x2fa21ce2 CFRunLoopRunSpecific + 518
11 CoreFoundation 0x2fa21ac6 CFRunLoopRunInMode + 102
12 GraphicsServices 0x3471c27e GSEventRunModal + 134
13 UIKit 0x322c3a3c UIApplicationMain + 1132

在崩溃中我们看到 MapKit 0x30ca46a6 -[MKMapView mapViewDidFinishLoadingTiles:]

MapKit 有问题吗?

对于mapkit,下面是我的

- (void)viewDidLoad
{
[super viewDidLoad];
self.title = @"Location";
// Do any additional setup after loading the view.
CLLocationCoordinate2D cords = {29.32511601390379, 48.08847418705136};
MKCoordinateSpan span = {0.008400,0.008400};
region = (MKCoordinateRegion) {cords,span};
mapView.showsUserLocation = YES;
[mapView setRegion:region animated:YES];
[mapView setDelegate:self];

DisplayMap *ann = [[DisplayMap alloc] init];
ann.coordinate = region.center;
[mapView addAnnotation:ann];
}

此外,我在 mapkitviewcontroller 中没有 dealloc。这样好吗?我问这个错误与内存管理有关。

我的应用程序有 5 个选项卡。前 4 个选项卡只是 UIWebView。对于webview,我发现我并没有把webview放在dealloc里面。以下是我在 webview 中的内容,

- (void)dealloc {
[super dealloc];
}

现在我的 xcode 上也没有 iOS 7。我需要下载它,但想先在这里问一下。

注意:一切都与 iOS 6 完美配合。

猜猜我为什么会收到此错误?

最佳答案

在离开页面之前将 map View 委托(delegate)设置为 nil。我还认为 IOS 映射存在一些内存管理问题。所以最好在dealloc方法中释放 map 。

关于objective-c - EXC_BAD_ACCESS (SIGSEGV) - KERN_INVALID_ADDRESS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19053568/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com