nst/iOS-Runtime-Headers

About the iOS10 API AVKeyPathFlattener crash

Opened this issue · 5 comments

Hi, recent I used AVPlayer to play while downloading, everything seems fine. Bug I found some crash about AVKeyPathFlattener on the other threads. I can't reproduce and don't know how to solve it. Can you please help me ? Thanks.

Here is the crash log:

#10 Thread
NSInternalInconsistencyException
An instance 0x170031fa0 of class AVKeyPathFlattener was deallocated while key value observers were still registered with it. Current observation info: <NSKeyValueObservationInfo 0x170432860> ( <NSKeyValueObservance 0x17404c660: Observer: 0x170269f80, Key path: operationCount, Options: <New: NO, Old: NO, Prior: NO> Context: 0x0, Property: 0x17404c510> )
0 CoreFoundation ___exceptionPreprocess + 124
1 libobjc.A.dylib objc_exception_throw + 56
2 CoreFoundation -[NSException initWithCoder:]
3 Foundation _NSKVODeallocate + 300
4 AVFoundation -[AVPlayerLayer _stopObservingPlayer:] + 244
5 libdispatch.dylib __dispatch_call_block_and_release + 24
6 libdispatch.dylib __dispatch_client_callout + 16
7 libdispatch.dylib __dispatch_queue_serial_drain + 928
8 libdispatch.dylib __dispatch_queue_invoke + 652
9 libdispatch.dylib __dispatch_queue_override_invoke + 360
10 libdispatch.dylib __dispatch_root_queue_drain + 572
11 libdispatch.dylib __dispatch_worker_thread3 + 124
12 libsystem_pthread.dylib _pthread_wqthread + 1288
13 libsystem_pthread.dylib start_wqthread + 4

#0 Thread
0 libsystem_platform.dylib 0x0000000181a916c0 OSAtomicEnqueue
1 CoreFoundation 0x00000001829b4770 __CFRelease
2 CoreText 0x0000000185674d8c TFont::~TFont()
3 CoreFoundation 0x00000001829b4358 __CFRelease
4 CoreText 0x000000018569df44 CTTateChuYokoRun::CloneRange(CTRun const*, CFRange, TRun::SubrangingStyle)
5 CoreText 0x000000018566c7b4 TFontCascade::~TFontCascade()
6 CoreText 0x0000000185669bf4 TGlyphEncoder::EncodeChars(CFRange, TAttributes const&, TGlyphList&, TGlyphEncoder::Fallbacks)
7 CoreText 0x00000001856693b4 TTypesetterAttrString::Initialize(__CFAttributedString const*)
8 CoreText 0x00000001856690cc TTypesetterAttrString::TTypesetterAttrString(__CFAttributedString const*)
9 CoreText 0x0000000185668fb4 CTLineCreateWithAttributedString
10 UIFoundation 0x0000000188828b18 ___NSStringDrawingEngine
11 UIFoundation 0x0000000188827acc -[NSString(NSExtendedStringDrawing) boundingRectWithSize:options:attributes:context:]
12 UIFoundation 0x0000000188825fec -[NSString(NSStringDrawing) sizeWithAttributes:]
13 MyApp 0x0000000100328240 -[ECAnalysisLyric analysisLyric:withMaxFont:orLyricData:twoline:] (ECAnalysisLyric.m:264)
14 MyApp 0x00000001002a8b34 -[ECArtworkViewController getLyricInfo:] (ECArtworkViewController.m:2685)
15 libdispatch.dylib 0x000000018188e1fc __dispatch_call_block_and_release
16 libdispatch.dylib 0x000000018188e1bc __dispatch_client_callout
17 libdispatch.dylib 0x0000000181892d68 _dispatch_main_queue_callback_4CF
18 CoreFoundation 0x00000001829b2810 _CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE
19 CoreFoundation 0x00000001829b03fc ___CFRunLoopRun
20 CoreFoundation 0x00000001828de2b8 CFRunLoopRunSpecific
21 GraphicsServices 0x0000000184392198 GSEventRunModal
22 UIKit 0x00000001889257fc -[UIApplication _run]
23 UIKit 0x0000000188920534 UIApplicationMain
24 MyApp 0x000000010040e04c main (main.m:14)
25 libdyld.dylib 0x00000001818c15b8 _start

