I had included the line
"....\hello_0xe7e6ddd5\...\splash.jpg"-"c:\private\e7e6ddd5\splash.jpg"
but it did not compile
errror-
can not find file "....\hello_0xe7e6ddd5\...\splash.jpg"
I had included the line
"....\hello_0xe7e6ddd5\...\splash.jpg"-"c:\private\e7e6ddd5\splash.jpg"
but it did not compile
errror-
can not find file "....\hello_0xe7e6ddd5\...\splash.jpg"
but how can I solve crash when app is installed to drives other than c:?
I do not think it would crash now(not at-least for this reason).Hard-code the drive letter in .pkg file as well as in CImageDecode class as well(i.e use: _LIT(KtxMySplashImage,"c:\\private\\e7e6ddd5\\splash.jpg" ); )
For dealing with dynamic installation drives, you can later modify c: to !: in the .pkg file, and compose the filename dynamically, something likeYou can add these modifications right now, just if the application does not work before adding these stuff, it will not work after adding them either.Code:_LIT(KSplashImage,"\\private\\e7e6ddd5\\splash.jpg" ); TFileName filename(KSplashImage); #ifdef WINS filename.Insert(0,_L("c:"); #else filename.Insert(0,RProcess().FileName().Left(2)); #endif
If you are using an active object for decoding the image, it does not panic/crash by itself, but the error code is placed into iStatus (a member variable inherited from CActive), and later can be checked in RunL.
A usual RunL method often looks likeso it runs if there was no error, and any errors are ignored. However you can explicitly make your code to panic via adding a checkCode:void CSomethingActive::RunL() { if(iStatus==KErrNone) { ... } }this code will display CSom-RunL and some negative number (error codes are negative numbers, decode with http://www.developer.nokia.com/Commu...ki/Error_codes) if the result code is an error.Code:void CSomethingActive::RunL() { if(iStatus!=KErrNone)User::Panic(_L("CSom-RunL"),iStatus)); if(iStatus==KErrNone) { ... } }
Last edited by wizard_hu_; 2012-12-12 at 17:53.
new problem has arised.
when rotating the phone
1> for helloworld app: the image is rotated but has the same dimension as previious stage. so, it does not fill the view of phone.
2> for original app: it crashes "Kern EXE3"
Last edited by sandeepmhptr3; 2012-12-12 at 18:19.
You can either handle the orientation change event(inside HandleResourceChangeL()) or you can fix the device's orientation to either portrait or landscape. Also do check what is happening inside the SizeChanged() function of the view or container's class.
void CViewSplash::HandleClientRectChange()
{
if ( iContainer )
{
iContainer->SetRect( AppUi () ->ApplicationRect() );
}
}
void CViewContainerSplash::SizeChanged()
{
//this->SetExtent(Position(),this->MinimumSize());
DrawNow();
}
container has got only one image
you can also try implementing the following:
void CViewContainerSplash::HandleResourceChange(TInt aType)
{
// Call base class implementation
CCoeControl::HandleResourceChange(aType);
if ( aType==KEikDynamicLayoutVariantSwitch )
{
}
}
Along with that, try debugging the code to see where KERN EXEC 3 occurs when the orientation is changed(additionally put debug points in the functions which get called during orientation change event, like HandleClientRectChange() etc.)
I modified the code as follows
Code:void CServiceMobileAppUi::HandleResourceChangeL( TInt aType ) { CAknAppUi::HandleResourceChangeL( aType ); // ADDED FOR SCALABLE UI SUPPORT // ***************************** if ( aType==KEikDynamicLayoutVariantSwitch ) { iSplashView->HandleClientRectChange();--------------added this, probably handles orientation effect, if so, I will add this for all my views // ((CViewNormal*) View( iNormalViewId) )->HandleClientRectChange( );----------- commented these lines because these views are not created while splash view is running. I have to write a better code to include these lines. robably it has solved kern-exe panic // ((CViewBusiness*) View( iBusinessViewId) )->HandleClientRectChange( ); } }
But after doing this I get viewSrv 14 panic sometimes. That may be due to console windows I have created to debug the app. They may not be removed properly from clean up stack when app is closed. I have removed them and checking for further issues.
You can also refer here to implement HandleResourceChangeL() more properly : http://www.developer.nokia.com/Commu...ymbian_C%2B%2B
Also you might want to implement this method for every CCoeControl class(precisely for every container) you write.