×

Discussion Board

Results 1 to 14 of 14

Hybrid View

  1. #1
    Registered User
    Join Date
    Sep 2008
    Location
    Vancouver, Canada
    Posts
    588

    app crashes on orientation change

    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

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,694

    Re: app crashes on orientation change

    A thing you may want to try is testing if the code can start up with changed orientation. If it can not, the problem is not about handling the change, but handling the orientation.
    And of course it may be a good idea checking the panic code.

  3. #3
    Registered User
    Join Date
    Sep 2008
    Location
    Vancouver, Canada
    Posts
    588

    Re: app crashes on orientation change

    Yes the code does work for me if I start the app in landscape orientation but again when i change that to portrait, it crashes and same thing if I start the app in portrait, it works fine but crashes on changing orientation to landscape. Can I get the panic code for release build because there are few libraries used by the app which are not available for emulator. So can't get it run on emulator. The problem occurs only on changing the orientation.

  4. #4
    Nokia Developer Champion
    Join Date
    Jun 2008
    Location
    Noida,India
    Posts
    4,033

    Re: app crashes on orientation change

    Quote Originally Posted by raj8nokiaforum View Post
    Can I get the panic code for release build because there are few libraries used by the app which are not available for emulator. So can't get it run on emulator.
    yep you can : http://www.developer.nokia.com/Commu...ded_panic_code

  5. #5
    Registered User
    Join Date
    Sep 2008
    Location
    Vancouver, Canada
    Posts
    588

    Re: app crashes on orientation change

    Alright did that and found out that panic code is KERN-EXEC 0.
    Moreover, I did some file logging and found out that problem is not in HandleResourceChange method. Actually there is a listbox that I display on top of this .svg background image. On changing the orientation, somehow iListbox becomes NULL and in sizeChanged method, iListbox is NULL. But the panic codes suggests some NULL resource handle isn't it?

  6. #6
    Registered User
    Join Date
    Sep 2008
    Location
    Vancouver, Canada
    Posts
    588

    Re: app crashes on orientation change

    I am using RFs in my code but i don't know how handle to it is getting free because i am closing the RFs handle only in destructor. Any pointers?

Similar Threads

  1. Replies: 3
    Last Post: 2010-09-03, 12:16
  2. Lock orientation change in N97
    By darshan.gandhi in forum Symbian User Interface
    Replies: 7
    Last Post: 2010-08-09, 04:50
  3. Can't change application UI orientation
    By SamoylovBoris in forum Symbian
    Replies: 5
    Last Post: 2007-07-25, 16:23

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×