Languages

Menu
Sites
Language
Can not start Service if it uses function from a shared libary

Hi,

I have a UI (TestUI) with a button. If I press the button the callback launches a Service (CentralService). This Service is linked to a shared libary which I would like to use. In this libary exist a function do_somethink(). The problem is if I use do_somethink() the service can not be started. If I do not use the function the service is  starting fine. ( do_somethink() is just an example. This Problem occur with every function, even if the function is empty and has no code inside )

I can build and deploy the project with no errors to the Gear Fit 2. All the code is in C. What do I missing? What is the mistake? Please, if anyone has an idea or a solution, shared it. Thanks.

 

 

// Code in service

bool service_app_create(void *app_data)
{

   dlog_print(DLOG_INFO, LOG_TAG, "Service Started");

   do_somethink();  // The Service is not started

   // do_somethink();  // The Service is starting

}

// Code in the libary

// lib.h

EXPORT_API void do_somethink();

// lib.c

void do_somethink() {

// is empty

}

 

If I do not use the function:

I/testui  (17162): toggle_service called
I/app_service_handling(17162): App launch request sent!
I/app_service_handling(17162): App control destroyed.
I/centralservice(17234): Service Started


If I use the function:

I/testui  (16935): toggle_service called
I/app_service_handling(16935): App launch request sent!
I/app_service_handling(16935): App control destroyed.

 

Furthermore I get this errro:  amd_launch.c: __check_cmdline(542) > process launched, but cmdline not changed

 

 

09-17 09:27:49.991 : Error / EFL ( 10735 : 10735 ) : ecore_x<10735> ecore_x_events.c:563 _ecore_x_event_handle_button_press() ButtonEvent:press time=54937610 button=1
09-17 09:27:50.006 : Error / EFL ( 10735 : 10735 ) : ecore_x<10735> ecore_x_events.c:722 _ecore_x_event_handle_button_release() ButtonEvent:release time=54937620 button=1
09-17 09:27:50.016 : Error / WMS ( 501 : 501 ) : wms_event_handler.c: _wms_event_handler_cb_nomove_detector(21920) > _wms_event_handler_cb_nomove_detector is called
09-17 09:27:50.036 : Info / testui ( 10735 : 10735 ) : toggle_service called
09-17 09:27:50.036 : Warning / AUL ( 10735 : 10735 ) : launch.c: app_request_to_launchpad(268) > request cmd(0) to(org.example.centralservice)
09-17 09:27:50.041 : Warning / AUL_AMD ( 520 : 520 ) : amd_request.c: __request_handler(645) > __request_handler: 0
09-17 09:27:50.041 : Warning / AUL_AMD ( 520 : 520 ) : amd_launch.c: _start_app(1710) > caller pid : 10735
09-17 09:27:50.056 : Warning / AUL_AMD ( 520 : 520 ) : amd_launch.c: start_process(580) > child process: 13399
09-17 09:27:50.076 : Error / AUL_AMD ( 520 : 520 ) : amd_launch.c: __check_cmdline(520) > error founded when being launched with 13399
09-17 09:27:50.116 : Warning / AUL ( 13405 : 13405 ) : daemon-manager-release-agent.c: main(12) > release agent : [2:/org.example.centralservice]
09-17 09:27:50.126 : Error / AUL_AMD ( 520 : 520 ) : amd_launch.c: __check_cmdline(520) > error founded when being launched with 13399
09-17 09:27:50.176 : Error / AUL_AMD ( 520 : 520 ) : amd_launch.c: __check_cmdline(520) > error founded when being launched with 13399
09-17 09:27:50.226 : Error / AUL_AMD ( 520 : 520 ) : amd_launch.c: __check_cmdline(520) > error founded when being launched with 13399
09-17 09:27:50.281 : Error / AUL_AMD ( 520 : 520 ) : amd_launch.c: __check_cmdline(520) > error founded when being launched with 13399
09-17 09:27:50.331 : Error / AUL_AMD ( 520 : 520 ) : amd_launch.c: __check_cmdline(520) > error founded when being launched with 13399
09-17 09:27:50.381 : Error / AUL_AMD ( 520 : 520 ) : amd_launch.c: __check_cmdline(520) > error founded when being launched with 13399
09-17 09:27:50.436 : Error / AUL_AMD ( 520 : 520 ) : amd_launch.c: __check_cmdline(520) > error founded when being launched with 13399
09-17 09:27:50.486 : Error / AUL_AMD ( 520 : 520 ) : amd_launch.c: __check_cmdline(520) > error founded when being launched with 13399
09-17 09:27:50.536 : Error / AUL_AMD ( 520 : 520 ) : amd_launch.c: __check_cmdline(520) > error founded when being launched with 13399
09-17 09:27:50.561 : Warning / W_INDICATOR ( 652 : 652 ) : windicator_battery.c: windicator_battery_icon_update(305) > [windicator_battery_icon_update:305] 96%
09-17 09:27:50.576 : Error / EFL ( 652 : 652 ) : <652> elm_main.c:1180 elm_object_part_text_set() safety check failed: obj == NULL
09-17 09:27:50.576 : Warning / W_INDICATOR ( 652 : 652 ) : windicator_battery.c: windicator_battery_icon_update(315) > [windicator_battery_icon_update:315] battery_level: 96, isCharging: 0
09-17 09:27:50.586 : Error / AUL_AMD ( 520 : 520 ) : amd_launch.c: __check_cmdline(520) > error founded when being launched with 13399
09-17 09:27:50.591 : Warning / W_INDICATOR ( 652 : 652 ) : windicator_battery.c: windicator_battery_icon_update(342) > [windicator_battery_icon_update:342] [SIGNAL] battery file : change_level_100
09-17 09:27:50.596 : Warning / W_INDICATOR ( 652 : 652 ) : windicator_moment_view.c: wnidicator_moment_view_battery_image_update(162) > [wnidicator_moment_view_battery_image_update:162] ad->is_connected : 0 // ad->is_full : 4 // ad->is_charged : 0
09-17 09:27:50.596 : Warning / W_INDICATOR ( 652 : 652 ) : windicator_moment_view.c: wnidicator_moment_view_battery_image_update(171) > [wnidicator_moment_view_battery_image_update:171] [HIDE charging icon] Not connected or Battery full (5)
09-17 09:27:50.596 : Warning / W_INDICATOR ( 652 : 652 ) : windicator_moment_view.c: wnidicator_moment_view_battery_image_update(179) > [wnidicator_moment_view_battery_image_update:179] battery level 96, index 19, bg level 95
09-17 09:27:50.601 : Warning / W_INDICATOR ( 652 : 652 ) : windicator_moment_view.c: wnidicator_moment_view_battery_image_update(183) > [wnidicator_moment_view_battery_image_update:183] Battery signal emit : bg_level_95
09-17 09:27:50.611 : Warning / W_INDICATOR ( 652 : 652 ) : windicator_moment_view.c: wnidicator_moment_view_battery_image_update(229) > [wnidicator_moment_view_battery_image_update:229] Battery level : 96
09-17 09:27:50.641 : Error / AUL_AMD ( 520 : 520 ) : amd_launch.c: __check_cmdline(520) > error founded when being launched with 13399
09-17 09:27:50.691 : Error / AUL_AMD ( 520 : 520 ) : amd_launch.c: __check_cmdline(520) > error founded when being launched with 13399
09-17 09:27:50.741 : Error / AUL_AMD ( 520 : 520 ) : amd_launch.c: __check_cmdline(520) > error founded when being launched with 13399
09-17 09:27:50.796 : Error / AUL_AMD ( 520 : 520 ) : amd_launch.c: __check_cmdline(520) > error founded when being launched with 13399
09-17 09:27:50.846 : Error / AUL_AMD ( 520 : 520 ) : amd_launch.c: __check_cmdline(520) > error founded when being launched with 13399
09-17 09:27:50.896 : Error / AUL_AMD ( 520 : 520 ) : amd_launch.c: __check_cmdline(520) > error founded when being launched with 13399
09-17 09:27:50.946 : Error / AUL_AMD ( 520 : 520 ) : amd_launch.c: __check_cmdline(520) > error founded when being launched with 13399
09-17 09:27:51.001 : Error / AUL_AMD ( 520 : 520 ) : amd_launch.c: __check_cmdline(520) > error founded when being launched with 13399
09-17 09:27:51.051 : Error / AUL_AMD ( 520 : 520 ) : amd_launch.c: __check_cmdline(542) > process launched, but cmdline not changed
09-17 09:27:51.051 : Warning / AUL_AMD ( 520 : 520 ) : amd_launch.c: __send_app_launch_signal(379) > send launch signal done: 13399
09-17 09:27:51.061 : Warning / AUL_AMD ( 520 : 520 ) : amd_request.c: __request_handler(645) > __request_handler: 23
09-17 09:27:51.061 : Warning / AUL_AMD ( 520 : 520 ) : amd_request.c: __send_result_to_client(83) > __send_result_to_client, pid: 0
09-17 09:27:51.061 : Warning / AUL_AMD ( 520 : 520 ) : amd_request.c: __request_handler(949) > pkg_status: installed, dead pid: 13399
09-17 09:27:51.061 : Warning / AUL_AMD ( 520 : 520 ) : amd_request.c: __send_app_termination_signal(510) > send dead signal done
09-17 09:27:51.071 : Warning / AUL ( 10735 : 10735 ) : launch.c: app_request_to_launchpad(282) > request cmd(0) result(13399)
09-17 09:27:51.151 : Error / RESOURCED ( 810 : 810 ) : proc-stat.c: send_socket_with_repy(767) > send_socket_with_repy: read failed
09-17 09:27:51.151 : Error / AUL ( 810 : 810 ) : pkginfo.c: __get_id_bypid(212) > Failed to get the cmdline of pid, error: -1
09-17 09:27:51.151 : Error / CAPI_APPFW_APP_MANAGER ( 810 : 810 ) : app_manager.c: app_manager_error(77) > [app_context_get_app_context_by_pid] No such application(0xfeef0001)
09-17 09:27:51.181 : Error / RESOURCED ( 521 : 521 ) : proc-main.c: resourced_proc_status_change(865) > Empty pid or process not exists. 13399
09-17 09:27:51.206 : Info / AUL_AMD ( 520 : 520 ) : amd_main.c: __app_dead_handler(262) > __app_dead_handler, pid: 13399
09-17 09:27:51.211 : Error / RESOURCED ( 1025 : 1025 ) : proc-stat.c: send_socket_with_repy(767) > send_socket_with_repy: read failed
09-17 09:27:51.216 : Error / AUL ( 1025 : 1025 ) : pkginfo.c: __get_id_bypid(212) > Failed to get the cmdline of pid, error: -1
09-17 09:27:51.216 : Error / CAPI_APPFW_APP_MANAGER ( 1025 : 1025 ) : app_manager.c: app_manager_error(77) > [app_context_get_app_context_by_pid] No such application(0xfeef0001)
09-17 09:27:59.631 : Error / WMS ( 501 : 501 ) : wms_event_handler.c: _wms_event_handler_cb_nomove_detector(21920) > _wms_event_handler_cb_nomove_detector is called
09-17 09:28:04.621 : Warning / WATCH_CORE ( 795 : 795 ) : appcore-watch.c: __signal_lcd_status_handler(1157) > signal_lcd_status_signal: LCDOff
09-17 09:28:04.661 : Warning / W_HOME ( 719 : 719 ) : dbus.c: _dbus_message_recv_cb(204) > LCD off
09-17 09:28:04.661 : Warning / W_HOME ( 719 : 719 ) : gesture.c: _manual_render_cancel_schedule(229) > cancel schedule, manual render
09-17 09:28:04.661 : Warning / W_HOME ( 719 : 719 ) : gesture.c: _manual_render_disable_timer_del(155) > timer del
09-17 09:28:04.661 : Warning / W_HOME ( 719 : 719 ) : gesture.c: _manual_render_enable(136) > 1
09-17 09:28:04.661 : Warning / W_HOME ( 719 : 719 ) : event_manager.c: _lcd_off_cb(704) > lcd state: 0
09-17 09:28:04.661 : Warning / W_HOME ( 719 : 719 ) : event_manager.c: _state_control(194) > control:4, app_state:2 win_state:1(0) pm_state:0 home_visible:0 clock_visible:1 tutorial_state:0 editing : 0, home_clocklist:0, addviewer:0 scrolling : 0, powersaving : 0, apptray state : 1, apptray visibility : 1, apptray edit visibility : 0
09-17 09:28:04.691 : Warning / STARTER ( 647 : 647 ) : clock-mgr.c: _on_lcd_signal_receive_cb(1648) > [_on_lcd_signal_receive_cb:1648] _on_lcd_signal_receive_cb, 1648, Pre LCD off by [timeout]
09-17 09:28:04.691 : Warning / STARTER ( 647 : 647 ) : clock-mgr.c: _pre_lcd_off(1426) > [_pre_lcd_off:1426] Will LCD OFF as wake_up_setting[1]
09-17 09:28:04.691 : Error / STARTER ( 647 : 647 ) : scontext_util.c: scontext_util_handle_lock_state(64) > [scontext_util_handle_lock_state:64] wear state[0],bPossible [0]
09-17 09:28:04.691 : Warning / STARTER ( 647 : 647 ) : clock-mgr.c: _check_reserved_popup_status(321) > [_check_reserved_popup_status:321] Current reserved apps status : 0
09-17 09:28:04.691 : Warning / STARTER ( 647 : 647 ) : clock-mgr.c: _check_reserved_apps_status(357) > [_check_reserved_apps_status:357] Current reserved apps status : 0
09-17 09:28:04.806 : Warning / SHealth_Common ( 810 : 810 ) : SystemUtil.cpp: OnDeviceStatusChanged(1039) > lcdState:3
09-17 09:28:04.841 : Warning / SHealth_Common ( 1025 : 1025 ) : SystemUtil.cpp: OnDeviceStatusChanged(1039) > lcdState:3
09-17 09:28:04.911 : Warning / STARTER ( 647 : 647 ) : clock-mgr.c: _on_lcd_signal_receive_cb(1659) > [_on_lcd_signal_receive_cb:1659] _on_lcd_signal_receive_cb, 1659, Post LCD off by [timeout]
09-17 09:28:04.911 : Warning / STARTER ( 647 : 647 ) : clock-mgr.c: _post_lcd_off(1558) > [_post_lcd_off:1558] LCD OFF as reserved app[(null)] alpm mode[0] charger[0]
09-17 09:28:04.916 : Warning / STARTER ( 647 : 647 ) : clock-mgr.c: _post_lcd_off(1565) > [_post_lcd_off:1565] Current reserved apps status : 0
09-17 09:28:04.916 : Warning / STARTER ( 647 : 647 ) : clock-mgr.c: _post_lcd_off(1583) > [_post_lcd_off:1583] raise homescreen after 20 sec. home_visible[0]
09-17 09:28:04.921 : Error / ALARM_MANAGER ( 647 : 647 ) : alarm-lib.c: alarmmgr_add_alarm_withcb(1174) > trigger_at_time(20), start(17-9-2018, 09:28:25), repeat(1), interval(20), type(-1073741822)
09-17 09:28:04.931 : Info / APP_CORE ( 10735 : 10735 ) : appcore-efl.c: __do_app(429) > [APP 10735] Event: PAUSE State: RUNNING
09-17 09:28:04.931 : Info / CAPI_APPFW_APPLICATION ( 10735 : 10735 ) : app_main.c: _ui_app_appcore_pause(611) > app_appcore_pause
09-17 09:28:04.971 : Error / ALARM_MANAGER ( 491 : 491 ) : alarm-manager.c: __is_cached_cookie(228) > Find cached cookie for [647].
09-17 09:28:05.066 : Warning / SHealth_Service ( 1025 : 1025 ) : SHealthServiceController.cpp: OnSystemUtilLcdStateChanged(676) >  ###
09-17 09:28:05.081 : Error / ALARM_MANAGER ( 491 : 491 ) : alarm-manager-schedule.c: _alarm_next_duetime(509) > alarm_id: 627581931, next duetime: 1537144105
09-17 09:28:05.081 : Error / ALARM_MANAGER ( 491 : 491 ) : alarm-manager.c: __alarm_add_to_list(483) > [alarm-server]: After add alarm_id(627581931)
09-17 09:28:05.081 : Error / ALARM_MANAGER ( 491 : 491 ) : alarm-manager.c: __alarm_create(1048) > [alarm-server]:alarm_context.c_due_time(1537145820), due_time(1537144105)
09-17 09:28:05.086 : Error / ALARM_MANAGER ( 491 : 491 ) : alarm-manager.c: __rtc_set(323) > [alarm-server]ALARM_CLEAR ioctl is successfully done.
09-17 09:28:05.086 : Error / ALARM_MANAGER ( 491 : 491 ) : alarm-manager.c: __rtc_set(330) > Setted RTC Alarm date/time is 17-9-2018, 00:28:25 (UTC).
09-17 09:28:05.086 : Error / ALARM_MANAGER ( 491 : 491 ) : alarm-manager.c: __rtc_set(345) > [alarm-server]RTC ALARM_SET ioctl is successfully done.
09-17 09:28:05.086 : Error / ALARM_MANAGER ( 491 : 491 ) : alarm-manager.c: __save_module_log(1765) > The file is not ready.
09-17 09:28:05.086 : Error / ALARM_MANAGER ( 491 : 491 ) : alarm-manager.c: __save_module_log(1765) > The file is not ready.
09-17 09:28:10.096 : Info / APP_CORE ( 10735 : 10735 ) : appcore-efl.c: __do_app(429) > [APP 10735] Event: MEM_FLUSH State: PAUSED

 

 

Edited by: Merschel on 17 Sep, 2018

Responses

4 Replies
GEUNSOO KIM

it sounds like the shared library is missing when it runs.

I think you'd better check the followings.

1. Is the shared library supported/included in device by default?

2. If it is not, is the shared library included in your package?

good luck.

 

Merschel

Hey,

 

thanks for your answer.

 

to 1.) No the lib is not included in the device. I programmed it by my self.

to 2.) Thats what I think. In the service I included the lib under Properties -> Tizen Studio -> Package -> Multi as well as under Properties -> Others -> Project References but it does not work. Where else should I set the properties?

Armaan-Ul- Islam

Suggestion from my end:

Properties > C/C++ Build > Settings > 'Tool Settings' Tab > C++ Compiler > Includes > Include files > Add your 'Shared Library' path

Properties > C/C++ Build > Settings > 'Tool Settings' Tab > C++ Linker > Libraries > Library Search path > Add your 'Shared Library' path

Armaan-Ul- Islam

Hello Merschel ,

What's the current Stat? Have you been able to call the library function ?