나는 이상한 문제에 직면 해 있으며 이미 많은 시간을 보냈습니다.기기의 릴리스 버전에서 iOS 애플리케이션이 충돌 함
내 응용 프로그램, 특히 릴리스 빌드에서 장치의 충돌이 발생합니다.
crashlog은 다음과 같습니다
Incident Identifier: 1879D689-B225-4586-8E8E-D4D9DB392ABB
CrashReporter Key: c432ffa8a13433b330d0fc03863778260c00be45
Hardware Model: iPhone5,3
Process: CSR Proximity [5696]
Path: /var/mobile/Applications/4C6CDC7D-E594-4976-923B-0A62B68C0053/CSR Proximity.app/CSR Proximity
Identifier: com.csr.proximity.app.beacon
Version: 37_release (1.2.0_i)
Code Type: ARM (Native)
Parent Process: launchd [1]
Date/Time: 2015-01-09 19:46:08.903 +0530
OS Version: iOS 7.1.2 (11D257)
Report Version: 104
Exception Type: EXC_BAD_ACCESS (SIGBUS)
Exception Subtype: EXC_ARM_DA_ALIGN at 0x03a3d4fe
Triggered by Thread: 13
Thread 0:
0 libsystem_kernel.dylib 0x3930ca50 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x3930c848 mach_msg + 36
2 CoreFoundation 0x2e59a5e4 __CFRunLoopServiceMachPort + 152
3 CoreFoundation 0x2e598d4a __CFRunLoopRun + 858
4 CoreFoundation 0x2e503724 CFRunLoopRunSpecific + 520
5 CoreFoundation 0x2e503506 CFRunLoopRunInMode + 102
6 GraphicsServices 0x334726ce GSEventRunModal + 134
7 UIKit 0x30e6486c UIApplicationMain + 1132
8 CSR Proximity 0x0000a042 main (main.m:17)
9 libdyld.dylib 0x39268ab4 start + 0
Thread 1:
0 libsystem_kernel.dylib 0x3930c804 kevent64 + 24
1 libdispatch.dylib 0x3925b050 _dispatch_mgr_invoke + 228
2 libdispatch.dylib 0x392552de _dispatch_mgr_thread + 34
Thread 2:
0 libsystem_kernel.dylib 0x3931fc70 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x39384c1e _pthread_wqthread + 306
2 libsystem_pthread.dylib 0x39384ad8 start_wqthread + 4
Thread 3:
0 libsystem_kernel.dylib 0x3931fc70 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x39384c1e _pthread_wqthread + 306
2 libsystem_pthread.dylib 0x39384ad8 start_wqthread + 4
Thread 4:
0 libsystem_kernel.dylib 0x3931fc70 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x39384c1e _pthread_wqthread + 306
2 libsystem_pthread.dylib 0x39384ad8 start_wqthread + 4
Thread 5:
0 libsystem_kernel.dylib 0x3931fc70 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x39384c1e _pthread_wqthread + 306
2 libsystem_pthread.dylib 0x39384ad8 start_wqthread + 4
Thread 6:
0 CoreData 0x2e359cc2 +[_PFRoutines newMutableSetFromCollection:byRemovingItems:] + 846
1 CoreData 0x2e3591a4 -[NSSQLCore recordToManyUpdatesForObject:withOperation:] + 1408
2 CoreData 0x2e3589f0 -[NSSQLCore recordUpdateForObject:] + 92
3 CoreData 0x2e357234 -[NSSQLCore recordChangesInContext:] + 576
4 CoreData 0x2e354640 -[NSSQLCore saveChanges:] + 704
5 CoreData 0x2e322c9a -[NSSQLCore executeRequest:withContext:error:] + 462
6 CoreData 0x2e322588 -[NSPersistentStoreCoordinator executeRequest:withContext:error:] + 2972
7 CoreData 0x2e343f44 -[NSManagedObjectContext save:] + 820
8 CSR Proximity 0x000a239e -[CPSController sendProximityUpdateNotification:] (CPSController.m:1542)
9 CSR Proximity 0x0009d988 -[CPSController placesWithCompletionBle::] (CPSController.m:1017)
10 CSR Proximity 0x0009ecd0 -[CPSController updateDataStoreProximitiesForBeacons::] (CPSController.m:1069)
11 CSR Proximity 0x0009f3ec -[CPSController handleCurrentBeacons:collectEntities:] (CPSController.m:1124)
12 CSR Proximity 0x0009f1e0 -[CPSController handleCurrentBeacons:deleted:] (CPSController.m:1104)
13 CSR Proximity 0x001349e4 -[BleThreadPayLoad process] (BleThreadPayLoad.m:996)
14 CSR Proximity 0x00133904 -[BleThreadPayLoad threadRunLoop] (BleThreadPayLoad.m:509)
15 CSR Proximity 0x001339aa -[BleThreadPayLoad main] (BleThreadPayLoad.m:531)
16 Foundation 0x2efb9a0a __NSThread__main__ + 1058
17 libsystem_pthread.dylib 0x39386956 _pthread_body + 138
18 libsystem_pthread.dylib 0x393868c6 _pthread_start + 98
19 libsystem_pthread.dylib 0x39384ae4 thread_start + 4
Thread 7 name: com.apple.NSURLConnectionLoader
Thread 7:
0 libsystem_kernel.dylib 0x3930ca50 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x3930c848 mach_msg + 36
2 CoreFoundation 0x2e59a5e4 __CFRunLoopServiceMachPort + 152
3 CoreFoundation 0x2e598d04 __CFRunLoopRun + 788
4 CoreFoundation 0x2e503724 CFRunLoopRunSpecific + 520
5 CoreFoundation 0x2e503506 CFRunLoopRunInMode + 102
6 Foundation 0x2ef4423c +[NSURLConnection(Loader) _resourceLoadLoop:] + 316
7 Foundation 0x2efb9a0a __NSThread__main__ + 1058
8 libsystem_pthread.dylib 0x39386956 _pthread_body + 138
9 libsystem_pthread.dylib 0x393868c6 _pthread_start + 98
10 libsystem_pthread.dylib 0x39384ae4 thread_start + 4
Thread 8:
0 libsystem_kernel.dylib 0x3930ca50 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x3930c848 mach_msg + 36
2 CoreFoundation 0x2e59a5e4 __CFRunLoopServiceMachPort + 152
3 CoreFoundation 0x2e598d04 __CFRunLoopRun + 788
4 CoreFoundation 0x2e503724 CFRunLoopRunSpecific + 520
5 CoreFoundation 0x2e503506 CFRunLoopRunInMode + 102
6 Foundation 0x2eef7492 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 250
7 CSR Proximity 0x000fa41a -[CPSAutoFetchController threadRunLoop:] (CPSAutoFetchController.m:333)
8 Foundation 0x2efb9a0a __NSThread__main__ + 1058
9 libsystem_pthread.dylib 0x39386956 _pthread_body + 138
10 libsystem_pthread.dylib 0x393868c6 _pthread_start + 98
11 libsystem_pthread.dylib 0x39384ae4 thread_start + 4
Thread 9:
0 libsystem_kernel.dylib 0x3931fc70 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x39384c1e _pthread_wqthread + 306
2 libsystem_pthread.dylib 0x39384ad8 start_wqthread + 4
Thread 10:
0 libsystem_kernel.dylib 0x3931fc70 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x39384c1e _pthread_wqthread + 306
2 libsystem_pthread.dylib 0x39384ad8 start_wqthread + 4
Thread 11 name: com.apple.CFSocket.private
Thread 11:
0 libsystem_kernel.dylib 0x3931f434 __select + 20
1 CoreFoundation 0x2e59e4de __CFSocketManager + 482
2 libsystem_pthread.dylib 0x39386956 _pthread_body + 138
3 libsystem_pthread.dylib 0x393868c6 _pthread_start + 98
4 libsystem_pthread.dylib 0x39384ae4 thread_start + 4
Thread 12:
0 libsystem_kernel.dylib 0x3931fc70 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x39384c1e _pthread_wqthread + 306
2 libsystem_pthread.dylib 0x39384ad8 start_wqthread + 4
Thread 13 Crashed:
0 CSR Proximity 0x0010fff4 checkSimpleEvent (lts_sdk_eval.c:560)
1 CSR Proximity 0x001108b8 checkEvent (lts_sdk_eval.c:964)
2 CSR Proximity 0x0011068c checkComplexEvent (lts_sdk_eval.c:1009)
3 CSR Proximity 0x001108a2 checkEvent (lts_sdk_eval.c:971)
4 CSR Proximity 0x00110962 Evaluate (lts_sdk_eval.c:1106)
5 CSR Proximity 0x0010f0a2 -[CPSEventManager evaluate:] (CPSEventManager.m:170)
6 CoreFoundation 0x2e5d3410 __invoking___ + 64
7 CoreFoundation 0x2e51d962 -[NSInvocation invoke] + 282
8 Foundation 0x2efa6d04 -[NSInvocationOperation main] + 108
9 Foundation 0x2ef04870 -[__NSOperationInternal _start:] + 768
10 Foundation 0x2efa8740 __NSOQSchedule_f + 56
11 libdispatch.dylib 0x39258cb8 _dispatch_queue_drain + 484
12 libdispatch.dylib 0x39255c6a _dispatch_queue_invoke + 38
13 libdispatch.dylib 0x392595ee _dispatch_root_queue_drain + 74
14 libdispatch.dylib 0x392598d8 _dispatch_worker_thread2 + 52
15 libsystem_pthread.dylib 0x39384c14 _pthread_wqthread + 296
16 libsystem_pthread.dylib 0x39384ad8 start_wqthread + 4
Thread 14:
0 libsystem_kernel.dylib 0x3931fc70 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x39384c1e _pthread_wqthread + 306
2 libsystem_pthread.dylib 0x39384ad8 start_wqthread + 4
Thread 13 crashed with ARM Thread State (32-bit):
r0: 0x03a3d4fe r1: 0x00000000 r2: 0x14f46000 r3: 0x00000002
r4: 0x00000007 r5: 0x14f27085 r6: 0x03a3d4ee r7: 0x03a3d6e0
r8: 0x03a3d675 r9: 0x00000fff r10: 0x14f27084 r11: 0x00000006
ip: 0x3b275118 sp: 0x03a3c464 lr: 0x0010ffdb pc: 0x0010fff4
cpsr: 0x00000030
내가 바이트 정렬에 관련된 몇 가지 문제가있는 것으로 알고 있습니다. 그러나 내가해야 할 일에 대해 전혀 몰라. 어떤 도움을 주시면 감사하겠습니다
static LtsEventStatus isBeaconInsideZoneAndDwellTime(const LtsBeaconProximityEvent* eventData,
const LtsBeaconProximity reportData, tSIRF_UINT8 isReverse, tSIRF_BOOL* found, tSIRF_UINT8 index)
:
충돌 위치 코드
는에 유효한 값 함수 호출이다.감사 자세한 내용은 [발신자 미리보기]
LtsServerConfigureLocal *cfg = GetConfiguration();
LtsEventAttribute *attr;
LtsEventStatus flag = LTS_FALSE;
int beaconIndx = 0;
tSIRF_UINT8 reverse;
tSIRF_BOOL found;
LtsEventResults* eventsResult;
LtsProximalBeacons beacons = values->proximalBeacons;
CCSE_INFO("BeaconFence: Index : %d, values count: %d\n", index, values->proximalBeacons.nValues);
CCSE_INFO("BeaconFence 1");
if(event->values.internal.value >= cfg->nAttributesCnt) {
CCSE_ERROR("Invalid LtsProximalBeacons index %d\n", event->values.internal.value);
return LTS_FALSE; // error
}
CCSE_INFO("BeaconFence 2: %d", event->values.internal.value);
attr = & cfg->attributes[ event->values.internal.value ];
found = FALSE;
reverse = 0x0F & ((event->values.internal.attributes & LTS_MASK_REVERSE)? 1: 0);
CCSE_INFO("BeaconFence 3");
//multiple beacons data
for(; beaconIndx < beacons.nValues ; beaconIndx++)
{
CCSE_INFO("BeaconFence 41");
const LtsBeaconProximityEvent* eventData = NULL;
const LtsBeaconProximity *reportData = NULL;
eventData = &attr->attribute.beaconProximity;
CCSE_INFO("BeaconFence 411, eventData: %p, ", eventData);
CCSE_INFO("BeaconFence 412, reportData:%p, beaconIndx: %p ",&beacons.values[beaconIndx], &beaconIndx);
LtsBeaconProximity beacon = (eventData->proximalBeacon);
reportData = &beacons.values[beaconIndx];
// CCSE_INFO("eventData: nBeaconId: %d address of beaconid: %p, zone: %d, dwellTime: %f", beacon.beaconId, beacon.beaconId[5], beacon.zone, beacon.dwellTime);
CCSE_INFO("Beacon Fence 413");
CCSE_INFO("reportData: nBeaconId: %d beaconid: %s, dwellTime: %f, zone: %d, ", reportData->nBeaconId, reportData->beaconId, reportData->dwellTime, reportData->zone);
// flag = isBeaconInsideZoneAndDwellTime(& attr->attribute.beaconProximity, beacons.values[beaconIndx], reverse, &found, index);
flag = isBeaconInsideZoneAndDwellTime(eventData, beacons.values[beaconIndx], reverse, &found, index);
CCSE_INFO("BeaconFence 42");
if(found)
break;
}
문제는 "BeaconFence (42)는"전혀 인쇄되지 않습니다 로그 인을 추가
. isBeaconInsideZoneAndDwellTime을 호출하는 동안 코드가 충돌합니다. 콘솔 로그에서 우리는 sigbus를 얻습니다.
'isBeaconInsideZoneAndDwellTime'을 호출하기 전에 더 많은 코드가 도움이 될 것입니다. 이 메소드는 두 개의 포인터를 매개 변수로 사용합니다. 그 중 하나가 잘못 정렬 되었습니까? –
흥미롭게도 두 번째 인수 (LtsBeaconProximity 구조체)를 참조로 함수에 전달하면 충돌이 수정됩니다. 어떤 아이디어? – Robin