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

crash when set password #88

Open
foolbear opened this issue Nov 14, 2017 · 2 comments
Open

crash when set password #88

foolbear opened this issue Nov 14, 2017 · 2 comments

Comments

@foolbear
Copy link

Simultaneous accesses to 0x1c02f2248, but modification requires exclusive access.
Previous access (a modification) started at PasscodeLock`PasscodeLock.addSign(:) + 912 (0x1059637bc).
Current access (a modification) started at:
0 libswiftCore.dylib 0x0000000105cf1358 swift_beginAccess + 468
1 PasscodeLock 0x0000000105963b7c PasscodeLock.changeStateTo(
:) + 168
2 PasscodeLock 0x00000001059649d8 protocol witness for PasscodeLockType.changeStateTo(:) in conformance PasscodeLock + 64
3 PasscodeLock 0x000000010594bc20 SetPasscodeState.acceptPasscode(
:fromLock:) + 516
4 PasscodeLock 0x000000010594c304 protocol witness for PasscodeLockStateType.acceptPasscode(:fromLock:) in conformance SetPasscodeState + 196
5 PasscodeLock 0x000000010596342c PasscodeLock.addSign(
:) + 1060
6 PasscodeLock 0x0000000105964910 protocol witness for PasscodeLockType.addSign(:) in conformance PasscodeLock + 92
7 PasscodeLock 0x000000010595de54 PasscodeLockViewController.passcodeSignButtonTap(
:) + 216
8 PasscodeLock 0x000000010595df54 @objc PasscodeLockViewController.passcodeSignButtonTap(_:) + 72

@ricobeck
Copy link

ricobeck commented Dec 4, 2017

I had the same issue. This can be resolved by an async dispatch onto the main queue in PasscodeLock.swift:

open func changeStateTo(_ state: PasscodeLockStateType) {
  DispatchQueue.main.async { [weak self] in
    guard let strongSelf = self else { return }
    strongSelf.lockState = state
    strongSelf.delegate?.passcodeLockDidChangeState(strongSelf)
  }
}

@KanybekMomukeyev
Copy link

@ricobeck thanks for quick solution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants