我們的應用程序具有基於地圖和GPS的位置跟蹤功能。此應用已上傳至Apple Store。該應用程序包含以下功能:應用程序在iOS 7上使用MKAnnotation,CGBitmapContextCreate和NSOperationQueue開發的Map功能崩潰
- 地圖上顯示實時交通數據實時顯示交通事件(事故,交通堵塞等)
用戶的GPS定位跟蹤 應用程序運行正常的IOS版本5和6. 在應用程序中操作Map功能時,我們正面臨iOS 7 Beta的崩潰問題。我們使用的iOS以下特點呈現在地圖上的交通數據和交通事件:
MKAnnotation呈現交通事件
要渲染的交通數據,應用程序使用的CGBitmapContextCreate功能。
context = CGBitmapContextCreate (NULL, self.mapView.frame.size.width, self.mapView.frame.size.height, 8,// bits per component bitmapBytesPerRow, colorSpace, kCGImageAlphaPremultipliedLast); CGContextSetAllowsAntialiasing (context,YES)
畫線以顯示位圖上下文中的流量數據。
創建的位圖上下文將使用MKAnnotation API顯示在地圖上。
應用程序使用NSOperationQueue渲染流量和事件數據,因爲用戶與地圖的交互是平滑的。以下是代碼片段:
[queue addOperationWithBlock:^{ [Set the required data], [Update the UI] }];
下面是它獲取,同時的地圖功能,隨機操作的N生成的兩個崩潰日誌。
崩潰日誌 - 1
事件
Identifier: 471EAE21-E118-4E3D-AAAE-D7D82B1D6326
CrashReporter
Key:
bdbf75eb30240449214769478f38830aa7a14f7f
Hardware
Model: iPhone5,2
Process: {Application Name} [246]
Path: /var/mobile/Applications/4FA0A7F2-4998-4F8F-A4C6-66D849D074B8/{Application Name}.app/{Application Name}
Identifier: {Application bunald name}
Version: X.X.X.X
Code
Type: ARM (Native)
Parent
Process: launchd [1]
Date/Time: 2013-08-30 14:21:24.523 +0530
OS
Version: iOS 7.0 (11A4449d)
Report
Version: 104
Exception
Type: EXC_BAD_ACCESS (SIGSEGV)
Exception
Subtype: KERN_INVALID_ADDRESS at 0x8000000c
Triggered
by Thread: 0
Thread
0 Crashed:
0 libobjc.A.dylib 0x38ed3b66
objc_msgSend + 6
1 CoreFoundation 0x2ede773c -[__NSSetM removeObject:] + 92
2 MapKit 0x3002de96 -[MKAnnotationManager
_removeRepresentationForAnnotation:fromCull:] + 490
3 MapKit 0x3004bc54 -[MKAnnotationManager
_removeAnnotation:updateVisible:removeFromContainer:] + 272
4 MapKit 0x3004bb38 -[MKAnnotationManager removeAnnotation:] + 24
5 SLIM 0x00165828 -[TravelStarViewController
mapView:viewForAnnotation:] (TravelStarViewController.m:1735)
6 MapKit 0x3005ea86 -[MKMapView
annotationManager:representationForAnnotation:] + 74
7 MapKit 0x3002a136 -[MKAnnotationManager _addRepresentationForAnnotation:]
+ 362
8 MapKit 0x30028c4a -[MKAnnotationManager updateVisibleAnnotations] +
1034
9 Foundation 0x2f876358 __NSFireTimer + 60
10 CoreFoundation 0x2ee7ae84 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__
+ 12
11 CoreFoundation 0x2ee7aa9e __CFRunLoopDoTimer + 790
12 CoreFoundation 0x2ee78e26 __CFRunLoopRun + 1214
13 CoreFoundation 0x2ede353c CFRunLoopRunSpecific + 520
14 CoreFoundation 0x2ede331e CFRunLoopRunInMode + 102
15 GraphicsServices 0x3387733e
GSEventRunModal + 134
16 UIKit 0x313fc7b0 UIApplicationMain + 1132
17 SLIM 0x000f3fa6
main (main.m:15)
18 SLIM 0x000f3efc start + 36
你解決了這個問題嗎?我收到這個錯誤。 –