#1Thread com.apple.uikit.eventfetch-thread
0 libsystem_kernel.dylib 0x00000001819b5188 mach_msg_trap
1 libsystem_kernel.dylib 0x00000001819b4ff8 mach_msg
2 CoreFoundation 0x00000001829b25d0 ___CFRunLoopServiceMachPort
3 CoreFoundation 0x00000001829b01ec ___CFRunLoopRun
4 CoreFoundation 0x00000001828de2b8 CFRunLoopRunSpecific
5 Foundation 0x000000018341b26c -[NSRunLoop(NSRunLoop) runMode:beforeDate:]
6 Foundation 0x000000018343bdd0 -[NSRunLoop(NSRunLoop) runUntilDate:]
7 UIKit 0x0000000189299c38 -[UIEventFetcher threadMain]
8 Foundation 0x0000000183518e68 _NSThread__start
9 libsystem_pthread.dylib 0x0000000181a99850 __pthread_body
10 libsystem_pthread.dylib 0x0000000181a99760 __pthread_body

#2 Thread
0 libsystem_kernel.dylib 0x00000001819b5188 mach_msg_trap
1 libsystem_kernel.dylib 0x00000001819b4ff8 mach_msg
2 CoreFoundation 0x00000001829b25d0 ___CFRunLoopServiceMachPort
3 CoreFoundation 0x00000001829b01ec ___CFRunLoopRun
4 CoreFoundation 0x00000001828de2b8 CFRunLoopRunSpecific
5 MyApp 0x00000001003de900 +[ASIHTTPRequest runRequests] (ASIHTTPRequest.m:4913)
6 Foundation 0x0000000183518e68 _NSThread__start
7 libsystem_pthread.dylib 0x0000000181a99850 __pthread_body
8 libsystem_pthread.dylib 0x0000000181a99760 __pthread_body

#3 com.apple.NSURLConnectionLoader
0 libsystem_kernel.dylib 0x00000001819b5188 mach_msg_trap
1 libsystem_kernel.dylib 0x00000001819b4ff8 mach_msg
2 CoreFoundation 0x00000001829b25d0 ___CFRunLoopServiceMachPort
3 CoreFoundation 0x00000001829b01ec ___CFRunLoopRun
4 CoreFoundation 0x00000001828de2b8 CFRunLoopRunSpecific
5 CFNetwork 0x00000001830e3a70 +[NSURLConnection(Loader) _resourceLoadLoop:]
6 Foundation 0x0000000183518e68 _NSThread__start
7 libsystem_pthread.dylib 0x0000000181a99850 __pthread_body
8 libsystem_pthread.dylib 0x0000000181a99760 __pthread_body

#4 AVAudioSession Notify Thread
0 libsystem_kernel.dylib 0x00000001819b5188 mach_msg_trap
1 libsystem_kernel.dylib 0x00000001819b4ff8 mach_msg
2 CoreFoundation 0x00000001829b25d0 ___CFRunLoopServiceMachPort
3 CoreFoundation 0x00000001829b01ec ___CFRunLoopRun
4 CoreFoundation 0x00000001828de2b8 CFRunLoopRunSpecific
5 AVFAudio 0x000000019c57fd24 GenericRunLoopThread::Entry(void*)
6 AVFAudio 0x000000019c5a5d9c CAPThread::Entry(CAPThread*)
7 libsystem_pthread.dylib 0x0000000181a99850 __pthread_body
8 libsystem_pthread.dylib 0x0000000181a99760 __pthread_body

#5 keep live
0 libsystem_kernel.dylib 0x00000001819d3314 __semwait_signal
1 libsystem_c.dylib 0x00000001818f125c nanosleep
2 Foundation 0x0000000183518118 +[NSThread sleepForTimeInterval:]
3 MyApp 0x00000001000ab03c -[EncoreProtoInterface run] (EncoreProtoInterface.mm:119)
4 Foundation 0x0000000183518e68 _NSThread__start
5 libsystem_pthread.dylib 0x0000000181a99850 __pthread_body
6 libsystem_pthread.dylib 0x0000000181a99760 __pthread_body

#6 com.apple.CFSocket.private
0 libsystem_kernel.dylib 0x00000001819d323c __select
1 CoreFoundation 0x00000001829b9468 ___CFSocketManager
2 libsystem_pthread.dylib 0x0000000181a99850 __pthread_body
3 libsystem_pthread.dylib 0x0000000181a99760 __pthread_body

#7 Thread
0 libsystem_kernel.dylib 0x00000001819b51dc semaphore_timedwait_trap
1 libdispatch.dylib 0x00000001818a0770 __dispatch_semaphore_wait_slow
2 libdispatch.dylib 0x000000018189f808 __dispatch_worker_thread
3 libsystem_pthread.dylib 0x0000000181a99850 __pthread_body
4 libsystem_pthread.dylib 0x0000000181a99760 __pthread_body

#8 Thread
0 libsystem_kernel.dylib 0x00000001819d3a88 __workq_kernreturn
1 libsystem_pthread.dylib 0x0000000181a97344 _pthread_wqthread

#9 Thread
0 libsystem_kernel.dylib 0x00000001819d2e1c __psynch_cvwait
1 libsystem_pthread.dylib 0x0000000181a989c0 __pthread_cond_wait
2 Foundation 0x00000001834f25c8 -[__NSOperationInternal _waitUntilFinished:]
3 CFNetwork 0x000000018326154c -[NSURLConnectionInternal _withConnectionAndDelegate:onlyActive:]
4 CFNetwork 0x00000001832616c0 -[NSURLConnectionInternal _withActiveConnectionAndDelegate:]
5 CFNetwork 0x000000018321f974 _NSURLConnectionDidReceiveResponse(_CFURLConnection*, _CFURLResponse*, void const*)
6 CFNetwork 0x0000000183185c78 invocation function for block in URLConnectionClient_Classic::_delegate_didReceiveResponse(_CFURLResponse*)
7 CFNetwork 0x00000001831817ac invocation function for block in URLConnectionClient_Classic::_withDelegateAsync(char const*, void (_CFURLConnection*, CFURLConnectionClientCurrent_VMax const*) block_pointer)
8 CFNetwork 0x000000018323e85c invocation function for block in QCoreSchedulingSet::performAsync(void () block_pointer) const
9 libdispatch.dylib 0x000000018188e1fc __dispatch_call_block_and_release
10 libdispatch.dylib 0x000000018188e1bc __dispatch_client_callout
11 libdispatch.dylib 0x000000018189c3dc __dispatch_queue_serial_drain
12 libdispatch.dylib 0x00000001818919a4 __dispatch_queue_invoke
13 libdispatch.dylib 0x000000018189e34c __dispatch_root_queue_drain
14 libdispatch.dylib 0x000000018189e0ac __dispatch_worker_thread3
15 libsystem_pthread.dylib 0x0000000181a972a0 _pthread_wqthread

#11 Thread
0 libsystem_kernel.dylib 0x00000001819d3a88 __workq_kernreturn
1 libsystem_pthread.dylib 0x0000000181a97160 _pthread_wqthread

#12 Thread
0 libsystem_kernel.dylib 0x00000001819d3a88 __workq_kernreturn
1 libsystem_pthread.dylib 0x0000000181a97344 _pthread_wqthread

#13 Thread
0 libsystem_kernel.dylib 0x00000001819d3a88 __workq_kernreturn
1 libsystem_pthread.dylib 0x0000000181a97344 _pthread_wqthread

#14 Thread
0 libsystem_kernel.dylib 0x00000001819d3a88 __workq_kernreturn
1 libsystem_pthread.dylib 0x0000000181a97344 _pthread_wqthread

I have the same crash! @Wakever Do you fix it?

I have the same crash!

@KxShare No idea yet, and you ?

I also have the crash, but no idea

@Wakever I also have the crash, but no idea. have u solved it ?