Discussion Board

Results 1 to 6 of 6
  1. #1
    Regular Contributor Shilpa13's Avatar
    Join Date
    Apr 2006
    Location
    India
    Posts
    383
    Hi All!

    I am creating the dynamic form with edwins n popup texts.
    It works fine except with problems related to the dynamic popup texts on exit.

    I used following code for displaying it...
    CCoeControl* myGroupPopupControl = CreateLineByTypeL(_L("Friend"),ActivePageId(), iItemId, EAknCtPopupFieldText, NULL) ;
    CAknPopupFieldText* myGroupPopup = STATIC_CAST(CAknPopupFieldText*, myGroupPopupControl) ;
    TResourceReader reader;
    iCoeEnv->CreateResourceReaderLC(reader,R_SEARCH_FORM_POPUP);
    myGroupPopup->ConstructFromResourceL(reader);
    CleanupStack::PopAndDestroy(); //reader
    CAknPopupField* popup = STATIC_CAST(CAknPopupField*, ControlOrNull( iItemId));
    CDesCArray* itemarray = new (ELeave) CDesCArrayFlat( 6 );

    itemarray->AppendL(_L("Test1"));
    itemarray->AppendL(_L("Test2"));

    CAknQueryValueTextArray* textArray = CAknQueryValueTextArray::NewLC();
    // iQueryValText is member variable
    textArray->SetArray( *itemarray );
    iQueryValText = CAknQueryValueText::NewLC();
    iQueryValText->SetArrayL( textArray );
    iQueryValText->SetCurrentValueIndex( 0 );
    popup->SetQueryValueL( iQueryValText );

    Line(iItemId)->SetTakesEnterKey(ETrue);
    Line(iItemId)->SetOfferHotKeys(ETrue);
    If i create dynamic form excluding the dynamic popup it works fine on exit too.
    But when i add dynamic popup to form, it displays it properly.. gives me entered data back properly..but on exit it crashes with Kern Exec-3 panic without going to destructor.

    It goes to appUi's HandleCommandL and crashes at Exit() call without leaving any traces back
    case EEikCmdExit:
    case EAknSoftkeyExit:
    {
    Exit();// crashes at this point
    }
    break;
    Any pointers regarding this will be highly appreciated.

    Thanks.
    Regards,
    Shilpa Kulkarni

  2. #2
    Registered User mayur_24's Avatar
    Join Date
    Jun 2004
    Location
    SymbianLand
    Posts
    762
    Seems to be an issue of ownership.
    Mostly double-deletion or invalid references to already deleted pointers can be one of the reasons.
    Check who has the ownership of the popup form and make sure the deletions are done properly.
    --Mayur.

  3. #3
    Regular Contributor erst's Avatar
    Join Date
    Oct 2006
    Posts
    157
    I also get KERN-EXEC 3 when creating popup fields with CreateLineByTypeL().
    I found this stating it as a bug: http://discussion.forum.nokia.com/fo...t=83679&page=3

    I guess the only work around is to define all popup fields in the .rss file. Then change the contents if needed. This doesn't solve if you need a dynamic number of popup fields though.

  4. #4
    Regular Contributor Shilpa13's Avatar
    Join Date
    Apr 2006
    Location
    India
    Posts
    383
    Quote Originally Posted by erst View Post
    I also get KERN-EXEC 3 when creating popup fields with CreateLineByTypeL().
    I found this stating it as a bug: http://discussion.forum.nokia.com/fo...t=83679&page=3

    I guess the only work around is to define all popup fields in the .rss file. Then change the contents if needed. This doesn't solve if you need a dynamic number of popup fields though.
    Well.. Its NOT a bug.
    Its an ownership issue with CAknForm n dynamic popup created with CreateLineByTypeL.

    I had cleared that bug long back actually.. :)

    See aknpopupfieldtext.h

    In the bottom of that header
    private:
    // the following members are owned
    CDesCArray* iArray; // the array of text items
    CAknQueryValueTextArray* iTextArray;
    CAknQueryValueText* iTextValue;
    So need to take care of CAknQueryValueText* , SetArrayL (which is set to CAknQueryValueTextArray*) and CAknQueryValueText* (which takes CAknQueryValueTextArray* in its SetArrayL function)

    It works fine.
    Regards,
    Shilpa Kulkarni

  5. #5
    Regular Contributor Shilpa13's Avatar
    Join Date
    Apr 2006
    Location
    India
    Posts
    383
    Well.. Its NOT a bug.
    Its an ownership issue with CAknForm n dynamic popup created with CreateLineByTypeL.

    I had cleared that bug long back actually.. :)

    See aknpopupfieldtext.h
    In the bottom of that header

    private:
    // the following members are owned
    CDesCArray* iArray; // the array of text items
    CAknQueryValueTextArray* iTextArray;
    CAknQueryValueText* iTextValue;
    So need to take care of CDesCArray* (which is set to CAknQueryValueTextArray*) and CAknQueryValueText* (which takes CAknQueryValueTextArray* in its SetArrayL function)

    It works fine.
    Regards,
    Shilpa Kulkarni

  6. #6
    Registered User mwiechnik's Avatar
    Join Date
    Nov 2007
    Posts
    2
    Hi,
    now I have been facing this problem since yesterday and today I found that it is what you Shilpa13 had. Could you or someone please give me a wider clue what to do with it.

    In S60 API it says that only CAknQueryValueTextArray gets the ownership. CAknQueryValueText does not become the owner and nor CAknPopupField.

    textArray = CAknQueryValueTextArray::NewLC();
    textArray->SetArray( *iUnitArray );

    .. so I don't delete iUnitArray because it is going to be done by CAknQueryValueTextArray allegedly.
    Everything works fine, until I close the application where I get KERN-EXEC 3.
    How can I solve it?

    Thanks for any help.


    OK I have finally solved it!:)
    In my case I made textArray a class variable iTextArray and in the destructor I deleted it along with iQueryValueText. Of course beforehand yet where I initialized the pointers I popped the objects off the cleanup stack (..NewLC..).

    Now it works.
    Last edited by mwiechnik; 2008-05-28 at 12:14. Reason: Solved the issue.

Similar Threads

  1. Kern Exec 0 with CPbkContactEngine
    By TPMaKom in forum Symbian C++
    Replies: 12
    Last Post: 2009-10-28, 15:04
  2. Replies: 2
    Last Post: 2007-07-19, 01:29
  3. why kern exec 3 on CopyFile?
    By flicker82 in forum Symbian C++
    Replies: 2
    Last Post: 2005-05-16, 02:25
  4. please help! setting page issue (checkbox) kern exec 3
    By flicker82 in forum Symbian User Interface
    Replies: 4
    Last Post: 2005-02-10, 12:57
  5. KERN EXEC 3 system Error
    By pankajmahto in forum Symbian C++
    Replies: 7
    Last Post: 2004-05-24, 04:03

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved