×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Regular Contributor
    Join Date
    Sep 2004
    Posts
    69

    eikctl 42 error in debug emulator but not in release emulator

    I've recently bought the book: "Developing Series 60 Applications: A Guide for Symbian OS C++ Developers" by EMCC Software, and I was examining some of the sample code to learn from it. I ran into something weird with one of the example applications for Series 60 SDK 1.x. The code is freely available online at:

    http://www.forum.nokia.com/main/1,,0...ml&fileID=4381

    It is the DynamicList application. When I compile the release version of the application and run it in the release emulator, it works just fine. However, when I compile the debug version and run it in the debug emulator, I get an EIKCTL 42 error. Now, I am a newbie and I don't know what I am doing half the time, but I traced it down to the following code:

    void CDynamicListContainer::SetupListItemsL()
    {
    CTextListBoxModel* model = iSavedGamesListBox->Model(); // not taking ownership
    model->SetOwnershipType (ELbmOwnsItemArray);
    CDesCArray* savedGamesArray = STATIC_CAST(CDesCArray*, model->ItemTextArray());
    LoadSavedGamesL(*savedGamesArray);
    }

    void CDynamicListContainer::LoadSavedGamesL(CDesCArray& aSavedGamesArray)
    {
    // Strings will be of the format "0\tSaved Game i", where i is a number from 1 to 10
    _LIT (KStringHeader, "0\tSaved Game %d");
    TBuf <16> aString;
    for (TInt i = 1; i< 11; i++)
    {
    aString.Format(KStringHeader(), i);
    aSavedGamesArray.AppendL (aString);
    }
    }


    LoadSavedGamesL() in CDynamicListContainer::SetupListItemsL() seems to be causing the problem. If I comment this call out, then the app works fine in the debug emulator, but of course the app does nothing useful since LoadSavedGamesL() is the function that dynamically fills the ListBox.

    Could anyone possibly tell me what is wrong here? How can the same code work in the release build but not in the debug build?

    Your help is greatly appreciated!
    Thank you!

  2. #2
    Regular Contributor
    Join Date
    Sep 2004
    Posts
    69
    OK. I think I found why I was having this problem, but it doesn't quite make sense.

    If I do a command-line build "abld build wins udeb", then the debug version works like a charm...

    So here is my new question: How come a command-line build is not the same as the build process through MS Visual C++? Is this supposed to happen???

Posting Permissions

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