{"action":"created","issue":{"url":"https://api.github.com/repos/BelledonneCommunications/linphone-iphone/issues/71","repository_url":"https://api.github.com/repos/BelledonneCommunications/linphone-iphone","labels_url":"https://api.github.com/repos/BelledonneCommunications/linphone-iphone/issues/71/labels{/name}","comments_url":"https://api.github.com/repos/BelledonneCommunications/linphone-iphone/issues/71/comments","events_url":"https://api.github.com/repos/BelledonneCommunications/linphone-iphone/issues/71/events","html_url":"https://github.com/BelledonneCommunications/linphone-iphone/issues/71","id":155673256,"number":71,"title":"Library crash after registration","user":{"login":"reste85","id":14905251,"avatar_url":"https://avatars.githubusercontent.com/u/14905251?v=3","gravatar_id":"","url":"https://api.github.com/users/reste85","html_url":"https://github.com/reste85","followers_url":"https://api.github.com/users/reste85/followers","following_url":"https://api.github.com/users/reste85/following{/other_user}","gists_url":"https://api.github.com/users/reste85/gists{/gist_id}","starred_url":"https://api.github.com/users/reste85/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reste85/subscriptions","organizations_url":"https://api.github.com/users/reste85/orgs","repos_url":"https://api.github.com/users/reste85/repos","events_url":"https://api.github.com/users/reste85/events{/privacy}","received_events_url":"https://api.github.com/users/reste85/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-05-19T07:45:23Z","updated_at":"2016-05-19T09:48:09Z","closed_at":null,"body":"Hi,\r\nApp is crashing after registration to SIP server. Here's the backtrace:\r\n\r\n```\r\n thread #1: tid = 0x3aacf, 0x0000000103ddd823 elvox`belle_sip_object_unref + 195, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=EXC_I386_GPFLT)\r\n    frame #0: 0x0000000103ddd823 elvox`belle_sip_object_unref + 195\r\n    frame #1: 0x0000000103f77776 elvox`handle_notify + 182\r\n    frame #2: 0x0000000103e0911e elvox`belle_sip_provider_dispatch_message + 1022\r\n    frame #3: 0x0000000103deabc5 elvox`belle_sip_channel_process_stream + 213\r\n    frame #4: 0x0000000103de9146 elvox`belle_sip_channel_process_data + 326\r\n    frame #5: 0x0000000103e11041 elvox`stream_channel_process_data + 161\r\n    frame #6: 0x0000000103ddcbb1 elvox`belle_sip_main_loop_iterate + 689\r\n    frame #7: 0x0000000103ddce68 elvox`belle_sip_main_loop_sleep + 168\r\n    frame #8: 0x0000000103f713f2 elvox`sal_iterate + 18\r\n    frame #9: 0x0000000103fa7764 elvox`linphone_core_iterate + 788\r\n  * frame #10: 0x0000000103b1f7dc elvox`-[LinphoneManager iterate](self=0x00007f8c73dd91a0, _cmd=\"iterate\") + 28 at LinphoneManager.m:1356\r\n    frame #11: 0x0000000107845811 Foundation`__NSFireTimer + 83\r\n    frame #12: 0x0000000108d0c074 CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 20\r\n    frame #13: 0x0000000108d0bc21 CoreFoundation`__CFRunLoopDoTimer + 1089\r\n    frame #14: 0x0000000108ccdb11 CoreFoundation`__CFRunLoopRun + 1937\r\n    frame #15: 0x0000000108ccd0f8 CoreFoundation`CFRunLoopRunSpecific + 488\r\n    frame #16: 0x000000010a281ad2 GraphicsServices`GSEventRunModal + 161\r\n    frame #17: 0x00000001059abf09 UIKit`UIApplicationMain + 171\r\n    frame #18: 0x0000000103b329b2 elvox`main + 114 at AppDelegate.swift:12\r\n    frame #19: 0x000000010a68f92d libdyld.dylib`start + 1\r\n    frame #20: 0x000000010a68f92d libdyld.dylib`start + 1\r\n\r\n\r\nHere's the registration code:\r\n`\r\n    NSString *username = @\"200\";\r\n    NSString *password = @\"200\";\r\n    NSString *domain = @\"192.168.0.110\";\r\n    NSString *server = @\"192.168.0.110\";\r\n    \r\n    linphone_core_clear_proxy_config([LinphoneManager getLc]);\r\n    linphone_core_clear_all_auth_info([LinphoneManager getLc]);\r\n   \r\n    LinphoneProxyConfig *proxyCfg = linphone_proxy_config_new();\r\n    linphone_proxy_config_edit(proxyCfg);\r\n    char normalizedUserName[256];\r\n    LinphoneAddress *linphoneAddress = linphone_address_new(\r\n                                                            \"sip:200@192.168.0.110\");\r\n    linphone_proxy_config_normalize_number(proxyCfg, [username cStringUsingEncoding:[NSString defaultCStringEncoding]], normalizedUserName, sizeof(normalizedUserName));\r\n    linphone_address_set_username(linphoneAddress, normalizedUserName);\r\n    linphone_address_set_domain(linphoneAddress, [domain UTF8String]);//domain);\r\n    const char *identity = linphone_address_as_string_uri_only(linphoneAddress);\r\n    linphone_proxy_config_set_identity(proxyCfg, identity);\r\n    linphone_proxy_config_set_server_addr(proxyCfg, [server UTF8String]);\r\n    LinphoneAuthInfo *info = linphone_auth_info_new([username UTF8String], NULL, [password UTF8String], NULL, NULL, linphone_proxy_config_get_domain(proxyCfg));\r\n\r\n    if ([server compare:domain options:NSCaseInsensitiveSearch] != NSOrderedSame)\r\n    {\r\n        linphone_proxy_config_set_route(proxyCfg, [server UTF8String]);\r\n    }\r\n    int defaultExpire = [[LinphoneManager instance] lpConfigIntForKey:@\"default_expires\"];\r\n    if (defaultExpire >= 0)\r\n    {\r\n        linphone_proxy_config_expires(proxyCfg, defaultExpire);\r\n    }\r\n    else\r\n    {\r\n        linphone_proxy_config_expires(proxyCfg, 600);\r\n    }\r\n\r\n    linphone_proxy_config_enable_register(proxyCfg, TRUE);\r\n    linphone_proxy_config_enable_publish(proxyCfg, TRUE);\r\n    linphone_core_add_proxy_config([LinphoneManager getLc], proxyCfg);\r\n    linphone_core_set_default_proxy([LinphoneManager getLc], proxyCfg);\r\n    linphone_core_add_auth_info([LinphoneManager getLc], info);\r\n    linphone_proxy_config_done(proxyCfg);\r\n\r\n    /************************/\r\n    LinphonePresenceModel *presence = linphone_presence_model_new_with_activity(LinphonePresenceActivityOnline, 0);\r\n    linphone_core_set_presence_model([LinphoneManager getLc], presence);`\r\n```\r\n\r\n\r\n\r\nHere's the log:\r\n2016-05-19 09:36:35.053 elvox[1747:240335] 9 user prefs\r\n2016-05-19 09:36:35.053 elvox[1747:240335] onGlobalStateChanged: 1 (message: Starting up)\r\n2016-05-19 09:36:35:082 ortp-warning-VideoToolbox H264 codec is not supported on simulators\r\n2016-05-19 09:36:35.093 elvox[1747:240335] onConfiguringStatusChanged: LinphoneConfiguringSkipped \r\n2016-05-19 09:36:35:097 ortp-warning-./share/sounds/linphone/rings/notes_of_the_optimistic.mkv does not exist\r\n2016-05-19 09:36:35.111 elvox[1747:240335] onGlobalStateChanged: 2 (message: Ready)\r\n2016-05-19 09:36:35.111 elvox[1747:240335] Create linphonecore 0x7f8c74851000\r\n2016-05-19 09:36:35.158 elvox[1747:240335] +[LinphoneUtils deviceModelIdentifier]: Oops, unknown machine x86_64... consider completing me!\r\n2016-05-19 09:36:35:161 ortp-warning-nothing to migrate, skipping...\r\n2016-05-19 09:36:35.164 elvox[1747:240335] Network connection flags: kSCNetworkReachabilityFlagsReachable, \r\n2016-05-19 09:36:35.165 elvox[1747:240335] Network connectivity changed to type [wifi]\r\n2016-05-19 09:36:35.165 elvox[1747:240335] Linphone [3.9.1-1200-g20073c1]  started on [iPhone]\r\n2016-05-19 09:36:45.107 elvox[1747:240335] KALPA PRESENCE\r\n2016-05-19 09:36:45.120 elvox[1747:240335] New registration state: LinphoneRegistrationProgress (message: Registration in progress)\r\n_LinphoneReason(rawValue: 0)\r\n2016-05-19 09:36:45.193 elvox[1747:240335] New registration state: LinphoneRegistrationOk (message: Registration successful)\r\n_LinphoneReason(rawValue: 0)\r\n2016-05-19 09:36:45:194 ortp-error-Object [0x7f8c73cfa820] freed twice or corrupted !"},"comment":{"url":"https://api.github.com/repos/BelledonneCommunications/linphone-iphone/issues/comments/220277825","html_url":"https://github.com/BelledonneCommunications/linphone-iphone/issues/71#issuecomment-220277825","issue_url":"https://api.github.com/repos/BelledonneCommunications/linphone-iphone/issues/71","id":220277825,"user":{"login":"bagage","id":1451988,"avatar_url":"https://avatars.githubusercontent.com/u/1451988?v=3","gravatar_id":"","url":"https://api.github.com/users/bagage","html_url":"https://github.com/bagage","followers_url":"https://api.github.com/users/bagage/followers","following_url":"https://api.github.com/users/bagage/following{/other_user}","gists_url":"https://api.github.com/users/bagage/gists{/gist_id}","starred_url":"https://api.github.com/users/bagage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bagage/subscriptions","organizations_url":"https://api.github.com/users/bagage/orgs","repos_url":"https://api.github.com/users/bagage/repos","events_url":"https://api.github.com/users/bagage/events{/privacy}","received_events_url":"https://api.github.com/users/bagage/received_events","type":"User","site_admin":false},"created_at":"2016-05-19T09:48:09Z","updated_at":"2016-05-19T09:48:09Z","body":"This option is within Linphone application on your device (simulator or real iPhone)."}}