我正在开发一个已经存在的应用。这个应用程序在iPad Pro / iOS 10上工作正常。我试图让它在iPad2 / iOS 9.3.5上运行。
我设法用XCODE构建它。我可以玩得很好。但是,当我加载特定场景时,它会崩溃。 XCODE只显示“iPad已断开连接”。最后一个Debug显示:
“卸载3个未使用的序列化文件(现在加载的序列化文件:0)”
没有警告,没有错误。
经过多次研究,我认为这是一个内存限制问题。所以我开始逐一清空场景,以找出造成问题的原因。
场景现在是空的(^^),它仍然崩溃。下面是空场景的分析器内存。
崩溃日志:
Incident Identifier: A8EAA62E-F1BE-4969-A9DE-8095A41F685A
CrashReporter Key: 1a06f0ff4da2846aaf101b885d553b22478f0f3a
Hardware Model: iPad2,4
Process: mediaserverd [361]
Path: /usr/sbin/mediaserverd
Identifier: mediaserverd
Version: ???
Code Type: ARM (Native)
Parent Process: launchd [1]
Date/Time: 2017-01-10 17:08:24.24 +0100
Launch Time: 2017-01-10 12:14:35.35 +0100
OS Version: iOS 9.3.5 (13G36)
Report Version: 104
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x815dba57
Triggered by Thread: 12
Filtered syslog:
None found
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0:
0 libsystem_kernel.dylib 0x21766920 semaphore_wait_trap + 8
1 libsystem_platform.dylib 0x2181b3a4 _os_semaphore_wait + 12
2 libdispatch.dylib 0x21668d4a _dispatch_barrier_sync_f_slow + 370
3 CoreMedia 0x23af2152 cmsmApplicationStateChangedNotificationCallback + 78
4 CoreFoundation 0x21a03902 __CFNotificationCenterAddObserver_block_invoke + 126
5 CoreFoundation 0x21aa1734 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 12
6 CoreFoundation 0x21aa113e _CFXRegistrationPost + 390
7 CoreFoundation 0x21aa0f1c ___CFXNotificationPost_block_invoke + 40
8 CoreFoundation 0x21af7c6a -[_CFXNotificationRegistrar find:object:observer:enumerator:] + 1334
9 CoreFoundation 0x21a01082 _CFXNotificationPost + 486
10 Foundation 0x222425de -[NSNotificationCenter postNotificationName:object:userInfo:] + 74
11 SpringBoardServices 0x231b93be __SBApplicationStateBeginGeneratingChangeNotifications_block_invoke_2 + 78
12 libdispatch.dylib 0x2165d822 _dispatch_call_block_and_release + 10
13 libdispatch.dylib 0x2165d80e _dispatch_client_callout + 22
14 libdispatch.dylib 0x2166bba8 _dispatch_main_queue_callback_4CF$VARIANT$mp + 1524
15 CoreFoundation 0x21ab1b6c __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 8
16 CoreFoundation 0x21ab0066 __CFRunLoopRun + 1574
17 CoreFoundation 0x219ff228 CFRunLoopRunSpecific + 520
18 CoreFoundation 0x219ff014 CFRunLoopRunInMode + 108
19 mediaserverd 0x00059f9e 0x58000 + 8094
20 libdyld.dylib 0x216a7872 start + 2
Thread 1 name: Dispatch queue: com.apple.libdispatch-manager
Thread 1:
0 libsystem_kernel.dylib 0x2177c2f8 kevent_qos + 24
1 libdispatch.dylib 0x21671d60 _dispatch_mgr_invoke + 256
2 libdispatch.dylib 0x21671abe _dispatch_mgr_thread$VARIANT$mp + 38
Thread 2:
0 libsystem_kernel.dylib 0x217668d0 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x217666d4 mach_msg + 40
2 CoreFoundation 0x21ab1ac4 __CFRunLoopServiceMachPort + 136
3 CoreFoundation 0x21aafe4c __CFRunLoopRun + 1036
4 CoreFoundation 0x219ff228 CFRunLoopRunSpecific + 520
5 CoreFoundation 0x21a3fdd2 CFRunLoopRun + 98
6 VirtualAudio 0x01e3fee4 0x1e38000 + 32484
7 VirtualAudio 0x01e3fdba 0x1e38000 + 32186
8 libsystem_pthread.dylib 0x2182385a _pthread_body + 138
9 libsystem_pthread.dylib 0x218237ce _pthread_start + 110
10 libsystem_pthread.dylib 0x21821724 thread_start + 8
Thread 3 name: com.apple.coremedia.remakerserver
Thread 3:
0 libsystem_kernel.dylib 0x217668d0 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x217666d4 mach_msg + 40
2 CoreFoundation 0x21ab1ac4 __CFRunLoopServiceMachPort + 136
3 CoreFoundation 0x21aafe4c __CFRunLoopRun + 1036
4 CoreFoundation 0x219ff228 CFRunLoopRunSpecific + 520
5 CoreFoundation 0x21a3fdd2 CFRunLoopRun + 98
6 MediaToolbox 0x26f45644 figRemakerFamilyServerThread + 256
7 CoreMedia 0x23aa79b8 figThreadMain + 208
8 libsystem_pthread.dylib 0x2182385a _pthread_body + 138
9 libsystem_pthread.dylib 0x218237ce _pthread_start + 110
10 libsystem_pthread.dylib 0x21821724 thread_start + 8
Thread 4 name: com.apple.coremedia.recorderserver
Thread 4:
0 libsystem_kernel.dylib 0x217668d0 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x217666d4 mach_msg + 40
2 CoreFoundation 0x21ab1ac4 __CFRunLoopServiceMachPort + 136
3 CoreFoundation 0x21aafe4c __CFRunLoopRun + 1036
4 CoreFoundation 0x219ff228 CFRunLoopRunSpecific + 520
5 CoreFoundation 0x21a3fdd2 CFRunLoopRun + 98
6 Celestial 0x271d43c2 figRecorderServerThread + 794
7 CoreMedia 0x23aa79b8 figThreadMain + 208
8 libsystem_pthread.dylib 0x2182385a _pthread_body + 138
9 libsystem_pthread.dylib 0x218237ce _pthread_start + 110
10 libsystem_pthread.dylib 0x21821724 thread_start + 8
Thread 5 name: audio IO: VAD [vdef] Aggregate Device UID 1
Thread 5:
0 libsystem_kernel.dylib 0x2177a998 __psynch_cvwait + 24
1 libsystem_pthread.dylib 0x21822e26 _pthread_cond_wait + 594
2 libsystem_pthread.dylib 0x21822bd0 pthread_cond_timedwait_relative_np + 16
3 CoreAudio 0x23a38da4 HALB_Guard::WaitFor(unsigned long long) + 92
4 CoreAudio 0x239c9dea HALS_IOContext::IOWorkLoop_SleepUntilWakeTime(unsigned long long) + 142
5 CoreAudio 0x239ca9c0 HALS_IOContext::IOWorkLoop() + 3000
6 CoreAudio 0x239c60b4 HALS_IOContext::IOThreadEntry(void*) + 424
7 CoreAudio 0x239c5ec6 ___ZN14HALS_IOContextC2EP11HALS_SystemP11HALS_ClientNS0_10PowerStateE_block_invoke + 82
8 CoreAudio 0x239daa8c HALB_IOThread::Entry(void*) + 136
9 libsystem_pthread.dylib 0x2182385a _pthread_body + 138
10 libsystem_pthread.dylib 0x218237ce _pthread_start + 110
11 libsystem_pthread.dylib 0x21821724 thread_start + 8
Thread 6:
0 libsystem_kernel.dylib 0x21766938 semaphore_timedwait_trap + 8
1 libdispatch.dylib 0x2166e90a _dispatch_semaphore_wait_slow + 126
2 libdispatch.dylib 0x2166df98 _dispatch_worker_thread + 116
3 libsystem_pthread.dylib 0x2182385a _pthread_body + 138
4 libsystem_pthread.dylib 0x218237ce _pthread_start + 110
5 libsystem_pthread.dylib 0x21821724 thread_start + 8
Thread 7:
0 libsystem_kernel.dylib 0x21766938 semaphore_timedwait_trap + 8
1 libdispatch.dylib 0x2166e90a _dispatch_semaphore_wait_slow + 126
2 libdispatch.dylib 0x2166df98 _dispatch_worker_thread + 116
3 libsystem_pthread.dylib 0x2182385a _pthread_body + 138
4 libsystem_pthread.dylib 0x218237ce _pthread_start + 110
5 libsystem_pthread.dylib 0x21821724 thread_start + 8
Thread 8 name: Dispatch queue: AudioControl
Thread 8:
0 CoreMedia 0x23ae70e8 cmsUpdateMuteStatus + 0
1 CoreMedia 0x23ae629e cmsSetIsPlaying + 134
2 CoreMedia 0x23af1df6 __cmsFinalize_block_invoke + 54
3 libdispatch.dylib 0x21668df4 _dispatch_barrier_sync_f_slow + 540
4 CoreMedia 0x23af1c82 cmsFinalize + 78
5 CoreFoundation 0x219fb794 CFRelease + 424
6 libdispatch.dylib 0x2165d822 _dispatch_call_block_and_release + 10
7 libdispatch.dylib 0x2166c5e8 _dispatch_root_queue_drain + 1560
8 libdispatch.dylib 0x2166bfcc _dispatch_worker_thread3 + 96
9 libsystem_pthread.dylib 0x21821b28 _pthread_wqthread + 1024
10 libsystem_pthread.dylib 0x21821718 start_wqthread + 8
Thread 9:
0 libsystem_kernel.dylib 0x2177b864 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x21821b34 _pthread_wqthread + 1036
2 libsystem_pthread.dylib 0x21821718 start_wqthread + 8
Thread 10:
0 libsystem_kernel.dylib 0x21766938 semaphore_timedwait_trap + 8
1 libdispatch.dylib 0x2166e90a _dispatch_semaphore_wait_slow + 126
2 libdispatch.dylib 0x2166df98 _dispatch_worker_thread + 116
3 libsystem_pthread.dylib 0x2182385a _pthread_body + 138
4 libsystem_pthread.dylib 0x218237ce _pthread_start + 110
5 libsystem_pthread.dylib 0x21821724 thread_start + 8
Thread 11:
0 libsystem_kernel.dylib 0x2177b864 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x21821b34 _pthread_wqthread + 1036
2 libsystem_pthread.dylib 0x21821718 start_wqthread + 8
Thread 12 name: Dispatch queue: com.apple.assertiond.processassertionconnection
Thread 12 Crashed:
0 libobjc.A.dylib 0x21297a66 objc_msgSend + 6
1 libdispatch.dylib 0x2165d822 _dispatch_call_block_and_release + 10
2 libdispatch.dylib 0x2166a422 _dispatch_queue_drain$VARIANT$mp + 1758
3 libdispatch.dylib 0x21669a60 _dispatch_queue_invoke$VARIANT$mp + 284
4 libdispatch.dylib 0x2166c15c _dispatch_root_queue_drain + 396
5 libdispatch.dylib 0x2166bfcc _dispatch_worker_thread3 + 96
6 libsystem_pthread.dylib 0x21821b28 _pthread_wqthread + 1024
7 libsystem_pthread.dylib 0x21821718 start_wqthread + 8
Thread 13:
0 libsystem_kernel.dylib 0x2177b864 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x21821b34 _pthread_wqthread + 1036
2 libsystem_pthread.dylib 0x21821718 start_wqthread + 8
Thread 12 crashed with ARM Thread State (32-bit):
r0: 0x15d7ec50 r1: 0x2314770f r2: 0x1f4210b0 r3: 0x15eb9630
r4: 0x15eb9630 r5: 0x002011e0 r6: 0x00000000 r7: 0x1f420ee8
r8: 0x00000000 r9: 0x815dba4b r10: 0x00201180 r11: 0x15e7be30
ip: 0xfe151ea5 sp: 0x1f420ee4 lr: 0x2165d823 pc: 0x21297a66
cpsr: 0x40000030
Binary Images:
[...]
Error Formulating Crash Report:
Failed while requesting activity/breadcrumb diagnostics
感谢您阅读我, q
答案 0 :(得分:0)
谢谢Guru你的时间,
确实,与记忆有关。我正在加载很多GameObjects。很多这些游戏对象都处于非活动状态,所以我认为它们并没有占用大量内存。 我错了。 我现在使用Instantiate,Destroy方法而不是SetActive()方法。