×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Regular Contributor
    Join Date
    Aug 2003
    Posts
    64

    CAknWaitDialog User 0 Panic

    Hi I m trying to display a wait dialog while I load the images into a bitmap array.

    when I Call ProcessFinishedL on the dialog the program exits with USER 0 panic.


    My code goes like this

    CAknWaitDialog* WaitDialog = new(ELeave)CAknWaitDialog( (REINTERPRET_CAST(CEikDialog**,&WaitDialog)), EFalse);
    WaitDialog->SetTone( CAknNoteDialog::EConfirmationTone );
    WaitDialog->ExecuteLD(R_WAIT_NOTE);

    LoadImages();

    // loading is done so now finish the wait dialog

    iWaitDialog->ProcessFinishedL();
    DrawNow();

    In the Rss File........
    RESOURCE DIALOG r_wait_note
    {
    flags = EAknWaitNoteFlags | EEikDialogFlagNotifyEsc;
    buttons = R_AVKON_SOFTKEYS_EMPTY;
    items=
    {
    DLG_LINE
    {
    type=EAknCtNote;
    id=2;
    control=AVKON_NOTE
    {
    layout=EWaitLayout;
    singular_label="Loading Image.....";
    animation=R_QGN_GRAF_WAIT_BAR_ANIM;
    };
    }
    };
    }


    I believe that I have not deviated from what the sdk says or what I have seen in earlier forum discussions. Please suggest a solution for this problem...

    Thanks
    Raja

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

    I think that you need to use PrepareLC()-function with RunLD() if you want to do any settings for the dialog. and basically do the tone settings & others after the prepare function call and before calling the run.

    yucca

  3. #3
    Regular Contributor
    Join Date
    Aug 2003
    Posts
    64
    Hi Yucca,

    The story remains the same.
    I have used prepareLC and RunLD.
    The wait dialog appears for some time.. and then after I load the images (the time for the dialog to appear) I call ProcessfinishedL on the dialog and then the program exits with User 0 panic...

    Any suggestions???

    Or any other way of getting a progress dialog to appear....

    Thanks
    Raja

    Chankged code..
    CAknWaitDialog* WaitDialog = new(ELeave)CAknWaitDialog( (REINTERPRET_CAST(CEikDialog**,&iWaitDialog)), EFalse);
    WaitDialog->PrepareLC(R_WAIT_NOTE);
    WaitDialog->SetTone( CAknNoteDialog::EConfirmationTone );
    WaitDialog->RunLD();

    //load the images ..... here i am using CPAlbImageViewerBasic class to load the images..

    WaitDialog->WaitDialog->ProcessFinishedL();// Here the program exits with User 0 panic...

    My Rss file remains same..


    RESOURCE DIALOG r_wait_note
    {
    flags = EAknWaitNoteFlags | EEikDialogFlagNotifyEsc;
    buttons = R_AVKON_SOFTKEYS_EMPTY;
    items=
    {
    DLG_LINE
    {
    type=EAknCtNote;
    id=2;
    control=AVKON_NOTE
    {
    layout=EWaitLayout;
    singular_label="Loading Image.....";
    };
    }
    };
    }

  4. #4
    Registered User
    Join Date
    Mar 2003
    Posts
    13

    Re: CAknWaitDialog User 0 Panic

    I think the problem is that the pointer to pointer you are passing in to the constructor is to a stack variable. You need to make it member data so that it is a heap address and does not go out of scope.

    This is a horrible waste of time when you run into it...

Posting Permissions

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