×

Discussion Board

Results 1 to 9 of 9
  1. #1
    Regular Contributor
    Join Date
    Apr 2008
    Posts
    76

    Why listbox applicaion crashes on exit ?

    HI,
    I am beginner to symbian. i have created a simple application that allows the user to logon, after successfull login, it display the listbox, i created login dialog using resource file if it return OK then my Appui class create the Listboxcontainer object. and perform operations, but the problem is that when user click back or exit while on Listbox screen, it crashes.Error "Program closed". the main function in Apui ConstructL is :

    void CMKISAppAppUi::ConstructL()
    {
    BaseConstructL();

    TBool okPressed = CMKISAppLoginContainer::RunDlgLD(); // call login Dialog
    if (okPressed)
    {
    iKeyListContainer = new (ELeave) CMKISAppKeyListContainer;
    iKeyListContainer->SetMopParent( this );
    iKeyListContainer->ConstructL( ClientRect() );
    AddToStackL( iKeyListContainer );
    }
    else
    {
    Exit();
    }
    }

    CMKISAppAppUi::~CMKISAppAppUi()
    {
    if (iKeyListContainer)
    {
    RemoveFromStack( iKeyListContainer );
    delete iKeyListContainer;
    }
    }
    void CMKISAppAppUi::HandleCommandL(TInt aCommand)
    {
    switch ( aCommand )
    {
    case EEikCmdExit:
    {
    Exit();

    break;
    }
    .......
    }

    please help me,
    any suggestion will be highly appreciated.
    Thanx in advance.

  2. #2
    Super Contributor
    Join Date
    Jan 2008
    Location
    Bangalore, India
    Posts
    777

    Re: Why listbox applicaion crashes on exit ?

    Quote Originally Posted by s_mehdi76 View Post
    HI,
    I am beginner to symbian. i have created a simple application that allows the user to logon, after successfull login, it display the listbox, i created login dialog using resource file if it return OK then my Appui class create the Listboxcontainer object. and perform operations, but the problem is that when user click back or exit while on Listbox screen, it crashes.Error "Program closed". the main function in Apui ConstructL is :

    void CMKISAppAppUi::ConstructL()
    {
    BaseConstructL();

    TBool okPressed = CMKISAppLoginContainer::RunDlgLD(); // call login Dialog
    if (okPressed)
    {
    iKeyListContainer = new (ELeave) CMKISAppKeyListContainer;
    iKeyListContainer->SetMopParent( this );
    iKeyListContainer->ConstructL( ClientRect() );
    AddToStackL( iKeyListContainer );
    }
    else
    {
    Exit();
    }
    }

    CMKISAppAppUi::~CMKISAppAppUi()
    {
    if (iKeyListContainer)
    {
    RemoveFromStack( iKeyListContainer );
    delete iKeyListContainer;
    }
    }
    void CMKISAppAppUi::HandleCommandL(TInt aCommand)
    {
    switch ( aCommand )
    {
    case EEikCmdExit:
    {
    Exit();

    break;
    }
    .......
    }

    please help me,
    any suggestion will be highly appreciated.
    Thanx in advance.
    what is "CMKISAppLoginContainer"??
    Regards
    $-Nitesh-$

  3. #3
    Super Contributor
    Join Date
    May 2005
    Location
    Hyderabad,India
    Posts
    704

    Re: Why listbox applicaion crashes on exit ?

    Hi,

    Check the listbox screen destructor, put a break point in listbox screen destructor and find where exactly it crashes.

    regards,
    Eswar

  4. #4
    Regular Contributor
    Join Date
    Apr 2008
    Posts
    76

    Re: Why listbox applicaion crashes on exit ?

    * MKISAppLoginContainer is my class derived from Akndialog, responsible for login, return true if valid user else false.
    * i debug the code, first it executes HandleCommandL() Exit() then Appui Destructor. after this application crashes.

    Quote Originally Posted by eswar_illuri View Post
    Hi,

    Check the listbox screen destructor, put a break point in listbox screen destructor and find where exactly it crashes.

    regards,
    Eswar

  5. #5
    Super Contributor
    Join Date
    May 2005
    Location
    Hyderabad,India
    Posts
    704

    Re: Why listbox applicaion crashes on exit ?

    Hi,

    Check your CMKISAppLoginContainer destructor also.

    Regards,
    Eswar

  6. #6
    Regular Contributor
    Join Date
    Apr 2008
    Posts
    76

    Re: Why listbox applicaion crashes on exit ?

    HI
    I think there is no need of destructor in CMKISAppLoginContainer because i called ExcuteLD().

    TBool CMKISAppLoginContainer::RunDlgLD()
    {
    CMKISAppLoginContainer* LoginDialog = new (ELeave) CMKISAppLoginContainer();

    return LoginDialog->ExecuteLD(R_LOGIN_DIALOG); //R_DIALOG_USERNAME_PASSWORD_QUERY
    }

    Quote Originally Posted by eswar_illuri View Post
    Hi,

    Check the listbox screen destructor, put a break point in listbox screen destructor and find where exactly it crashes.

    regards,
    Eswar
    Quote Originally Posted by eswar_illuri View Post
    Hi,

    Check your CMKISAppLoginContainer destructor also.

    Regards,
    Eswar

  7. #7
    Regular Contributor
    Join Date
    Apr 2008
    Posts
    76

    Re: Why listbox applicaion crashes on exit ?

    i have solved my problem.
    thanx to all.

  8. #8
    Super Contributor
    Join Date
    Jan 2008
    Location
    Bangalore, India
    Posts
    777

    Re: Why listbox applicaion crashes on exit ?

    Quote Originally Posted by s_mehdi76 View Post
    i have solved my problem.
    thanx to all.
    instead of this "i have solved my problem",if people post this "i have solved my problem ,the problem was that"
    it will be a good things to those, who are cuming at this point
    Regards
    $-Nitesh-$

  9. #9
    Regular Contributor
    Join Date
    Apr 2008
    Posts
    76

    Re: Why listbox applicaion crashes on exit ?

    yes i totally agree.
    actually i solved my problem, after calling User::Exit(0) on receving Exit command in HandleCommandL of Appui class.
    All the Best

Similar Threads

  1. Providing continuous network stream
    By directx in forum Symbian Networking & Messaging (Closed)
    Replies: 2
    Last Post: 2008-04-07, 18:41
  2. N70 Reset bug
    By sebboB in forum General Development Questions
    Replies: 2
    Last Post: 2005-12-28, 23:09
  3. ListBox Fails On app exit
    By Salvesh in forum Symbian User Interface
    Replies: 2
    Last Post: 2005-02-01, 04:27
  4. Listbox - crash after exit
    By serenade in forum Symbian User Interface
    Replies: 4
    Last Post: 2004-08-26, 06:25
  5. Using listbox crashes emulator
    By msearleinsig in forum Symbian Tools & SDKs
    Replies: 0
    Last Post: 1970-01-01, 02:00

Posting Permissions

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