Reveal library crashes app when -AppleLanguages (xx) launch option is supplied

Jan Klausa's Avatar

Jan Klausa

12 Dec, 2013 08:51 AM

So, as you asked on Twitter 1, reproduction step.

  1. Open existing iOS project/create new empty one, doesn't matter
  2. Integrate Reveal (I used both static linking method and Cocoapods)
  3. Edit build scheme
  4. Add -AppleLanguages (LANGUAGE_CODE) [2][3]
  5. Run app on simulator/device
  6. Open a connection with Reveal
  7. App crashes.

Stack trace:

2013-12-12 09:45:25.413 asd[57155:70b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** setObjectForKey: object cannot be nil (key: shi-Tfng_MA)'
*** First throw call stack:
(
    0   CoreFoundation                      0x01a205e4 __exceptionPreprocess + 180
    1   libobjc.A.dylib                     0x015768b6 objc_exception_throw + 44
    2   CoreFoundation                      0x01aaa578 -[__NSDictionaryM setObject:forKey:] + 888
    3   CoreFoundation                      0x01aaf23f -[NSMutableDictionary setObject:forKeyedSubscript:] + 47
    4   asd                                 0x00032fe9 -[IBAApplicationController availableLocaleIdentifiers] + 891
    5   asd                                 0x0003295d __40-[IBAApplicationController application:]_block_invoke + 1636
    6   libdispatch.dylib                   0x02069440 _dispatch_barrier_sync_f_slow_invoke + 71
    7   libdispatch.dylib                   0x0207a4b0 _dispatch_client_callout + 14
    8   libdispatch.dylib                   0x0206875e _dispatch_main_queue_callback_4CF + 340
    9   CoreFoundation                      0x01a85a5e __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 14
    10  CoreFoundation                      0x019c66bb __CFRunLoopRun + 1963
    11  CoreFoundation                      0x019c5ac3 CFRunLoopRunSpecific + 467
    12  CoreFoundation                      0x019c58db CFRunLoopRunInMode + 123
    13  GraphicsServices                    0x03c739e2 GSEventRunModal + 192
    14  GraphicsServices                    0x03c73809 GSEventRun + 104
    15  UIKit                               0x002e4d3b UIApplicationMain + 1225
    16  asd                                 0x00002bbd main + 141
    17  libdyld.dylib                       0x0230c70d start + 1
    18  ???                                 0x00000003 0x0 + 3
)
libc++abi.dylib: terminating with uncaught exception of type NSException

[2]: I used -AppleLanguages (pl), since I'm currently debugging Polish version of an app, but I'm quite sure it'll crash with whatever. [3]: I feel really weird linking, you, all of the people NSHipster, but in case you don't know what that does, here's a great write-up: http://nshipster.com/launch-arguments-and-environment-variables/

  1. 1 Posted by Jan Klausa on 12 Dec, 2013 09:03 AM

    Jan Klausa's Avatar

    Ugh, this horrible support thing completely mangled my stack trace. My whole post, in fact. Here it is in markdown:

    http://hastebin.com/xaqafomiwi.md

  2. Support Staff 2 Posted by Oliver Jones on 12 Dec, 2013 11:41 PM

    Oliver Jones's Avatar

    I fixed your stack trace. You just have to surround pre-formatted text in 3 back-quotes or @ symbols in Tender's version of Markdown.

    Thanks for this info. I'll try and reproduce your problem and hopefully a fix will be in the next patch release of Reveal.

  3. Support Staff 3 Posted by Oliver Jones on 13 Dec, 2013 12:56 AM

    Oliver Jones's Avatar

    Thanks for this bug report. I reproduced the problem and a fix will be in the next version of Reveal. In the mean time, in order for Reveal to work reliably you'll have to have the app in the en_US locale. Sorry about that.

  4. Oliver Jones closed this discussion on 13 Dec, 2013 12:56 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac