linphone-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Linphone-developers] fixed a crash after login


From: Anton Pomozov
Subject: [Linphone-developers] fixed a crash after login
Date: Wed, 03 Sep 2014 15:54:27 +0400

Hi,
I've downloaded project linphone for iOS and run it on my iPhone.
But the app crashed after trying to sign in with existing sip account.

EXC_BAD_ACCESS KERN_INVALID_ADDRESS at 0x00000000
Thread : Crashed: com.apple.main-thread
0  linphone                       0x001144ee belle_sip_object_marshal 
(belle_sip_object.c:495)
1  linphone                       0x001bcf01 sal_address_as_string 
(sal_address_impl.c:139)
2  linphone                       0x001bcf01 sal_address_as_string 
(sal_address_impl.c:139)
3  linphone                       0x001a9b0d sal_op_add_route_address 
(sal.c:377)
4  linphone                       0x001a5809 linphone_configure_op 
(linphonecore.c:2854)
5  linphone                       0x001b1085 linphone_proxy_config_update 
(proxy.c:425)
6  linphone                       0x001c6323 ms_list_for_each (mscommon.c:155)
7  linphone                       0x001a4785 linphone_core_iterate 
(linphonecore.c:2199)
8  linphone                       0x0002d655 -[LinphoneManager iterate] 
(LinphoneManager.m:1105)
9  Foundation                     0x31594b05 __NSFireTimer + 64
10 CoreFoundation                 0x30b75167 
__CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 14
11 CoreFoundation                 0x30b74d7f __CFRunLoopDoTimer + 782
12 CoreFoundation                 0x30b7311b __CFRunLoopRun + 1210
13 CoreFoundation                 0x30addebf CFRunLoopRunSpecific + 522
14 CoreFoundation                 0x30addca3 CFRunLoopRunInMode + 106
15 GraphicsServices               0x35a37663 GSEventRunModal + 138
16 UIKit                          0x3342a14d UIApplicationMain + 1136
17 linphone                       0x0000b30f main (main.m:38)

I've explored sources and have added this check:

From 6d89e476a31d03e89603a1029e7febdc102ed965 Mon Sep 17 00:00:00 2001
From: Anton Pomozov <address@hidden>
Date: Wed, 3 Sep 2014 15:14:11 +0400
Subject: [PATCH] [Fix]: Null pointer dereferencing error

---
coreapi/linphonecore.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c
index 34add6e..57ef3ff 100644
--- a/coreapi/linphonecore.c
+++ b/coreapi/linphonecore.c
@@ -2851,8 +2851,10 @@ static void linphone_transfer_routes_to_op(MSList 
*routes, SalOp *op){
        MSList *it;
        for(it=routes;it!=NULL;it=it->next){
                SalAddress *addr=(SalAddress*)it->data;
-               sal_op_add_route_address(op,addr);
-               sal_address_destroy(addr);
+        if (addr) {
+            sal_op_add_route_address(op,addr);
+            sal_address_destroy(addr);
+        }
        }
        ms_list_free(routes);
}
-- 
1.8.4.2


Best regards
Anton




reply via email to

[Prev in Thread] Current Thread [Next in Thread]