Hello guys,

I have this application which works fine in one orientation but when I change the orientation, it crashes and I don't know the reason also. Are there any specific reasons in this particular case?

In HandleResourceChange of my container, I am doing the following:

Code:
	
	CCoeControl::HandleResourceChange(aType);
	SetRect(iAvkonViewAppUi->View(TUid::Uid(ESomeViewId))->ClientRect());

        CEikAppUi* appUi = CEikonEnv::Static()->EikAppUi();   
	CEikApplication* app = appUi->Application();   
	MAknsSkinInstance* skin = AknsUtils::SkinInstance();
	TFileName bitmapFile;
	bitmapFile = (app->BitmapStoreName());
	bitmapFile.SetLength(bitmapFile.LocateReverse('\\') + 1);   
	bitmapFile.Append(_L("Listbox_bitmaps.mif"));   
	CAknsItemDef* pMenuSkinItemCBA = AknsUtils::CreateBitmapItemDefL( KAknsIIDQsnBgAreaMain, bitmapFile, 
											EMbmListbox_bitmapsBackgroungcolor );
	skin->SetLocalItemDefL( pMenuSkinItemCBA);
If i just keep first two lines, the app does not crashes but it does not serve my purpose.

Any suggestions why its crashing?

Thanks