Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assertion failure in void ASDN::Mutex::unlock()() #932

Closed
choiks14 opened this issue May 22, 2018 · 0 comments
Closed

Assertion failure in void ASDN::Mutex::unlock()() #932

choiks14 opened this issue May 22, 2018 · 0 comments
Assignees
Labels

Comments

@choiks14
Copy link

this is my code


    DispatchQueue.main.async {
      self.present(UINavigationController(rootViewController: SigninViewController()), animated: false)
    }

below is exceptions.

what happend?
please help me.

2018-05-22 14:40:22.864056+0900 jjaljub-iphone[67826:4720838] [Node] Propagating new traits for <jjaljub_iphone.AuthViewController: 0x7fb76d903e80>: { userInterfaceIdiom = Phone; containerSize = {375, 667}; horizontalSizeClass = Compact; verticalSizeClass = Regular; forceTouchCapability = Unavailable }
2018-05-22 14:40:22.868868+0900 jjaljub-iphone[67826:4720838] [Node] View controller <jjaljub_iphone.AuthViewController: 0x7fb76d903e80> will appear
2018-05-22 14:40:26.475113+0900 jjaljub-iphone[67826:4720838] [Node] Propagating new traits for <jjaljub_iphone.SigninViewController: 0x7fb76b426b30>: { userInterfaceIdiom = Phone; containerSize = {375, 667}; horizontalSizeClass = Compact; verticalSizeClass = Regular; forceTouchCapability = Unavailable }
2018-05-22 14:40:26.480710+0900 jjaljub-iphone[67826:4720838] [Node] View controller <jjaljub_iphone.SigninViewController: 0x7fb76b426b30> will appear
2018-05-22 14:40:26.481517+0900 jjaljub-iphone[67826:4720838] *** Assertion failure in std::vector<NSUInteger> findNodesInLayoutAtIndexesWithFilteredNodes(ASLayout *__strong, NSIndexSet *__strong, NSArray<ASDisplayNode *> *__strong, NSArray<ASDisplayNode *> *__strong *)(), /Users/kangsikchoi/Workspace/jjal/jjaljub-iphone/Pods/Texture/Source/Private/ASLayoutTransition.mm:256
2018-05-22 14:40:26.482139+0900 jjaljub-iphone[67826:4720838] *** Assertion failure in void ASDN::Mutex::unlock()(), /Users/kangsikchoi/Workspace/jjal/jjaljub-iphone/Pods/Texture/Source/Details/ASThread.h:238
2018-05-22 14:40:26.487770+0900 jjaljub-iphone[67826:4720838] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Expected pthread_mutex_unlock (this->mutex()) to return 0, got 1 instead'
*** First throw call stack:
(
	0   CoreFoundation                      0x0000000109c2b1e6 __exceptionPreprocess + 294
	1   libobjc.A.dylib                     0x00000001092c0031 objc_exception_throw + 48
	2   CoreFoundation                      0x0000000109c30472 +[NSException raise:format:arguments:] + 98
	3   Foundation                          0x0000000108d9964f -[NSAssertionHandler handleFailureInFunction:file:lineNumber:description:] + 165
	4   AsyncDisplayKit                     0x000000010778b1dc _ZN4ASDN5Mutex6unlockEv + 396
	5   AsyncDisplayKit                     0x000000010778b038 _ZN4ASDN6LockerINS_5MutexEED2Ev + 24
	6   AsyncDisplayKit                     0x0000000107786e15 _ZN4ASDN6LockerINS_5MutexEED1Ev + 21
	7   AsyncDisplayKit                     0x000000010782d0fe -[ASDisplayNode __layout] + 910
	8   AsyncDisplayKit                     0x000000010774eae9 -[_ASDisplayLayer layoutSublayers] + 489
	9   QuartzCore                          0x000000010e47682b _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 395
	10  UIKit                               0x000000010a87668d -[UIView(Hierarchy) layoutBelowIfNeeded] + 662
	11  AsyncDisplayKit                     0x00000001079a9135 -[ASViewController viewWillAppear:] + 261
	12  UIKit                               0x000000010a966dc0 -[UIViewController _setViewAppearState:isAnimating:] + 442
	13  UIKit                               0x000000010a96762f -[UIViewController __viewWillAppear:] + 131
	14  UIKit                               0x000000010a9a87cb -[UINavigationController _startTransition:fromViewController:toViewController:] + 777
	15  UIKit                               0x000000010a9a967e -[UINavigationController _startDeferredTransitionIfNeeded:] + 870
	16  UIKit                               0x000000010a9aa8cc -[UINavigationController __viewWillLayoutSubviews] + 150
	17  UIKit                               0x000000010ac02bd7 -[UILayoutContainerView layoutSubviews] + 231
	18  UIKit                               0x000000010a88c808 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1515
	19  QuartzCore                          0x000000010e47261a -[CALayer layoutSublayers] + 177
	20  QuartzCore                          0x000000010e47682b _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 395
	21  QuartzCore                          0x000000010e3fd29f _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 343
	22  QuartzCore                          0x000000010e42a940 _ZN2CA11Transaction6commitEv + 568
	23  UIKit                               0x000000010a7e5f8c _afterCACommitHandler + 272
	24  CoreFoundation                      0x0000000109bcd607 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
	25  CoreFoundation                      0x0000000109bcd55e __CFRunLoopDoObservers + 430
	26  CoreFoundation                      0x0000000109bb1b81 __CFRunLoopRun + 1537
	27  CoreFoundation                      0x0000000109bb130b CFRunLoopRunSpecific + 635
	28  GraphicsServices                    0x00000001122d1a73 GSEventRunModal + 62
	29  UIKit                               0x000000010a7bd0b7 UIApplicationMain + 159
	30  jjaljub-iphone                      0x000000010735d8c7 main + 55
	31  libdyld.dylib                       0x000000010fa65955 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Signal: SIGABRT (signal SIGABRT)
@nguyenhuy nguyenhuy self-assigned this Jul 9, 2018
@nguyenhuy nguyenhuy added the bug label Jul 9, 2018
nguyenhuy added a commit to nguyenhuy/Texture that referenced this issue Jul 12, 2018
…rement

- Currently, there is a pair of mutex unlock and unlock that wraps around `-_u_measureNodeWithBoundsIfNecessary:` in `__layout`. That is because this method must be called without the lock.
- When an assertion occurs within that method, the runtime bails early without reacquire the lock (so the lock is free now). However, the runtime then hits the end of the outmost mutex locker scope and tries to release the lock that it no longer holds, causing another assertion in ASThread to be shown to user (TextureGroup#932). This makes it extremely hard to idenfity the root assertion.
- Fix by replacing the unlock/lock pair with a mutex unlocker.
nguyenhuy added a commit that referenced this issue Jul 12, 2018
…g node measurement (#1022)

- Currently, there is a pair of mutex unlock and unlock that wraps around `-_u_measureNodeWithBoundsIfNecessary:` in `__layout`. That is because this method must be called without the lock.
- When an assertion occurs within that method, the runtime bails early without reacquire the lock (so the lock is free now). However, the runtime then hits the end of the outmost mutex locker scope and tries to release the lock that it no longer holds, causing another assertion in ASThread to be shown to user (#932). This makes it extremely hard to idenfity the root assertion.
- Fix by replacing the unlock/lock pair with a mutex unlocker.
mikezucc pushed a commit to mikezucc/Texture that referenced this issue Oct 2, 2018
…g node measurement (TextureGroup#1022)

- Currently, there is a pair of mutex unlock and unlock that wraps around `-_u_measureNodeWithBoundsIfNecessary:` in `__layout`. That is because this method must be called without the lock.
- When an assertion occurs within that method, the runtime bails early without reacquire the lock (so the lock is free now). However, the runtime then hits the end of the outmost mutex locker scope and tries to release the lock that it no longer holds, causing another assertion in ASThread to be shown to user (TextureGroup#932). This makes it extremely hard to idenfity the root assertion.
- Fix by replacing the unlock/lock pair with a mutex unlocker.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants