×

Discussion Board

Results 1 to 14 of 14
  1. #1
    Registered User
    Join Date
    Oct 2008
    Posts
    27

    panic kern exec 3 error need help

    Hi,

    I am getting panic kern exe 3 error when I ran the debugger.
    Is there a way to fix this?


    TBool CmShareMainView::HandleLoginMenuItemSelectedL( TInt aCommand )
    {
    // TODO: implement selected event handler


    CMShareMain* text2 = new CMShareMain() ;



    // TInt length=text2->iUsernameTextBox->TextLength();

    HBufC* buffer = HBufC::NewLC(165);
    TPtr ptr = buffer->Des();



    text2->iUsernameTextBox->GetText( ptr );//crashes here at this line

    //text2->iUsernameTextBox->SetTextL( &ptr );



    CleanupStack::PopAndDestroy(buffer);

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

    Re: panic kern exec 3 error need help

    Basically check that all pointers are actually non-NULL, and they do point to some real object.

  3. #3
    Registered User
    Join Date
    Oct 2008
    Posts
    27

    Re: panic kern exec 3 error need help

    How would I make it non-null?

    I am trying to make it point to a textbox and get the texbox content from whatever the user types in it.

    The textbox is created from carbide UI designer so a lot of the code is auto generated.

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

    Re: panic kern exec 3 error need help

    basically see that the "text2" is constructed fully, and that the "iUsernameTextBox" is also fully constructed.

    Basically it is your own code, and you need to see that you actually make all stuff correctly, before trying to utilize them in the code.

  5. #5
    Super Contributor
    Join Date
    Jul 2006
    Location
    Oulu, Finland.
    Posts
    1,174

    Re: panic kern exec 3 error need help

    My guess is that iUsernameTextBox is NULL.

  6. #6
    Registered User
    Join Date
    Oct 2008
    Posts
    27

    Re: panic kern exec 3 error need help

    Actually yes iUsernameTextBox is null.

    Thanks for that suggestion and I will try that out and see what happens.

    Where did the code you suggested go?

  7. #7
    Registered User
    Join Date
    Mar 2003
    Location
    Luttenberg (Netherlands)
    Posts
    577

    Re: panic kern exec 3 error need help

    Hi,

    The name iUsernameTextBox suggests iUsernameTextBox is a data member of CmShareMainView (convention: data members start with lowercase i). Child objects (data member which are pointers) are created in the 2nd phase of the construction, i.e. ConstructL().

    Pls, check if iUsernameTextBox is created in CmShareMainView::ConstructL(). If not, create it there and make sure (by debugging step-by-step) the pointer is not NULL.

    If problems persists, pls, post all your code here. Also take a look at basic Symbian training - e.g. http://www.forum.nokia.com/info/sw.n..._Workbook.html to make yourself familiar with cleanup stack and two phase construction.

    BR,

    Rene
    Rene Heuven
    Inmote - Creative Smartphone Solutions
    Web: www.inmote.com
    E-mail: rene@inmote.com

  8. #8
    Registered User
    Join Date
    Oct 2008
    Posts
    27

    Re: panic kern exec 3 error need help

    Hi,

    This is where iUsernameTextBox is:
    I want to use the textbox in the CMShareMainView.cpp file

    But the textbox is created from there from the UI designer

    I am trying to create a login screen.
    CMShareMain::CMShareMain()
    {
    // [[[ begin generated region: do not modify [Generated Contents]
    iImage1 = NULL;
    iUsernameLabel = NULL;
    iPasswordLabel = NULL;
    iUsernameTextBox = NULL;
    iPasswordTextBox = NULL;
    // ]]] end generated region [Generated Contents]

    }

  9. #9
    Regular Contributor
    Join Date
    Sep 2006
    Posts
    61

    Smile Re: panic kern exec 3 error need help

    Hi,
    First create object of the text box then only u can use it
    (text->). If u use object without creating the object it will definitly show Kern EXEC-3 panic. Look at the code in more detail.
    Niyaz

  10. #10
    Registered User
    Join Date
    Oct 2008
    Posts
    27

    Re: panic kern exec 3 error need help

    Do you mean something like this ?


    TBool CmShareMainView::HandleLoginMenuItemSelectedL( TInt aCommand ){
    CMShareMain* text2 = new CMShareMain() ;

    text2->iUsernameTextBox;
    }

  11. #11
    Registered User
    Join Date
    Mar 2003
    Location
    Luttenberg (Netherlands)
    Posts
    577

    Re: panic kern exec 3 error need help

    Hi,

    Pls, post your full code as a .zip attachment to this thread. And look in CmShareMainView::ConstructL() if iUsernameTextBox gets created.

    Pls, check if iUsernameTextBox is created in CmShareMainView::ConstructL(). If not, create it there and make sure (by debugging step-by-step) the pointer is not NULL.

    BR,

    Rene
    Rene Heuven
    Inmote - Creative Smartphone Solutions
    Web: www.inmote.com
    E-mail: rene@inmote.com

  12. #12
    Registered User
    Join Date
    Oct 2008
    Posts
    27

    Re: panic kern exec 3 error need help

    Hi,

    It said I am not allow to post attachments.

    Can I email it to you?

    It is probably more clear if you see the whole code.

    I also tried putting iUsernameTextBox in ::constructL but I get undefined identifier.

  13. #13
    Registered User
    Join Date
    Dec 2008
    Posts
    10

    Re: panic kern exec 3 error need help

    OK - you can email the code. The mail address is rene@inmote.com. You should be able to create a .zip file and upload it to the forum (in the new forum I already did this one time).

    BR,

    Rene

  14. #14
    Registered User
    Join Date
    Oct 2008
    Posts
    27

    Re: panic kern exec 3 error need help

    Under posting rules it says I can not post attachments.

Similar Threads

  1. KERN EXEC 3 on device not on Epoc
    By Kavit Patel in forum Symbian
    Replies: 4
    Last Post: 2008-11-21, 15:02
  2. Rfile and saving image file received in MHFRunL() of socket.. kern exec 0 panic
    By sanee in forum Symbian Networking & Messaging (Closed)
    Replies: 14
    Last Post: 2008-11-03, 09:14
  3. Replies: 4
    Last Post: 2008-03-05, 09:30
  4. Using Bluetooth serial port in MIDlets (nokia 9500 issue)
    By orsteglasy in forum Mobile Java Networking & Messaging & Security
    Replies: 11
    Last Post: 2007-10-07, 21:49
  5. Replies: 2
    Last Post: 2007-07-19, 01:29

Posting Permissions

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