lcidl: objc-string crash with emoticons in text

If you find an issue in LiveCode but are having difficulty pinning down a reliable recipe or want to sanity-check your findings with others, this is the place.

Please have one thread per issue, and try to summarize the issue concisely in the thread title so others can find related issues here.

Moderator: Klaus

Post Reply
Thierry
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 875
Joined: Wed Nov 22, 2006 3:42 pm

lcidl: objc-string crash with emoticons in text

Post by Thierry » Mon Apr 27, 2015 11:04 am

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
Last edited by Thierry on Mon Apr 27, 2015 4:12 pm, edited 1 time in total.
!
SUNNY-TDZ.COM doesn't belong to me since 2021.
To contact me, use the Private messages. Merci.
!

LCMark
Livecode Staff Member
Livecode Staff Member
Posts: 1232
Joined: Thu Apr 11, 2013 11:27 am

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

Post by LCMark » Mon Apr 27, 2015 1:20 pm

@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?

Thierry
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 875
Joined: Wed Nov 22, 2006 3:42 pm

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

Post by Thierry » Mon Apr 27, 2015 4:05 pm

@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
!
SUNNY-TDZ.COM doesn't belong to me since 2021.
To contact me, use the Private messages. Merci.
!

Post Reply