Buddies. Crash in v1.5

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

 



2009/12/2 Jens Jorgensen <jbj1 at ultraemail.net>

> Sorry, just to further elaborate, it seems the gentleman posting here:
>
>
> http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/2009-November/009682.html
>
> found like you did that when an audio device was removed you'd
> eventually get some kind of crash. So if you get the patch from the
> ticket he created there maybe it will solve your problem as well.
>

Hi Jens.
As far as i see, this patch is for previous version of pjlib, not for v1.5.
As i said before, crashes began to happen when i have moved from v1.4.5 to
v1.5.. Moreover, i dont use portaudio at all, because application is for
iPhoneOS.

Anyway, i tried to reproduce problem for pjsua_app. I added next code to
pjsua_app.c:

//
-------------------------------------------------------------------------------------------------------------------------
#define TEST_BUDDIES_COUNT    6
int test_array_buddy_ids[TEST_BUDDIES_COUNT];

static void test_network_disappeared() {
    int i;
    for (i = 0; i < TEST_BUDDIES_COUNT; i++) {
        if (pjsua_buddy_is_valid(test_array_buddy_ids[i])) {
            pjsua_buddy_del(test_array_buddy_ids[i]);
        }
    }
}

static void test_add_buddy(char *uri, int index) {
    pjsua_buddy_config     buddy_cfg;
    int buddy_id;

    pjsua_buddy_config_default(&buddy_cfg);
    buddy_cfg.subscribe = PJ_TRUE;
    buddy_cfg.uri = pj_str(uri);
    pjsua_buddy_add(&buddy_cfg, &buddy_id);
    test_array_buddy_ids[index] = buddy_id;
}

static void test_network_appeared() {
    int i;
    for (i = 0; i < TEST_BUDDIES_COUNT; i++) {
        char buffer[128];
        sprintf(buffer, "sip:buddy%d at iptel.org <sip%3Abuddy%25d at iptel.org>",
i); // i tried to add normal names too, same result
        test_add_buddy(buffer, i);
    }
}
//
-------------------------------------------------------------------------------------------------------------------------

Plus i added appropriate commands in console_app_main() in order to call
test_network_disappeared() and test_network_appeared().

So after pjsua_app started, i called test_network_appeared (in order to add
buddies), waited 3 seconds. called test_network_disappeared, waited 3
seconds. called test_network_appeared. Crash.

Stack:
#0    0x00092f9a in pop_freelist at timer.c:136
#1    0x0009360e in schedule_entry at timer.c:300
#2    0x00093b82 in pj_timer_heap_schedule at timer.c:472
#3    0x000b80d0 in pjsip_endpt_schedule_timer at sip_endpoint.c:759
#4    0x000cc452 in tsx_on_state_null at sip_transaction.c:2118
#5    0x000cb2b1 in pjsip_tsx_send_msg at sip_transaction.c:1590
#6    0x000d0d06 in pjsip_dlg_send_request at sip_dialog.c:1174
#7    0x000a1c68 in pjsip_evsub_send_request at evsub.c:1222
#8    0x000a71f3 in pjsip_pres_send_request at presence.c:588
#9    0x000f32db in subscribe_buddy_presence at pjsua_pres.c:1777
#10    0x000f0a92 in pjsua_buddy_update_pres at pjsua_pres.c:571
#11    0x000f0987 in pjsua_buddy_subscribe_pres at pjsua_pres.c:536
#12    0x000f0700 in pjsua_buddy_add at pjsua_pres.c:472
#13    0x0000cc4f in test_add_buddy at pjsua_app.c:5030
#14    0x0000ccb9 in test_network_appeared at pjsua_app.c:5039
#15    0x0000b3bd in console_app_main at pjsua_app.c:4238
#16    0x0000c66a in app_main at pjsua_app.c:4741
#17    0x00001b86 in main at main.c:87


One more thing. On device sometimes there is crash in another place (though
my actions are the same - adding buddies after the network event). This
stack i failed to reproduce in Simulator:
0x000f0f08 pjsip_dlg_dec_lock + 24
0x001121ac subscribe_buddy_presence + 1152
0x0010f860 pjsua_buddy_update_pres + 196
0x0010f768 pjsua_buddy_subscribe_pres + 124
0x0010f464 pjsua_buddy_add + 1404

Hope this helps.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20091202/046da5b3/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pjsua_app_log.txt.zip
Type: application/zip
Size: 4029 bytes
Desc: not available
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20091202/046da5b3/attachment-0001.zip>


[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux