Xcode 7b6 issues:: Foundation-[NSLocalizableString length]??

Anyone seen this error before?

I think it relates to a importing a JSON file but I'm not sure??

Foundation`-[NSLocalizableString length]:

0x3bca2e2 <+0>: pushl %ebp

0x3bca2e3 <+1>: movl %esp, %ebp

0x3bca2e5 <+3>: subl $0x8, %esp

-> 0x3bca2e8 <+6>: calll 0x3bca2ed ; <+11>

0x3bca2ed <+11>: popl %eax

0x3bca2ee <+12>: movl 0x8(%ebp), %ecx

0x3bca2f1 <+15>: movl 0x7946f(%eax), %edx

0x3bca2f7 <+21>: movl (%ecx,%edx), %ecx

0x3bca2fa <+24>: movl 0x73417(%eax), %eax

0x3bca300 <+30>: movl %eax, 0x4(%esp)

0x3bca304 <+34>: movl %ecx, (%esp)

0x3bca307 <+37>: calll 0x3bcb900 ; symbol stub for: objc_msgSend

0x3bca30c <+42>: addl $0x8, %esp

0x3bca30f <+45>: popl %ebp

0x3bca310 <+46>: retl

crash report indicates

Crashed Thread: 0 Dispatch queue: com.apple.main-thread


Exception Codes: KERN_PROTECTION_FAILURE at 0x00000000bf79effc

VM Regions Near 0xbf79effc:

Stack 00000000b046b000-00000000b04ec000 [ 516K] rw-/rwx SM=COW

--> Stack 00000000bbf9f000-00000000bf79f000 [ 56.0M] ---/rwx SM=NUL

Stack 00000000bf79f000-00000000bff9f000 [ 8192K] rw-/rwx SM=COW

Application Specific Information:

CoreSimulator 179 - Device: iPad Retina - Runtime: iOS 9.0 (13A4325c) - DeviceType: iPad Retina

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread

0 com.apple.Foundation 0x03bf92e8 -[NSLocalizableString length] + 6

1 com.apple.Foundation 0x03bf930c -[NSLocalizableString length] + 42

2 com.apple.Foundation 0x03bf930c -[NSLocalizableString length] + 42

Post not yet marked as solved Up vote post of iPad_dev Down vote post of iPad_dev


Same error here (Xcode 7 GM). I found the reason on my side:

UITextView in UITableViewCell on [tableView dequeueReusableCellWithIdentifier:cellIdentifier forIndexPath:indexPath] in - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath causes the error. If in storyboard the text is set (eg. 'Text'). But it does not happen in all my table views.

Solution 1 (no real on, see why...):

With a white space 'Text ' or no text, it works. => it's magic...

Solution 2:

My storyboard is in Base.lproj folder outside the app project folder. If I change it to en.lproj folder (still outside the Base.lproj folder) it is working.

I have multiple storyboards and multiple table views. Not verified for all of them. Try to find a better solution. The above ones are not my real choise, but you can verify, if the error is on your table view, too.

Same problem here: when I create a new storyboard and copy all the content over in Interface Builder, the app will run. But as soon as I enable localization for the new storyboard (just base localization, no new language), the error will occur - crash after 30000 calls of [NSLocalizableString length]. App was running fine on xcode6.

I have no clue how to debug this. It seems to me the error occurs during interpretation of the storyboard (after application didFinishLaunchingWithOptions). None of the viewDidLoad methods gets called.

EDIT: Tracked the problem down to a TextView where I specified text content already in Interface Builder. It turns out that this text content is causing the crash in xcode7. Removing the text in IB did the trick (due to localization I had to set it programmatically anyway).

I wrote a Bug Report to Apple.

Thank you for posting this! saved me hours!

This is an amazing solution. I ve done the same and solved the issue. Thanks very much!

My Bug Report was a duplicate. The other report was already opened by someone else. That report is still 'open'. So, keep waiting...

This should be resolved in the Xcode 7.2 beta.