Add exception handling for NULL string
If we add "Environment=G_DEBUG=fatal-warnings" to telephony-daemon.service for debugging, telephony-daemon crashs with below call stack.
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
0 0xb6ce1dc4 in raise () from /lib/libc.so.6
1 0xb6e84408 in _g_log_abort (breakpoint=<optimized out>) at gmessages.c:546
2 0xb6e85774 in g_logv (log_domain=0xb6e85774 <g_logv+772> "\300\377\377\352", log_level=log_level@entry=G_LOG_LEVEL_CRITICAL, format=format@entry=0x0, args=..., args@entry=...) at gmessages.c:1357
3 0xb6e85824 in g_log (log_domain=<optimized out>, log_level=log_level@entry=G_LOG_LEVEL_CRITICAL, format=0xb6ed5a7c "%s: assertion '%s' failed") at gmessages.c:1398
4 0xb6e85dc0 in g_return_if_fail_warning (log_domain=<optimized out>, pretty_function=<optimized out>, expression=<optimized out>) at gmessages.c:2688
5 0xb6eb68a4 in g_variant_new_string (string=0x0) at gvariant.c:1275
6 0xb6ebad38 in g_variant_valist_new_nnp (str=0xbefff1bc, ptr=0x0) at gvariant.c:4826
7 0xb6ebc67c in g_variant_valist_new_leaf (app=0xbefff1d4, str=0xbefff1bc) at gvariant.c:5019
8 g_variant_valist_new (str=str@entry=0xbefff1bc, app=app@entry=0xbefff1d4) at gvariant.c:5210
9 0xb6ebc550 in g_variant_valist_new (str=0xbefff1bc, str@entry=0xbefff1b4, app=app@entry=0xbefff1d4) at gvariant.c:5262
10 0xb6ebc8b8 in g_variant_new_va (format_string=<optimized out>, endptr=0x0, app=0xbefff1d4) at gvariant.c:5438
11 0xb6ebc97c in g_variant_new (format_string=0xb3fd0288 "(iibisss)") at gvariant.c:5373
12 0xb3fb82f2 in _telephony_network_on_signal_property_info (object=<optimized out>, arg_changed_type=1, arg_service_type=1, arg_roaming_status=0, arg_name_option=0, arg_plmn=0x0, arg_spn_name=0x0, arg_network_name=0x0) at /usr/src/debug/tel-plugin-dbus_tapi-0.4.01/generated-code.c:11171
13 0xb6b90af8 in ffi_call_SYSV () from /lib/libffi.so.6
14 0xb6b9127e in ffi_call () from /lib/libffi.so.6
15 0xb6c29e80 in g_cclosure_marshal_generic (closure=<optimized out>, return_gvalue=<optimized out>, n_param_values=8, param_values=<optimized out>, invocation_hint=<optimized out>, marshal_data=<optimized out>) at gclosure.c:1490
16 0xb6c29594 in g_closure_invoke (closure=closure@entry=0x2a04eda8, return_value=return_value@entry=0x0, n_param_values=8, param_values=0xbefff4d0, param_values@entry=0xbefff69c, invocation_hint=invocation_hint@entry=0xbefff48c) at gclosure.c:804
17 0xb6c3c664 in signal_emit_unlocked_R (node=node@entry=0x2a04edf8, detail=
3204445324, detail@entry=0, instance=0x154, instance@entry=0x2a0529c8, emission_return=emission_return@entry=0x0, instance_and_params=instance_and_params@entry=0xbefff4d0) at gsignal.c:3673
18 0xb6c45018 in g_signal_emit_valist (instance=instance@entry=0x1, signal_id=signal_id@entry=138, detail=detail@entry=0, var_args=..., var_args@entry=...) at gsignal.c:3391
19 0xb6c4574c in g_signal_emit_by_name (instance=0x1, instance@entry=0x2a0529c8, detailed_signal=0xb3fd1f68 "property-info") at gsignal.c:3487
20 0xb3fb75d2 in telephony_network_emit_property_info (object=object@entry=0x2a0529c8, arg_changed_type=<optimized out>, arg_service_type=<optimized out>, arg_roaming_status=<optimized out>, arg_name_option=arg_name_option@entry=0, arg_plmn=arg_plmn@entry=0x0, arg_spn_name=arg_spn_name@entry=0x0, arg_network_name=arg_network_name@entry=0x0) at /usr/src/debug/tel-plugin-dbus_tapi-0.4.01/generated-code.c:6084
21 0xb3f8d466 in __check_network_properties (network=network@entry=0x2a0529c8, o=o@entry=0x2a0246d0, cp_name=cp_name@entry=0x2a01f8c0 "sprdmodem0", req_type=<optimized out>, req_type@entry=12291) at /usr/src/debug/tel-plugin-dbus_tapi-0.4.01/src/dtapi_network.c:371
22 0xb3f8ea9e in dbus_plugin_network_notification (ctx=ctx@entry=0x2a01d180, source=source@entry=0x2a0246d0, object=object@entry=0xb2d038b0, command=command@entry=TNOTI_NETWORK_REGISTRATION_STATUS, data_len=data_len@entry=16, data=data@entry=0xbefff8e4) at /usr/src/debug/tel-plugin-dbus_tapi-0.4.01/src/dtapi_network.c:1549
23 0xb3f8bfbe in dtapi_send_notification (comm=<optimized out>, source=0x2a0246d0, command=TNOTI_NETWORK_REGISTRATION_STATUS, data_len=16, data=0xbefff8e4) at /usr/src/debug/tel-plugin-dbus_tapi-0.4.01/src/dtapi_main.c:637
24 0xb6f602a8 in tcore_server_broadcast_notification (s=0x2a01bc50, source=0x2a0246d0, command=TNOTI_NETWORK_REGISTRATION_STATUS, data_len=16, data=0xbefff8e4) at /usr/src/debug/libtcore-0.3.30/src/server.c:643
25 0xb3723158 in ?? () from /usr/lib/telephony/plugins/modems/spreadtrum-plugin.so
26 0xb371f80a in ?? () from /usr/lib/telephony/plugins/modems/spreadtrum-plugin.so
27 0xb6f6700e in _on_at_event (at=<optimized out>, lines=<optimized out>, user_data=<optimized out>) at /usr/src/debug/libtcore-0.3.30/src/core_object/core_object.c:139
28 0xb6f61d70 in _emit_unsolicited_message (at=at@entry=0x2a022de8, line=<optimized out>) at /usr/src/debug/libtcore-0.3.30/src/at.c:273
29 0xb6f6268e in tcore_at_process (at=0x2a022de8, data_len=data_len@entry=57, data=data@entry=0x2a067e00 "\r\n+SPECC\r\n\r\n+SPFD: 0\r\n\r\n+CGREG: 8\r\n\r\n+CREG: 8\r\n\r\n+SPECC\r\n") at /usr/src/debug/libtcore-0.3.30/src/at.c:794
30 0xb6f61892 in tcore_hal_dispatch_response_data (hal=0x2a022d90, id=<optimized out>, data_len=57, data=0x2a067e00) at /usr/src/debug/libtcore-0.3.30/src/hal.c:384
31 0xb4203324 in ?? () from /usr/lib/telephony/plugins/multisim_spreadtrum-plugin.so
32 0xb6e7e654 in g_main_dispatch (context=0x2a01ac00) at gmain.c:3234
33 g_main_context_dispatch (context=context@entry=0x2a01ac00) at gmain.c:3887
34 0xb6e7e9e4 in g_main_context_iterate (context=0x2a01ac00, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3960
35 0xb6e7ed44 in g_main_loop_run (loop=0x2a01a470) at gmain.c:4156
36 0xb6f6034c in tcore_server_run (s=0x2a01bc50) at /usr/src/debug/libtcore-0.3.30/src/server.c:248
37 0x2a0021d2 in main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/telephony-daemon-1.4.12/src/main.c:452
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Change-Id: I84bc510d156bd563fd72f11e0f1e85dc664d11fd
Signed-off-by: INSUN PYO <insun.pyo@samsung.com>
Signed-off-by: sinikang <sinikang@samsung.com>