×

Discussion Board

Page 1 of 2 12 LastLast
Results 1 to 15 of 25
  1. #1
    Registered User
    Join Date
    Nov 2011
    Posts
    71

    Reading CFbsbitmap Panic KERN-EXEC 3

    Hello all,
    I am reading bitmap file using a class found on wiki. I am having array of file has to be read, my first image in the array is successfully converts to the bitmap but in next file it is giving error, Please help.

    ****************************************************
    void CImageStore::ConvertToBmpL()
    {

    delete iBitmap;
    iBitmap = NULL;

    TRAPD(err,iDecoder=CImageDecoder::FileNewL(iFileSession,iImageFolder)); <-----------(KERN-EXEC 3)
    ......................
    .........
    .......
    ...
    ..

    ****************************************************


    Thanks.

  2. #2
    Nokia Developer Champion
    Join Date
    Jun 2008
    Location
    Noida,India
    Posts
    3,985

    Re: Reading CFbsbitmap Panic KERN-EXEC 3

    Are you sure with both objects((iFileSession,iImageFolder) are valid for the second time as well?

  3. #3
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,671

    Re: Reading CFbsbitmap Panic KERN-EXEC 3

    I would add the idea of checking if the given CImageStore object is still valid. If you want to use it for a second time, make sure that it is not deleted after the first use.

  4. #4
    Registered User
    Join Date
    Nov 2011
    Posts
    71

    Re: Reading CFbsbitmap Panic KERN-EXEC 3

    Thank you for reply vineet. I checked for the image name with complete path, the folder is same for both images and file name changes in next request. The file session is declared as class variable and is initialized in the constructor like ...

    ***************************************************
    void CImageStore::ConstructL(TDes& aImageFolder,TDes& aImageFolder1)
    {
    .................
    ........................
    User::LeaveIfError( iFileSession.Connect() );
    }
    ***************************************************

  5. #5
    Nokia Developer Champion
    Join Date
    Jun 2008
    Location
    Noida,India
    Posts
    3,985

    Re: Reading CFbsbitmap Panic KERN-EXEC 3

    I checked up with a code which i used, the bitmap object is never deleted in that, something like following is done:

    if ( iDecoder )
    {
    delete iDecoder;
    iDecoder = NULL;
    }

    iDecoder = CImageDecoder::FileNewL(iFileSession,iImageFolder);
    .
    .
    .

    // release possible previous image
    iBitmap->Reset();
    iBitmap->Create(bitmap.Size(), EColor16M);

    .
    .

  6. #6
    Registered User
    Join Date
    Nov 2011
    Posts
    71

    Re: Reading CFbsbitmap Panic KERN-EXEC 3

    Thank you wizard for reply. I am calling image store from a for loop like .....

    *******************************************
    for(----------)
    {
    CActiveSchedulerWait* lScheduler = new (ELeave) CActiveSchedulerWait;
    iImageStore = CImageStore::NewL(FilePath,FilePath,*lScheduler);
    iImageStore->ConvertToBmpL();
    lScheduler->Start();
    IconImage = iImageStore->GetBitmap();
    delete lScheduler;
    }

  7. #7
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,166

    Re: Reading CFbsbitmap Panic KERN-EXEC 3

    I would suggest you to actually implement the loop with Active object, that way your application would be more responsive as well as it would have better chance on actually working.

  8. #8
    Registered User
    Join Date
    Nov 2011
    Posts
    71

    Re: Reading CFbsbitmap Panic KERN-EXEC 3

    Thanks Symbianyucca, I have used
    CActiveSchedulerWait* lScheduler = new (ELeave) CActiveSchedulerWait;
    but after every bitmap call, i delete this and again creates new. Isn't there any problem with it .. ?

  9. #9
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,166

    Re: Reading CFbsbitmap Panic KERN-EXEC 3

    My suggestion was not to use it at all, but instead use the API in a "right" way, i.e. make a real active object and implement the "loop" in it. i.e, just do one "loop round" at the time, and check in RunL whether you should be doing more rounds.

  10. #10
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,671

    Re: Reading CFbsbitmap Panic KERN-EXEC 3

    Even if it is not the prettiest possible to way the use this API, having brand new objects (converter, etc.) for each iteration is expected to work in fact.

    (Jukka: it is most probably an active object inside, that is why the nested scheduler is used to wrap it. Also the thing goes into a listbox which could not be fully constructed (easily) until the icons are ready.)

    There is a nasty thing about TRAP/D: the debugger can not really track what happens inside. Are you absolutely sure about that this line fails? What happens if you unwrap the line from the TRAPD?
    Also, an older thread of yours: http://www.developer.nokia.com/Commu...G-listbox-icon - have you seen Devnull's remark? The icon array does not create a copy of your icon, it just stores its pointer. If the delete is still in place (either an explicit one, or if CImageStore happens to delete the bitmap itself), that will result in KERN-EXEC 3 sooner or later.

    EDIT: by the way, what is this CImageStore? Can it happen that you could have better results with the simple code from http://www.developer.nokia.com/Commu..._synchronously ?

  11. #11
    Registered User
    Join Date
    Nov 2011
    Posts
    71

    Re: Reading CFbsbitmap Panic KERN-EXEC 3

    I am not deleting icons created. I give the default icons on initially and after that i again creates icon array. If i remove TRAP the application does not crashes but all icon visible are default.

  12. #12
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,671

    Re: Reading CFbsbitmap Panic KERN-EXEC 3

    Is that the real code in #6? Besides the ----- of course.
    Because in its current form, it does not really store the icons, the last bitmap is going to end up in IconImage, and all the others are just leaked. And the CImageStore objects are leaked too.

  13. #13
    Registered User
    Join Date
    Nov 2011
    Posts
    71

    Re: Reading CFbsbitmap Panic KERN-EXEC 3

    Quote Originally Posted by wizard_hu_ View Post
    What happens if you unwrap the line from the TRAPD?

    I get Panic STRINGLOADER 2 error.

  14. #14
    Nokia Developer Champion
    Join Date
    Jun 2008
    Location
    Noida,India
    Posts
    3,985

    Re: Reading CFbsbitmap Panic KERN-EXEC 3

    http://www.developer.nokia.com/docum...ingLoader.html

    explains what does this panic means(if unable to found , it means: EKeyStringNotFound = 2 (The key string wasn't found in formatting.)).Also can you paste here as how you are loading the image path.

  15. #15
    Registered User
    Join Date
    Nov 2011
    Posts
    71

    Re: Reading CFbsbitmap Panic KERN-EXEC 3

    Thanks again.

    I am appending dynamic image names. At the instance looks like,
    _LIT(KFileName, "\\private\\ED208A8F\\photobcbf4c3e4e55d8dfc64a5958914ffebb.jpeg" );

Similar Threads

  1. Panic KERN-EXEC 3
    By vinp in forum Symbian Tools & SDKs
    Replies: 9
    Last Post: 2010-10-08, 07:51
  2. Panic - Kern Exec 3
    By ganeshs87 in forum Symbian
    Replies: 9
    Last Post: 2010-03-09, 10:35
  3. Panic KERN-EXEC 3
    By rohitnegi in forum Symbian User Interface
    Replies: 2
    Last Post: 2010-02-26, 08:57
  4. getting panic KERN - EXEC 3
    By rohitnegi in forum Symbian User Interface
    Replies: 2
    Last Post: 2010-02-22, 11:01
  5. kern-exec 3 panic?
    By samweb in forum Symbian
    Replies: 1
    Last Post: 2005-01-20, 09:04

Posting Permissions

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