语言

Menu
Sites
Language
Bug/Crash in AppManager::RegisterAppLaunch

Hi Tizen Team,

I found 2 bugs in AppManager::RegisterAppLaunch. I will try to be as short as possible:

  1. Valid condition is not accepted. API Help says:
    L"WeeklyTime='EEE HH:mm:ss'" The specified condition is a day of a week with a specific time at which the application is launched on a weekly basis.
    For multiple descriptions, "," delimiter can be used as shown in the following example:
    i"Mon 09:00:00, Tue 09:00:00, Wed 09:00:00, Thu 09:00:00, Fri 09:00:00"
      

    Now if I run the following code:

    r = AppManager::GetInstance()->RegisterAppLaunch(L"WeeklyTime=\'Mon 09:00:00\'", null,  LAUNCH_OPTION_DEFAULT );
    AppLog("RegisterAppLaunch(Mon) = %s", GetErrorMessage(r));
    r = AppManager::GetInstance()->RegisterAppLaunch(L"WeeklyTime=\'Tue 09:00:00\'", null,  LAUNCH_OPTION_DEFAULT );
    AppLog("RegisterAppLaunch(Tue) = %s", GetErrorMessage(r));

    AppManager::GetInstance()->UnregisterAppLaunch();
    AppLog("UnregisterAppLaunch = %s", GetErrorMessage(r));

    r = AppManager::GetInstance()->RegisterAppLaunch(L"WeeklyTime=\'Mon 09:00:00, Tue 09:00:00\'", null,  LAUNCH_OPTION_DEFAULT );
    AppLog("RegisterAppLaunch(Mon, Tue) = %s", GetErrorMessage(r));

    -----------
    result:

    07-05 20:47:24.740 : INFO / testAppManager ( 3451 : 3451 ) :  > RegisterAppLaunch(Mon) = E_SUCCESS
    07-05 20:47:24.790 : INFO / testAppManager ( 3451 : 3451 ) :  > RegisterAppLaunch(Tue) = E_SUCCESS
    07-05 20:47:24.870 : INFO / testAppManager ( 3451 : 3451 ) :  > UnregisterAppLaunch = E_SUCCESS

    07-05 20:47:24.895 : ERROR / Tizen::System ( 2559 : 2559 ) : result _AlarmConditionHandler::Convert(Tizen::Base::String&, tm*, int&)(145) > [E_INVALID_CONDITION] It is not valid date time.
    07-05 20:47:24.895 : ERROR / Tizen::System ( 2559 : 2559 ) : virtual result _AlarmConditionHandler::Register(Tizen::App::_AppLaunchCondition&)(228) > [E_INVALID_FORMAT] It is not valid date time format.
    07-05 20:47:24.895 : ERROR / Tizen::App ( 2559 : 2559 ) : result Tizen::App::_ConditionHandler::AddCondition(Tizen::App::_AppLaunchCondition&)(160) > [E_INVALID_FORMAT] failed to register
    07-05 20:47:24.895 : ERROR / Tizen::App ( 2559 : 2559 ) : result Tizen::App::_ConditionManagerService::RegisterAppLaunch(const Tizen::App::AppId&, const Tizen::Base::String&, const Tizen::Base::Collection::IList*, Tizen::App::AppManager::LaunchOption, const Tizen::Base::String*)(360) > [E_INVALID_FORMAT]
    07-05 20:47:24.895 : INFO / testAppManager ( 3451 : 3451 ) :  > RegisterAppLaunch(Mon, Tue) = E_INVALID_FORMAT

  2. Calling UnregisterAppLaunch after RegisterAppLaunch with the same time(?) crashes osp-app-service. I got error message [E_OBJ_ALREADY_EXIST] - this is OK, but after this osp-app-service crashes.
    code: 

    r =AppManager::GetInstance()->RegisterAppLaunch(L"WeeklyTime=\'Mon 09:00:00\'", null,  LAUNCH_OPTION_DEFAULT );
    AppLog("RegisterAppLaunch(Mon) = %s", GetErrorMessage(r));
    r = AppManager::GetInstance()->RegisterAppLaunch(L"WeeklyTime=\'Mon 09:00:00\'", null,  LAUNCH_OPTION_DEFAULT );
    AppLog("RegisterAppLaunch(Mon) = %s", GetErrorMessage(r));
    r = AppManager::GetInstance()->RegisterAppLaunch(L"WeeklyTime=\'Mon 09:00:00\'", null,  LAUNCH_OPTION_DEFAULT );
    AppLog("RegisterAppLaunch(Mon) = %s", GetErrorMessage(r));

    AppLog("Here comes the crash--------------------------->");

    r = AppManager::GetInstance()->UnregisterAppLaunch();
    AppLog("UnregisterAppLaunch = %s", GetErrorMessage(r));

    --------------------
    result:

    07-05 20:53:15.015 : INFO / testAppManager ( 2870 : 2870 ) :  > RegisterAppLaunch(Mon) = E_SUCCESS
    07-05 20:53:15.015 : ERROR / Tizen::App ( 2554 : 2554 ) : result Tizen::App::_ConditionManagerService::RegisterAppLaunch(const Tizen::App::AppId&, const Tizen::Base::String&, const Tizen::Base::Collection::IList*, Tizen::App::AppManager::LaunchOption, const Tizen::Base::String*)(360) > [E_OBJ_ALREADY_EXIST]
    07-05 20:53:15.015 : INFO / testAppManager ( 2870 : 2870 ) : virtual void testAppManagerForm::OnActionPerformed(const Tizen::Ui::Control &, int)(89) > RegisterAppLaunch(Mon) = E_OBJ_ALREADY_EXIST
    07-05 20:53:15.015 : ERROR / Tizen::App ( 2554 : 2554 ) : result Tizen::App::_ConditionManagerService::RegisterAppLaunch(const Tizen::App::AppId&, const Tizen::Base::String&, const Tizen::Base::Collection::IList*, Tizen::App::AppManager::LaunchOption, const Tizen::Base::String*)(360) > [E_OBJ_ALREADY_EXIST]
    07-05 20:53:15.015 : INFO / testAppManager ( 2870 : 2870 ) : virtual void testAppManagerForm::OnActionPerformed(const Tizen::Ui::Control &, int)(91) > RegisterAppLaunch(Mon) = E_OBJ_ALREADY_EXIST
    ******************
    07-05 20:53:15.015 : INFO / testAppManager ( 4110 : 4110 )  > Here comes the crash--------------------------->

    ******************
    07-05 20:53:17.025 : ERROR / Tizen::Io ( 2870 : 2870 ) : result Tizen::Io::_IpcClient::SendSync(IPC::Message*)(573) > [E_SYSTEM] POLLRDHUP
    07-05 20:53:17.025 : ERROR / Tizen::App ( 2870 : 2870 ) : result Tizen::App::_ConditionManagerProxy::UnregisterAppLaunch(const Tizen::App::AppId&, const Tizen::Base::String*)(103) > __pIpcClient->SendRequest is failed. (E_SYSTEM)
    07-05 20:53:17.025 : INFO / testAppManager ( 2870 : 2870 ) : virtual void testAppManagerForm::OnActionPerformed(const Tizen::Ui::Control &, int)(95) > UnregisterAppLaunch = E_SYSTEM
    07-05 20:53:17.025 : INFO / osp-security-service ( 2581 : 2581 ) : virtual bool SecurityService::OnAppTerminating(Tizen::App::AppRegistry&, bool)(112) > Enter
    07-05 20:53:17.025 : INFO / osp-security-service ( 2581 : 2581 ) : virtual PrivilegeService::~PrivilegeService()(49) > Entered.
    07-05 20:53:17.030 : INFO / osp-security-service ( 2581 : 2581 ) : virtual PrivilegeService::~PrivilegeService()(54) > Leaved.
    07-05 20:53:18.410 : INFO / osp-security-service ( 2581 : 2581 ) : virtual bool SecurityService::OnAppTerminating(Tizen::App::AppRegistry&, bool)(117) > Exit
    07-05 20:53:18.520 : INFO / osp-channel-service ( 2582 : 2582 ) : int OspMain(int, char**)(52) > Application finished.
    07-05 20:53:20.310 : ERROR / Tizen::Base ( 2929 : 2929 ) : result Tizen::Base::String::SubString(int, Tizen::Base::String&) const(1112) > [E_OUT_OF_RANGE] The startIndex(12) MUST be greater than or equal to 0, and less than the length of this string(12).
    07-05 20:53:20.315 : ERROR / Tizen::Base::Runtime ( 2929 : 2929 ) : static Tizen::Base::Runtime::_EventManager* Tizen::Base::Runtime::_EventManager::GetCurrentEventManager()(292) > [E_OBJ_NOT_FOUND] This is not OSP thread.
    07-05 20:53:20.315 : ERROR / Tizen::Base::Runtime ( 2929 : 2929 ) : result Tizen::Base::Runtime::_Event::Initialize()(207) > [E_INVALID_OPERATION] Event manager does not exist.
    07-05 20:53:20.315 : INFO / osp-app-service ( 2929 : 2929 ) : int OspMain(int, char**)(38) > Application started.
    07-05 20:53:20.400 : ERROR / Tizen::Io ( 2929 : 2929 ) : result Tizen::Io::_DbEnumeratorImpl::GetStringAt(int, Tizen::Base::String&) const(879) > [E_TYPE_MISMATCH] Trying to access column of different type.
    07-05 20:53:20.400 : ERROR / Tizen::Io ( 2929 : 2929 ) : result Tizen::Io::_DbEnumeratorImpl::GetStringAt(int, Tizen::Base::String&) const(879) > [E_TYPE_MISMATCH] Trying to access column of different type.
    07-05 20:53:20.400 : ERROR / Tizen::Io ( 2929 : 2929 ) : result Tizen::Io::_DbEnumeratorImpl::GetIntAt(int, int&) const(810) > [E_TYPE_MISMATCH] Trying to access column of different type.
    07-05 20:53:20.400 : ERROR / Tizen::Io ( 2929 : 2929 ) : result Tizen::Io::_DbEnumeratorImpl::GetStringAt(int, Tizen::Base::String&) const(879) > [E_TYPE_MISMATCH] Trying to access column of different type.
    07-05 20:53:20.405 : ERROR / Tizen::Io ( 2929 : 2929 ) : static bool Tizen::Io::File::IsFileExist(const Tizen::Base::String&)(300) > [E_INVALID_ARG] Given filePath length is zero or exceeds system limitations.
    07-05 20:53:20.495 : ERROR / Tizen::Base ( 2929 : 2929 ) : result Tizen::Base::String::SubString(int, Tizen::Base::String&) const(1112) > [E_OUT_OF_RANGE] The startIndex(11) MUST be greater than or equal to 0, and less than the length of this string(11).
    07-05 20:53:20.505 : ERROR / Tizen::Base::Runtime ( 2933 : 2933 ) : static Tizen::Base::Runtime::_EventManager* Tizen::Base::Runtime::_EventManager::GetCurrentEventManager()(292) > [E_OBJ_NOT_FOUND] This is not OSP thread.
    07-05 20:53:20.505 : ERROR / Tizen::Base::Runtime ( 2933 : 2933 ) : result Tizen::Base::Runtime::_Event::Initialize()(207) > [E_INVALID_OPERATION] Event manager does not exist.
    07-05 20:53:20.505 : ERROR / Tizen::Base::Runtime ( 2934 : 2934 ) : static Tizen::Base::Runtime::_EventManager* Tizen::Base::Runtime::_EventManager::GetCurrentEventManager()(292) > [E_OBJ_NOT_FOUND] This is not OSP thread.
    07-05 20:53:20.505 : ERROR / Tizen::Base::Runtime ( 2934 : 2934 ) : result Tizen::Base::Runtime::_Event::Initialize()(207) > [E_INVALID_OPERATION] Event manager does not exist.
    07-05 20:53:20.505 : INFO / osp-security-service ( 2933 : 2933 ) : int OspMain(int, char**)(54) > Application started.
    07-05 20:53:20.505 : INFO / osp-channel-service ( 2934 : 2934 ) : int OspMain(int, char**)(35) > Application started.
    07-05 20:53:20.555 : ERROR / Tizen::Base ( 2929 : 2929 ) : result Tizen::Base::String::SubString(int, Tizen::Base::String&) const(1112) > [E_OUT_OF_RANGE] The startIndex(11) MUST be greater than or equal to 0, and less than the length of this string(11).
    07-05 20:53:20.610 : ERROR / Tizen::Io ( 2933 : 2933 ) : result Tizen::Io::_DbEnumeratorImpl::GetStringAt(int, Tizen::Base::String&) const(879) > [E_TYPE_MISMATCH] Trying to access column of different type.
    07-05 20:53:20.610 : ERROR / Tizen::Io ( 2933 : 2933 ) : result Tizen::Io::_DbEnumeratorImpl::GetStringAt(int, Tizen::Base::String&) const(879) > [E_TYPE_MISMATCH] Trying to access column of different type.
    07-05 20:53:20.610 : ERROR / Tizen::Io ( 2933 : 2933 ) : result Tizen::Io::_DbEnumeratorImpl::GetIntAt(int, int&) const(810) > [E_TYPE_MISMATCH] Trying to access column of different type.
    07-05 20:53:20.610 : ERROR / Tizen::Io ( 2933 : 2933 ) : result Tizen::Io::_DbEnumeratorImpl::GetStringAt(int, Tizen::Base::String&) const(879) > [E_TYPE_MISMATCH] Trying to access column of different type.
    07-05 20:53:20.615 : ERROR / Tizen::Io ( 2933 : 2933 ) : static bool Tizen::Io::File::IsFileExist(const Tizen::Base::String&)(300) > [E_INVALID_ARG] Given filePath length is zero or exceeds system limitations.
    07-05 20:53:20.615 : INFO / osp-security-service ( 2933 : 2933 ) : virtual bool SecurityService::OnAppInitializing(Tizen::App::AppRegistry&)(78) > Enter
    07-05 20:53:20.615 : INFO / osp-security-service ( 2933 : 2933 ) : result PrivilegeService::Construct()(62) > Entered.
    07-05 20:53:20.615 : INFO / osp-security-service ( 2933 : 2933 ) : result PrivilegeService::Construct()(70) > Leaved.
    07-05 20:53:20.635 : ERROR / Tizen::Io ( 2934 : 2934 ) : result Tizen::Io::_DbEnumeratorImpl::GetStringAt(int, Tizen::Base::String&) const(879) > [E_TYPE_MISMATCH] Trying to access column of different type.
    07-05 20:53:20.635 : ERROR / Tizen::Io ( 2934 : 2934 ) : result Tizen::Io::_DbEnumeratorImpl::GetStringAt(int, Tizen::Base::String&) const(879) > [E_TYPE_MISMATCH] Trying to access column of different type.
    07-05 20:53:20.635 : ERROR / Tizen::Io ( 2934 : 2934 ) : result Tizen::Io::_DbEnumeratorImpl::GetIntAt(int, int&) const(810) > [E_TYPE_MISMATCH] Trying to access column of different type.
    07-05 20:53:20.635 : ERROR / Tizen::Io ( 2934 : 2934 ) : result Tizen::Io::_DbEnumeratorImpl::GetStringAt(int, Tizen::Base::String&) const(879) > [E_TYPE_MISMATCH] Trying to access column of different type.
    07-05 20:53:20.640 : ERROR / Tizen::Io ( 2934 : 2934 ) : static bool Tizen::Io::File::IsFileExist(const Tizen::Base::String&)(300) > [E_INVALID_ARG] Given filePath length is zero or exceeds system limitations.
    07-05 20:53:21.620 : INFO / osp-security-service ( 2933 : 2933 ) : virtual bool SecurityService::OnAppInitializing(Tizen::App::AppRegistry&)(97) > Exit
    07-05 20:53:21.660 : ERROR / Tizen::Base ( 2929 : 2929 ) : result Tizen::Base::String::SubString(int, Tizen::Base::String&) const(1112) > [E_OUT_OF_RANGE] The startIndex(11) MUST be greater than or equal to 0, and less than the length of this string(11).
    07-05 20:53:21.970 : ERROR / Tizen::Base::Runtime ( 2975 : 2975 ) : static Tizen::Base::Runtime::_EventManager* Tizen::Base::Runtime::_EventManager::GetCurrentEventManager()(292) > [E_OBJ_NOT_FOUND] This is not OSP thread.
    07-05 20:53:21.970 : ERROR / Tizen::Base::Runtime ( 2975 : 2975 ) : result Tizen::Base::Runtime::_Event::Initialize()(207) > [E_INVALID_OPERATION] Event manager does not exist.
    07-05 20:53:22.020 : ERROR / Tizen::Base ( 2974 : 2974 ) : result Tizen::Base::String::SubString(int, Tizen::Base::String&) const(1112) > [E_OUT_OF_RANGE] The startIndex(12) MUST be greater than or equal to 0, and less than the length of this string(12).
    07-05 20:53:22.020 : ERROR / Tizen::Base::Runtime ( 2974 : 2974 ) : static Tizen::Base::Runtime::_EventManager* Tizen::Base::Runtime::_EventManager::GetCurrentEventManager()(292) > [E_OBJ_NOT_FOUND] This is not OSP thread.
    07-05 20:53:22.020 : ERROR / Tizen::Base::Runtime ( 2974 : 2974 ) : result Tizen::Base::Runtime::_Event::Initialize()(207) > [E_INVALID_OPERATION] Event manager does not exist................................................

    ............ and this is a very long log here, unfortunately I cannot attach to this thread, but I hope you can also reproduce.

Please feel free to contact me if you need more info.

I CANNOT reproduce this on Emulator, it works fine.
I CAN reproduce this on RD-PQ, with latest Tizen 2.1.
I DID NOT try on 2.2b, but running through the change list I could not see any change/fix in the AppManager.
 

 

 

 

编辑者为: Brock Boland 17 3月, 2014 原因: Paragraph tags added automatically from tizen_format_fix module.

响应

5 回复
Pushpa G
#1. (Always) E_INVALID_FORMAT occurs when multiple descriptions for WeeklyTime are registered. #2. (Not Reproduces) osp-app-service gets crashed when application tries to register the same description again
Zoltan Puski
Please try #2 - register the same description again -> you get E_OBJ_ALREADY_EXIST - after this, call UnregisterAppLaunch() -> this crashes on my device. I will restest on 2.2 later
Pushpa G
WeeklyTime='Mon 09:00:00, Tue 09:00:00' Need to change the condition from above to below. WeeklyTime='Mon 09:00:00', 'Tue 09:00:00' Please add ' at start and end of token. modify the example like "'Mon 09:00:00', 'Tue 09:00:00'"
Zoltan Puski
WeeklyTime='Mon 09:00:00', 'Tue 09:00:00' It works, thanks!
Zoltan Puski
I found a way for #2 that almost 100% crashes on my TIZEN PHONE: In a button press action handler: { r = AppManager::GetInstance()->UnregisterAppLaunch(); AppLog("UnregisterAppLaunch = %s", GetErrorMessage(r)); // E_SUCCESS r = AppManager::GetInstance()->RegisterAppLaunch(L"WeeklyTime=\'Mon 09:00:00\'", null, LAUNCH_OPTION_DEFAULT ); AppLog("RegisterAppLaunch(Mon) = %s", GetErrorMessage(r)); // E_SUCCESS r = AppManager::GetInstance()->RegisterAppLaunch(L"WeeklyTime=\'Mon 09:00:00, Tue 09:00:00\'", null, LAUNCH_OPTION_DEFAULT ); AppLog("RegisterAppLaunch(Mon, Tue) = %s", GetErrorMessage(r)); //E_INVALID_FORMAT r = AppManager::GetInstance()->RegisterAppLaunch(L"WeeklyTime=\'Mon 09:00:00\'", null, LAUNCH_OPTION_DEFAULT ); AppLog("RegisterAppLaunch(Mon) = %s", GetErrorMessage(r)); //E_OBJ_ALREADY_EXIST r = AppManager::GetInstance()->RegisterAppLaunch(L"WeeklyTime=\'Mon 09:00:00, Tue 09:00:00\'", null, LAUNCH_OPTION_DEFAULT ); AppLog("RegisterAppLaunch(Mon, Tue) = %s", GetErrorMessage(r)); //E_INVALID_FORMAT r = AppManager::GetInstance()->UnregisterAppLaunch(); AppLog("UnregisterAppLaunch = %s", GetErrorMessage(r)); //E_SYSTEM } --> CRASH