×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Regular Contributor
    Join Date
    Jul 2003
    Posts
    55

    Dialog Progress Box: Need help!

    Hey all,
    This has me stumped, any info will be greatly appreciated. I've been trying to create a Dialog Progress Info box. Here's the relevant code, which was drawn from the example code:

    RESOURCE DIALOG r_truvideoplayer_progressbar
    {
    flags=EAknProgressNoteFlags;
    buttons=EAknSoftkeyCancel;
    // title=truvideoplayer_progressbar_title;
    items=
    {
    DLG_LINE
    {
    type=EAknCtNote;
    id=ETruvideoPlayerProgressBarID;
    control=AVKON_NOTE
    {
    layout = EProgressLayout;
    singular_label = truvideoplayer_progressbar_connect_singular;
    plural_label = truvideoplayer_progressbar_connect_plural;
    };
    }
    };
    }

    iNetDialog = new (ELeave) TVPNetDialog(REINTERPRET_CAST(CEikDialog**, &iNetDialog));
    iNetDialog->PrepareLC(R_TRUVIDEOPLAYER_PROGRESSBAR);

    TVPNetdialog inherits from TVNetDialog which inherits from CAknProgressDialog. I did this for a variety of reasons, but suffice to say that the child constructors at least just invoke the parent constructors, arguments and all. Nothing else is called. Also I do not override PrepareLC, so CAknProgressDialog::PrepareLC() should be the function that gets invoked.

    When the code is run, the program exits when PrepareLC() is called. The code runs fine if I comment it out (and of course disable any other actions on the iNetDialog object!).

    Thanks a lot!

    d.

  2. #2
    Regular Contributor
    Join Date
    Jan 2004
    Location
    Braunschweig, Germany
    Posts
    345
    Hi d,

    It would be very helpful to know the panic that causes the application to close.

    Take a look at this article to enable the display of the panic codes:
    http://www.newlc.com/article.php3?id_article=150

    Regards,
    Bernd

  3. #3
    Regular Contributor
    Join Date
    Jul 2003
    Posts
    55
    Hello Bernd,
    thanks for that little tip, didn't even know you could get more debug info that way. Anyways, here's the error code:

    E32USER-CBase 71

    I looked it up, and it's apparently something to do with something called "TRAPS". I have no clue what that is.

    From what I can glean, something is causing something to Leave during the call to PrepareLC(). Of course. But as to what, since I'm following the example code, I don't know.

    Thanks again!

    d.

  4. #4
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,144
    basically you should read the cleanup stack parts of some of the fine symbian books published, it is one of the important parts of memory management.

    anyway, check that all objects that are put into the cleanup stack using PushL()-function or constructor having a name ending to xxxLC() is popped out from the clenup stack in the end of each function you are using and you should be able to get rid of the problem.

    yucca

  5. #5
    Regular Contributor
    Join Date
    Jul 2003
    Posts
    55
    Hello Yucca,
    I don't think it's any kind of memory allocations I'm doing, since I haven't gotten that far yet. There are two steps going on here: I call new on the progress dialog, then call PrepareLC(), all following the example code.

    Here's some extra info:
    I did a test where I dispensed with the whole inheritance all together, and instead called the following two lines --

    progDialog = new (ELeave) CAknProgressDialog (REINTERPRET_CAST(CEikDialog**, &progDialog));
    progDialog->PrepareLC (R_TRUVIDEOPLAYER_PROGRESSBAR);

    where progDialog is declared as:
    CAknProgressDialog* progDialog;

    in my top-level container object. The program still crashes at the call to PrepareLC(), but now the error returned is "Cone 14". This occurs even when I create the dialog object and call PrepareLC() at the beginning of my container program in the ConstructL() function, before my program creates any other object or does anything else.

    Any ideas please? Thanks!

    d.

  6. #6
    Regular Contributor
    Join Date
    Jul 2003
    Posts
    55
    Perhaps a better way to get to a solution is to provide me with step by step instructions as to how to create a progress dialog? Here's what I've done so far:

    1. Created a resource description in my .rss file, as shown above.
    2. I have the following includes in my .rss file:
    eikon.h, avkon.rsg, avkon.rh, avkon.mbg
    3. Included eikprogi.h and aknprogressdialog.h for my container class header file.
    4. Includued eikctl.lib and eikdlg.lib in my build.

    Is there anything else I need to do?

    Thanks.

    d.

  7. #7
    Super Contributor
    Join Date
    Apr 2003
    Location
    Czech Republic
    Posts
    915
    This error can be caused for example by this kind of pseudocode:
    Code:
    TRAPD(err,
    CleanupStack::PushL(something);
    MyFunctionL(something);
    );
    CleanupStack::Pop(something);
    The problem is that Push and Pop are not both inside or outside a TRAP. You try to step out of trap before one of the variables was popped from cleanupstack...

Posting Permissions

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