×

Discussion Board

Results 1 to 8 of 8
  1. #1
    Regular Contributor
    Join Date
    Sep 2009
    Posts
    129

    KERN-EXEC 3 on AknIconUtils::CreateIconL

    Hi everybody,

    I'm trying to call AknIconUtils::CreateIconL from different thread and from a standalone class (which does not extend anything). Unfortunately the CreateIconL method throws KERN-EXEC 3.

    Anyone who can help me here ?

    Thanks

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

    Re: KERN-EXEC 3 on AknIconUtils::CreateIconL

    Because of the separate thread it probably requires you to have your own RFbsSession Connect-ed. Perhaps some other things too, you will see if it helps.

  3. #3
    Regular Contributor
    Join Date
    Sep 2009
    Posts
    129

    Re: KERN-EXEC 3 on AknIconUtils::CreateIconL

    Quote Originally Posted by wizard_hu_ View Post
    Because of the separate thread it probably requires you to have your own RFbsSession Connect-ed. Perhaps some other things too, you will see if it helps.
    Thanks for the answer.

    here is my initialization :

    Code:
    	User::LeaveIfError(iFbsSession.Connect());
    	User::LeaveIfError(iWs.Connect());
    	
    	iScreenDevice = new(ELeave) CWsScreenDevice(iWs);
    	iScreenDevice->Construct();
    	TPixelsTwipsAndRotation curPixTwipsRot;
    	iScreenDevice->GetDefaultScreenSizeAndRotation(curPixTwipsRot);
    	TRect screenRect = curPixTwipsRot.iPixelSize;
    	
    	iWg = iWs;
    	User::LeaveIfError(iWg.Construct(reinterpret_cast<TUint32>(&iWg), EFalse));
    	iWg.SetOrdinalPosition(10, ECoeWinPriorityAlwaysAtFront);	
    	
    	User::LeaveIfError(iScreenDevice->CreateContext(iGc));
    	
    	iWindow = iWs;
    	User::LeaveIfError(iWindow.Construct(iWg, reinterpret_cast<TUint32>(&iWg) + 1));
    	iWindow.SetBackgroundColor(TRgb(0xff, 0xfa, 0xfa));
    	iWindow.Activate();
    	iWindow.SetExtent(TPoint(0, 0), TSize(screenRect.Width(), screenRect.Height()));
    	iWindow.SetVisible(ETrue);
    	
    	iGc->Activate(iWindow);
    Code:
    	RWsSession iWs;
    	RWindowGroup iWg;
    	CWindowGc* iGc;
    	RWindow iWindow;
    	CWsScreenDevice* iScreenDevice;
    	RFbsSession iFbsSession;
    I tried to add RFbsSession but it still throws KERN-EXEC 3.

  4. #4
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,751

    Re: KERN-EXEC 3 on AknIconUtils::CreateIconL

    The RFbsSession thing was the only one I am aware of, but you can check if AknIconUtils is present in the open source Symbian code.

  5. #5
    Regular Contributor
    Join Date
    Sep 2009
    Posts
    129

    Re: KERN-EXEC 3 on AknIconUtils::CreateIconL

    I did it, now I use the following code
    Code:
    	CEikonEnv* env = new CEikonEnv();
    	TRAPD(err, env->ConstructL());
    	User::LeaveIfError(iFbsSession.Connect(env->FsSession()));
    Thanks for the advice.

    Best Regards

  6. #6
    Regular Contributor
    Join Date
    Sep 2009
    Posts
    129

    Re: KERN-EXEC 3 on AknIconUtils::CreateIconL

    And another question, is it possible to access the resources from a different thread ? I need to access few localizable strings. I guess I'll need to pass them beforehand.

  7. #7
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,751

    Re: KERN-EXEC 3 on AknIconUtils::CreateIconL

    Although it is a bit redundant (since the resources are loaded in your main thread already), as a quick workaround, you could try using CCoeEnv::AddResrourceFileL on your newly created CEikonEnv. BaflUtils::NearestLanguageFile can help in picking the right file (if you are supporting multiple languages).

  8. #8
    Regular Contributor
    Join Date
    Sep 2009
    Posts
    129

    Re: KERN-EXEC 3 on AknIconUtils::CreateIconL

    I see. Thank you.

Similar Threads

  1. AknIconUtils::CreateIconL() returning KErrNotFound
    By washellington in forum Symbian Media (Closed)
    Replies: 8
    Last Post: 2010-05-09, 18:18
  2. KERN-EXEC 3 while using bitmap and AknIconUtils
    By zxbreak in forum Symbian Media (Closed)
    Replies: 2
    Last Post: 2010-05-04, 14:10
  3. AknIconUtils::CreateIconL in an exe
    By mihamih in forum Symbian
    Replies: 3
    Last Post: 2009-05-22, 23:04
  4. AknIconUtils::CreateIconL returns KErrAlreadyExists
    By frobnitz in forum Symbian Media (Closed)
    Replies: 1
    Last Post: 2008-01-07, 06:22

Posting Permissions

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