Simultaneous accesses to 0x1c0a7f0f8, but modification requires exclusive access error on Xcode 9 beta 4

I think this ‘bug’ may be a Swift 4 ‘feature’, specifically something they call ‘Exclusive access to Memory’.

Check out this WWDC video. Around the 50 minute mark, the long-haired speaker explains it.

https://developer.apple.com/videos/play/wwdc2017/402/?time=233

You could try turning the thread sanitizer off in your scheme settings if you’re happy to ignore it. However, the debugger is trying to tell you about a subtle threading issue so it’s probably a better use of your time to try to figure out why you’ve got something writing to your array at the same time it’s being read from.

Leave a Comment