10

The app just hangs on iOS7,8,9, makes 30000 calls to [NSLocalizableString length] The cpu is on max.

see https://forums.developer.apple.com/thread/16001 also

(lldb) bt 
* thread #1: tid = 0x2cb4df, 0x0349065c Foundation`-[NSLocalizableString length] + 6, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=2, address=0xbf728ffc) 
  * frame #0: 0x0349065c Foundation`-[NSLocalizableString length] + 6 
    frame #1: 0x03490680 Foundation`-[NSLocalizableString length] + 42 
    frame #2: 0x03490680 Foundation`-[NSLocalizableString length] + 42 
    frame #3: 0x03490680 Foundation`-[NSLocalizableString length] + 42 
    frame #4: 0x03490680 Foundation`-[NSLocalizableString length] + 42 
    frame #5: 0x03490680 Foundation`-[NSLocalizableString length] + 42 
    frame #6: 0x03490680 Foundation`-[NSLocalizableString length] + 42 
    frame #7: 0x03490680 Foundation`-[NSLocalizableString length] + 42 
    frame #8: 0x03490680 Foundation`-[NSLocalizableString length] + 42 
    frame #9: 0x03490680 Foundation`-[NSLocalizableString length] + 42 
    frame #10: 0x03490680 Foundation`-[NSLocalizableString length] + 42 
    frame #11: 0x03490680 Foundation`-[NSLocalizableString length] + 42 
    frame #12: 0x03490680 Foundation`-[NSLocalizableString length] + 42 
    frame #13: 0x03490680 Foundation`-[NSLocalizableString length] + 42 
    frame #14: 0x03490680 Foundation`-[NSLocalizableString length] + 42 
    frame #15: 0x03490680 Foundation`-[NSLocalizableString length] + 42 
    frame #16: 0x03490680 Foundation`-[NSLocalizableString length] + 42 
    frame #17: 0x03490680 Foundation`-[NSLocalizableString length] + 42 
Zsolt
  • 3,648
  • 3
  • 32
  • 47

3 Answers3

22

I checked the English checkmark in addition to the Base, and it stopped having problems.

settings

Zsolt
  • 3,648
  • 3
  • 32
  • 47
  • 1
    The problem with this solution though is that if you add a new textview to the storyboard for example, you have to remove the localisation, and re add it. Otherwise you might get the same problem as before. – Zsolt Sep 22 '15 at 09:00
  • Thanks a lot. Helped recreating localizable strings file in storyboard. – Massmaker Oct 02 '15 at 08:17
  • I found that if I checked English, ran the app, then unchecked English, things were fine. Definitely seems like a bug in Xcode. – Mark Suman Oct 09 '15 at 22:04
3

If one does not need Base internationalization, one can turn it off in the project settings - this fixed the problem in my case:

turn off base internationalization

When turning base internationalization off, the affected files (storyboard, launchscreen) are moved from base.lproj to en.lproj. It looks like there are problems when base.lproj is used without at least one (primary) language.

I encountered the problem after creating a new project in Xcode 6.4 and then opening it in Xcode 7.

Rainer Schwarze
  • 4,725
  • 1
  • 27
  • 49
0

What I did is change the Localization native development region From China to United States.

img

ZYiOS
  • 5,204
  • 3
  • 39
  • 45