Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
405 views
in Technique[技术] by (71.8m points)

ios - Error message '_BSMachError: (os/kern) invalid capability (20)'

Please note that this error message is pretty low level, so it crops up for different reasons in different scenarios. If you have a scenario that isn't mentioned in one of the answers below, please consider adding your situation as well, so maybe this could be a central answer for various situations that raise this error message.

Edit Nov 10, 2015 Also note, I marked my own answer as the answer, but that was before anyone else had posted. I guess none should really be marked as the answer, because as we've now seen below... this error doesn't have just one answer because it's so low level.

I'm running

  • iOS 9.0 Simulator
  • XCode 7.0

Everything was working fine yesterday.

Today, after a bunch of work on rotation related stuff, I started getting this error in my console output when I run the app in the Simulator and I rotate it.

_BSMachError: (os/kern) invalid capability (20)

_BSMachError: (os/kern) invalid name (15)

Screenshot for this issue - I've cleared my build folder, - I've cleaned the derived data folder, - I've reset the simulator.

I was working with

  • UIViewController viewWillLayoutSubviews
  • UIViewController viewWillTransitionToSize:...

I was also checking various 'Drawing' settings on the Attributes Inspector in IB.

I also made a utility category on UIView where I created a bunch of methods that create CGRect's and helps me assign frames to views.

Root View Controller

Root View Controller Settings

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Based on the https://forums.developer.apple.com/thread/15683:

Change "Localization native development region" in info.plist to United States instead of en.

Updated: Then you can revert these changes back.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...