Skip to content
This repository has been archived by the owner on Feb 2, 2023. It is now read-only.

[ASImageNode] -setDefaultImage: should release lock before calling -setImage: #1391

Merged
merged 1 commit into from
Mar 17, 2016

Conversation

appleguy
Copy link
Contributor

This allows -setImage: to fully unlock before it calls -invalidateCalculatedSize.

…etImage:

This allows -setImage: to fully unlock before it calls -invalidateCalculatedSize.
@appleguy
Copy link
Contributor Author

:: (lldb) bt all

  • thread Use correct format identifiers for logs on 64 bit systems. #1: tid = 0x1f4c18b, 0x08b9243a libsystem_kernel.dylib__psynch_mutexwait + 10, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP frame #0: 0x08b9243a libsystem_kernel.dylib__psynch_mutexwait + 10
    frame Use correct format identifiers for logs on 64 bit systems. #1: 0x08b5bc21 libsystem_pthread.dylib_pthread_mutex_lock_wait + 99 frame #2: 0x08b5be0d libsystem_pthread.dylib_pthread_mutex_lock_slow + 277
    frame Inconsistent boolean property naming #3: 0x08b56101 libsystem_pthread.dylibpthread_mutex_lock + 138 frame #4: 0x00849cb0 Pinterest EnterpriseASDN::Mutex::lock(this=0x7e711fc4) + 48 at ASThread.h:124
    frame Unexport _ASAsyncTransactionContainer+Private.h in podspec, project file #5: 0x00849c74 Pinterest EnterpriseASDN::Locker<ASDN::Mutex>::Locker(this=0xbffc6e50, l=0x7e711fc4) + 36 at ASThread.h:69 frame #6: 0x00849844 Pinterest EnterpriseASDN::LockerASDN::Mutex::Locker(this=0xbffc6e50, l=0x7e711fc4) + 36 at ASThread.h:68
    frame Caching code seems entirely unused #7: 0x0128c705 Pinterest Enterprise-[ASNetworkImageNode displayWillStart](self=0x7e711e00, _cmd="displayWillStart") + 117 at ASNetworkImageNode.mm:176 frame #8: 0x0123c2ed Pinterest Enterprise-[ASDisplayNode willDisplayAsyncLayer:](self=0x7e711e00, _cmd="willDisplayAsyncLayer:", layer=0x7e86ce80) + 77 at ASDisplayNode.mm:1126

    • frame Add umbrella header #9: 0x0121c698 Pinterest Enterprise-[ASDisplayNode(self=0x7e711e00, _cmd="displayAsyncLayer:asynchronously:", asyncLayer=0x7e86ce80, asynchronously=YES) displayAsyncLayer:asynchronously:] + 1656 at ASDisplayNode+AsyncDisplay.mm:366 frame #10: 0x011bd1db Pinterest Enterprise-[_ASDisplayLayer display:](self=0x7e86ce80, _cmd="display:", asynchronously=YES) + 171 at _ASDisplayLayer.mm:198
      frame [ASDisplayNode] Support UIMenuController #11: 0x011bd10f Pinterest Enterprise-[_ASDisplayLayer display](self=0x7e86ce80, _cmd="display") + 527 at _ASDisplayLayer.mm:186 frame #12: 0x04b8f40c QuartzCore-[CALayer displayIfNeeded] + 57
      frame Fix small documentation snafu #13: 0x01244d34 Pinterest EnterpriserecursivelyTriggerDisplayForLayer(layer=0x7e86ce80, shouldBlock=NO) + 228 at ASDisplayNode.mm:1741 frame #14: 0x01244e9e Pinterest EnterpriserecursivelyTriggerDisplayForLayer(layer=0x7e8dc020, shouldBlock=NO) + 590 at ASDisplayNode.mm:1746
      frame Rename "sizeToFit:" to "sizeThatFits:" #15: 0x01244e9e Pinterest EnterpriserecursivelyTriggerDisplayForLayer(layer=0x7ebcddd0, shouldBlock=NO) + 590 at ASDisplayNode.mm:1746 frame #16: 0x01245512 Pinterest Enterprise-[ASDisplayNode _recursivelyTriggerDisplayAndBlock:](self=0x7ec5b380, _cmd="_recursivelyTriggerDisplayAndBlock:", shouldBlock=NO) + 578 at ASDisplayNode.mm:1774
      frame Remove the underscore doc style copied from README.md #17: 0x012303ff Pinterest Enterprise__49+[ASDisplayNode scheduleNodeForRecursiveDisplay:]_block_invoke_2(.block_descriptor=0x019ccbf8, dequeuedItem=0x7ec5b380, isQueueDrained=NO) + 175 at ASDisplayNode.mm:224 frame #18: 0x012a2771 Pinterest Enterprise-[ASRunLoopQueue processQueue](self=0x7c00ed50, _cmd="processQueue") + 1777 at ASRunLoopQueue.mm:84
      frame Reconsider __ASDisplayLayerMaxConcurrentDisplayCount #19: 0x012a1ef9 Pinterest Enterprise__45-[ASRunLoopQueue initWithRunLoop:andHandler:]_block_invoke(.block_descriptor=0x7c00edf0, observer=0x7c00ee10, activity=32) + 57 at ASRunLoopQueue.mm:35 frame #20: 0x07f3054d CoreFoundation_runLoopObserverWithBlockContext + 29
      frame Added cocoapods badges #21: 0x07f2fffe CoreFoundation__CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 30 frame #22: 0x07f2ff5e CoreFoundation__CFRunLoopDoObservers + 398
      frame All badges #23: 0x07f258dc CoreFoundation__CFRunLoopRun + 1340 frame #24: 0x07f250e6 CoreFoundationCFRunLoopRunSpecific + 470
      frame Mehod -numberOfSectionsInTableView: is optional but not conditionally checked #25: 0x07f24efb CoreFoundationCFRunLoopRunInMode + 123 frame #26: 0x094d3664 GraphicsServicesGSEventRunModal + 192
      frame {.location = 0, .length = 0} is a valid NSRange #27: 0x094d34a1 GraphicsServicesGSEventRun + 104 frame #28: 0x04ef1bfa UIKitUIApplicationMain + 160
      frame Need global locking in ASTextNodeRenderer. #29: 0x0016c5ac Pinterest Enterprisemain(argc=1, argv=0xbffc88c4) + 252 at main.m:24 frame #30: 0x0885ba21 libdyld.dylibstart + 1

    thread Added Travis configuration #24: tid = 0x1f4c3a7, 0x08b9243a libsystem_kernel.dylib__psynch_mutexwait + 10, queue = 'com.apple.root.default-qos' frame #0: 0x08b9243a libsystem_kernel.dylib__psynch_mutexwait + 10
    frame Use correct format identifiers for logs on 64 bit systems. #1: 0x08b5bc21 libsystem_pthread.dylib_pthread_mutex_lock_wait + 99 frame #2: 0x08b5be0d libsystem_pthread.dylib_pthread_mutex_lock_slow + 277
    frame Inconsistent boolean property naming #3: 0x08b56101 libsystem_pthread.dylibpthread_mutex_lock + 138 frame #4: 0x00849cb0 Pinterest EnterpriseASDN::Mutex::lock(this=0x7e711e48) + 48 at ASThread.h:124
    frame Unexport _ASAsyncTransactionContainer+Private.h in podspec, project file #5: 0x00849c74 Pinterest EnterpriseASDN::Locker<ASDN::Mutex>::Locker(this=0xb0092dc0, l=0x7e711e48) + 36 at ASThread.h:69 frame #6: 0x00849844 Pinterest EnterpriseASDN::LockerASDN::Mutex::Locker(this=0xb0092dc0, l=0x7e711e48) + 36 at ASThread.h:68
    frame Caching code seems entirely unused #7: 0x012467d7 Pinterest Enterprise-[ASDisplayNode invalidateCalculatedLayout](self=0x7e711e00, _cmd="invalidateCalculatedLayout") + 55 at ASDisplayNode.mm:1892 frame #8: 0x01264cd3 Pinterest Enterprise-[ASImageNode setImage:](self=0x7e711e00, _cmd="setImage:", image=0x7bf22170) + 211 at ASImageNode.mm:136
    frame Add umbrella header #9: 0x0128c3c5 Pinterest Enterprise-[ASNetworkImageNode setDefaultImage:](self=0x7e711e00, _cmd="setDefaultImage:", defaultImage=0x7bf22170) + 277 at ASNetworkImageNode.mm:143 frame #10: 0x00a666a0 Pinterest Enterprise__100-[PIPinnerRoundedImageNode makeAndSetDefaultImage:text:fontSize:cornerRadius:scale:backgroundColor:]_block_invoke(.block_descriptor=0x7e88f660) + 192 at PIPinnerRoundedImageNode.m:64
    frame [ASDisplayNode] Support UIMenuController #11: 0x0880e377 libdispatch.dylib`_dispatch_call_block_and_release + 15::

@appleguy appleguy added this to the 1.9.7 milestone Mar 17, 2016
@nguyenhuy
Copy link
Contributor

LGTM 👍

@maicki
Copy link
Contributor

maicki commented Mar 17, 2016

Looks good

appleguy added a commit that referenced this pull request Mar 17, 2016
[ASImageNode] -setDefaultImage: should release lock before calling -setImage:
@appleguy appleguy merged commit 37a0ba2 into master Mar 17, 2016
@appleguy appleguy deleted the ImageNodeDeadlock branch March 17, 2016 05:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants