|
From: | BIENKOWSKI Guillaume |
Subject: | Re: [Linphone-developers] linphone iOS 8 crash |
Date: | Mon, 22 Sep 2014 09:10:19 +0200 |
Reply all...
stupidity on my part... in debugging I had not setup the settings. So there was no sip proxy set.
all is well.
Thanks,
--luis
On 9/19/14, 2:35 PM, Luis Soltero wrote:
hm... not sure when things changed... in the old days you could use straight phone numbers as chat urls... now the word sip: must be in front of the number... looking at enum.c
//4970072278724
bool_t is_enum(const char *sipaddress, char **enum_domain){
char *p;
p=strstr(sipaddress,"sip:");
if (p==NULL) return FALSE; /* enum should look like sip:4369959250*/
else p+=4;
if (is_a_number(p)){
if (enum_domain!=NULL){
*enum_domain=create_enum_domain(p);
}
return TRUE;
}
return FALSE;
}
I see that if "sip:phone_number" is present in the url then sip: is stripped and the chat room is allowed... However... if the sip is not present then the chat room is not created
linphone_core_interpret_url now returns NULL
which causes
static LinphoneChatRoom * _linphone_core_get_or_create_chat_room(LinphoneCore* lc, const char* to) {
LinphoneAddress *to_addr=linphone_core_interpret_url(lc,to);
LinphoneChatRoom *ret;
if (to_addr==NULL){
ms_error("linphone_core_get_or_create_chat_room(): Cannot make a valid address with %s",to);
return NULL;
}
ret=_linphone_core_get_chat_room(lc,to_addr);
linphone_address_destroy(to_addr);
if (!ret){
ret=_linphone_core_create_chat_room_from_url(lc,to);
}
return ret;
}
to return NULL...
so it seems that somewhere (not sure where the best place is to do this) is to prepend "sip:" to phone numbers that come out of the address book or to modify is_enum to return TRUE if a number is provided without sip: assuming that sip is implied of not supplied in the URL.
This is the way it used to work. Not sure when "sip:" was enforced for phone numbers.
I will hack the code to fix my issue by prepending "sip:" to phone numbers in ContactDetailsTableViewController.m line 661.
--luis
On 9/19/14, 11:48 AM, BIENKOWSKI Guillaume wrote:
Could you enable the debug logs and tell me if you see this trace:
ms_error("linphone_core_get_or_create_chat_room(): Cannot make a valid address with %s",to);
This is the only reason why it should crash (I'll add a NULL-check here, but this should not happen).
Cheers!
On Fri, Sep 19, 2014 at 5:24 PM, Luis Soltero <address@hidden> wrote:
Same problem with
commit 26dd53e9fb3c35f6eefbfaba0f04878ddd94b087
Author: Guillaume BIENKOWSKI <address@hidden>
Date: Fri Sep 19 16:07:07 2014 +0200
Update linphone
see attached for stack trace. This is a new chat and room == nil.
On 9/19/14, 10:57 AM, BIENKOWSKI Guillaume wrote:
Humm, I can't reproduce this one.
ChatRoomViewController :: -setChatRoom: is only called with rooms coming from linphone_core_get_or_create_chat_room() which returns non-nil chat room (unless no memory is available).
Do you have a backtrace?And logs?
On Fri, Sep 19, 2014 at 2:59 PM, Luis Soltero <address@hidden> wrote:
there is more to it than this...
we are also getting a crash on line 250 of ChatViewRoomController.m where we have a similar problem. When the chatroom is new setChatRoom is called with a nil room which causes the application to crash.
gma mark -
- (void)setChatRoom:(LinphoneChatRoom *)room {
self->chatRoom = room;
[messageField setText:@""];
[tableController setChatRoom:room];
[self update];
Exception occurs here.
linphone_chat_room_mark_as_read(chatRoom);
[self setComposingVisible:linphone_chat_room_is_remote_composing(chatRoom) withDelay:0];
[[NSNotificationCenter defaultCenter] postNotificationName:kLinphoneTextReceived object:self];
}
Did you address this issue as well?
--luis
On 9/19/14, 4:32 AM, BIENKOWSKI Guillaume wrote:
Hello
This is just a change in the way apple does things to the views. We were using an uninitialized array in this case, which lead to an uncatched exception.I have fixed the problem upstream, you can check out the last iOS repository.We'll send an update to the App Store as soon as possible.
On Thu, Sep 18, 2014 at 11:39 PM, Richard Zinn <address@hidden> wrote:
BTW, instead of just returning nil there, if you change that to:if(dataCache.count == 0)return nil;
then it doesn't crash, and at least for the contacts I tested with all of the data seems to appear fine. Not sure if there are data types that are getting omitted though as I'm not really clear on the nature of this bug.
On Thu, Sep 18, 2014 at 2:37 PM, Richard Zinn <address@hidden> wrote:
I'm getting this one too. Let me know if anyone finds a solution. As with Luis, dataCache has 0 objects in it.
On Thu, Sep 18, 2014 at 1:39 PM, Luis Soltero <address@hidden> wrote:
Crash is happening in ContactDetailsTableViewController at line 142
adding a return nil to the top of the method keeps the application from crashing... but the contact info doesn't show
up in the view...
in every instance dataCache has 0 objects. So it looks like loadData is never called.
- (NSMutableArray*)getSectionData:(int)section {
return nil;
if(contactSections[section] == ContactSections_Number) {
return [dataCache objectAtIndex:0];
} else if(contactSections[section] == ContactSections_Sip) {
return [dataCache objectAtIndex:1];
} else if(contactSections[section] == ContactSections_Email) {
if ([[LinphoneManager instance] lpConfigBoolForKey:@"show_contacts_emails_preference"] == true) {
return [dataCache objectAtIndex:2];
} else {
return nil;
}
}
return nil;
Any ideas?
--luis
On 9/18/14, 4:20 PM, Luis Soltero wrote:
> hello all,
>
> linphone v 2.2.2 from the itunes store crashes on iOS 8 when you try to access the contact list. Here is the sequence
>
> 1. run linphone
> 2. go to chat
> 3. click on new discussion
> 4. Select a contact
> 5. boom...
>
> here is the console for the crash log... Any one know how to fix this? we can build from source just need to know what
> patch to apply.
>
>
> 2014-09-18 16:11:25.426 linphone[264:31101] PhoneMainView: Change current view to Contacts
> 2014-09-18 16:11:25.498 linphone[264:31101] Load contact list
> 2014-09-18 16:11:27.059 linphone[264:31101] PhoneMainView: Change current view to ContactDetails
> 2014-09-18 16:11:27.184 linphone[264:31101] Crash: *** -[__NSArrayM objectAtIndex:]: index 0 beyond bounds for empty array
> 2014-09-18 16:11:27.233 linphone[264:31101] Stack Trace: (
> 0 CoreFoundation 0x25023f9f <redacted> + 150
> 1 libobjc.A.dylib 0x3264ac77 objc_exception_throw + 38
> 2 CoreFoundation 0x24f383e7 <redacted> + 230
> 3 linphone 0x00077251 -[ContactDetailsTableViewController getSectionData:] + 92
> 4 linphone 0x0007c1dd -[ContactDetailsTableViewController
> tableView:heightForHeaderInSection:] + 204
> 5 UIKit 0x285701db <redacted> + 302
> 6 UIKit 0x2856e9b9 <redacted> + 172
> 7 UIKit 0x28838be5 <redacted> + 352
> 8 UIKit 0x2856e86d <redacted> + 364
> 9 UIKit 0x2856e685 <redacted> + 56
> 10 UIKit 0x2856e4c1 <redacted> + 344
> 11 UIKit 0x285741b3 <redacted> + 70
> 12 UIKit 0x2849ebe1 <redacted> + 1308
> 13 UIKit 0x284bd957 <redacted> + 50
> 14 UIKit 0x2849e953 <redacted> + 654
> 15 UIKit 0x2849e265 <redacted> + 112
> 16 UIKit 0x2849e181 <redacted> + 428
> 17 UIKit 0x284a85dd <redacted> + 1436
> 18 UIKit 0x284a8037 <redacted> + 30
> 19 linphone 0x00056b4d +[UICompositeViewController addSubView:view:] + 388
> 20 linphone 0x00059195 -[UICompositeViewController update:tabBar:stateBar:fullscreen:] +
> 7532
> 21 linphone 0x000593c3 -[UICompositeViewController changeView:] + 106
> 22 linphone 0x0001cf5f -[PhoneMainView _changeCurrentView:transition:force:] + 618
> 23 linphone 0x0001ccef -[PhoneMainView changeCurrentView:push:] + 278
> 24 linphone 0x00027e45 -[ContactsTableViewController tableView:didSelectRowAtIndexPath:]
> + 412
> 25 UIKit 0x285b7fc7 <redacted> + 918
> 26 UIKit 0x28669627 <redacted> + 194
> 27 UIKit 0x2851b919 <redacted> + 308
> 28 UIKit 0x284977df <redacted> + 458
> 29 CoreFoundation 0x24fea845 <redacted> + 20
> 30 CoreFoundation 0x24fe7f29 <redacted> + 276
> 31 CoreFoundation 0x24fe832b <redacted> + 914
> 32 CoreFoundation 0x24f35db1 CFRunLoopRunSpecific + 476
> 33 CoreFoundation 0x24f35bc3 CFRunLoopRunInMode + 106
> 34 GraphicsServices 0x2c299051 GSEventRunModal + 136
> 35 UIKit 0x28500f01 UIApplicationMain + 1440
> 36 linphone 0x00008fdd main + 124
> 37 libdyld.dylib 0x32be6aaf <redacted> + 2
> )
> 2014-09-18 16:11:27.238 linphone[264:31101] *** Terminating app due to uncaught exception 'NSRangeException', reason:
> '*** -[__NSArrayM objectAtIndex:]: index 0 beyond bounds for empty array'
> *** First throw call stack:
> (0x25023f87 0x3264ac77 0x24f383e7 0x77251 0x7c1dd 0x285701db 0x2856e9b9 0x28838be5 0x2856e86d 0x2856e685 0x2856e4c1
> 0x285741b3 0x2849ebe1 0x284bd957 0x2849e953 0x2849e265 0x2849e181 0x284a85dd 0x284a8037 0x56b4d 0x59195 0x593c3 0x1cf5f
> 0x1ccef 0x27e45 0x285b7fc7 0x28669627 0x2851b919 0x284977df 0x24fea845 0x24fe7f29 0x24fe832b 0x24f35db1 0x24f35bc3
> 0x2c299051 0x28500f01 0x8fdd 0x32be6aaf)
> libc++abi.dylib: terminating with uncaught exception of type NSException
>
--
Luis Soltero, Ph.D., MCS
Director of Software Development, CTO
Global Marine Networks, LLC
StarPilot, LLC
Tel: +1.865.379.8723
Fax: +1.865.681.5017
E-Mail: address@hidden
Web: http://www.globalmarinenet.net
Web: http://www.redportglobal.com
Web: http://www.starpilotllc.com
_______________________________________________
Linphone-developers mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/linphone-developers
_______________________________________________
Linphone-developers mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/linphone-developers
-- Luis Soltero, Ph.D., MCS Director of Software Development, CTO Global Marine Networks, LLC StarPilot, LLC Tel: +1.865.379.8723 Fax: +1.865.681.5017 E-Mail: address@hidden Web: http://www.globalmarinenet.net Web: http://www.redportglobal.com Web: http://www.starpilotllc.com
-- Luis Soltero, Ph.D., MCS Director of Software Development, CTO Global Marine Networks, LLC StarPilot, LLC Tel: +1.865.379.8723 Fax: +1.865.681.5017 E-Mail: address@hidden Web: http://www.globalmarinenet.net Web: http://www.redportglobal.com Web: http://www.starpilotllc.com
-- Luis Soltero, Ph.D., MCS Director of Software Development, CTO Global Marine Networks, LLC StarPilot, LLC Tel: +1.865.379.8723 Fax: +1.865.681.5017 E-Mail: address@hidden Web: http://www.globalmarinenet.net Web: http://www.redportglobal.com Web: http://www.starpilotllc.com
_______________________________________________ Linphone-developers mailing list address@hidden https://lists.nongnu.org/mailman/listinfo/linphone-developers
-- Luis Soltero, Ph.D., MCS Director of Software Development, CTO Global Marine Networks, LLC StarPilot, LLC Tel: +1.865.379.8723 Fax: +1.865.681.5017 E-Mail: address@hidden Web: http://www.globalmarinenet.net Web: http://www.redportglobal.com Web: http://www.starpilotllc.com
_______________________________________________
Linphone-developers mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/linphone-developers
[Prev in Thread] | Current Thread | [Next in Thread] |