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

Fix misleading/scary stack trace shown when an assertion occurs during node measurement #1022

Merged
merged 2 commits into from
Jul 12, 2018

Commits on Jul 12, 2018

  1. Fix misleading stack trace when an assertion occurs during node measu…

    …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 committed Jul 12, 2018
    Configuration menu
    Copy the full SHA
    fe77208 View commit details
    Browse the repository at this point in the history
  2. Update CHANGELOG

    nguyenhuy committed Jul 12, 2018
    Configuration menu
    Copy the full SHA
    af62402 View commit details
    Browse the repository at this point in the history