Page 1 of 1

lcidl: objc-string crash with emoticons in text

Posted: Mon Apr 27, 2015 11:04 am
by Thierry
Hi,
As I'm not really sure how to deal with this,
guess it's ok to post it here?

Building an external for iOS7 , 8.1, 8.2 and LC 7,
write an interface in a lcidl file this way:

Code: Select all

      tail command myCommand
               in theText as objc-string
in the associated source file, declare and run this one-line of code:

Code: Select all

       void myCommand( NSString* theText )  {
               NSLog(  "@"Text: %@", theText );
               // pass here and don't see the Log when an emoticon is in the text
and we have to close and restart the app to make it work again.

Emoticons are set in the string theText via the keyboard ( text field)

Regards,

Thierry

Re: lcidl: objc-string crash with emoticons in text

Posted: Mon Apr 27, 2015 1:20 pm
by LCMark
@Thierry: The thing to determine here is whether its the passing of the string to myCommand() which is causing the problem, or NSLog which is causing the problem. If you put an NSLog not referencing theText before the current NSLog, does it get hit?

Re: lcidl: objc-string crash with emoticons in text

Posted: Mon Apr 27, 2015 4:05 pm
by Thierry
@Mark:

Here is a slightly more precise behavior:

Code: Select all

       void myCommand( NSString* theText )  {
               NSLog(  "@"Text: 1" );
               NSLog(  "@"Text: %@", theText );
               NSLog(  "@"Text: 2" );
We can see the 1st and last NSLog but not the middle one (with theText).

NEW:
Hmm, and sometimes (2 times against 50-60 tries) the app crashed when typing an emoticon in the text field.

This is on a mini iPad 2 device with iOS 8. and LC 7.0.4.

Thierry