App crashes in OnAppInitializing()

App crashes in OnAppInitializing()

BY 09 Jun 2013 Native Application Development

I have imported bada project to Tizen. I have added all the necessary privileges to the app.

The application is successfuly compiled but when i run the app it crashes in the OnAppInitializing().

This works fine on Bada.

OnAppInitializing(AppRegistry& appRegistry)
{
result r = E_SUCCESS;
 

IAppFrame* pAppFrame = GetAppFrame(); ——>>>>>> It crashes on this line.

if (NULL == pAppFrame)
{
AppLog(“GetAppFrame has failed..”);
goto CATCH;
}
 
__pFrame = pAppFrame->GetFrame();
if (!__pFrame)
{
AppLog(“GetFrame has failed..”);
goto CATCH;
}
 
// initialize forms
__pMainForm = new MainForm();
if( !__pMainForm )
{
AppLog( “>>>>>> MainForm creation has failed.”);
return false;
}
 
//——————————
// Construct form
//——————————
if( __pMainForm->Construct() != E_SUCCESS )
{
AppLog( “>>>>>> Construct has failed.”);
goto CATCH;
}
 
//——————————
// Attach Form to Frame
//——————————
r = __pFrame->AddControl( *__pMainForm );
if( IsFailed(r))
{
AppLog( “>>>>>> Adding MainForm has failed.”);
goto CATCH;
}
 
__pFrame->SetCurrentForm( *__pMainForm );
 
// You should comment following statement if you do not listen to the screen on/off events.
PowerManager::SetScreenEventListener(*this);
 
return true;
 
CATCH:
if ( __pMainForm )
delete __pMainForm;
 
return false;
}

 

The other projects that i imported works fine. 

Friends, please suggest me the solutions for this problem.

Thanks

Written by