eikctl 42 error in debug emulator but not in release emulato

Login to reply to this topic.
Sat, 2004-12-11 15:28
Joined: 2004-10-17
Forum posts: 85
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,,040,00.html?fsrParam=2-3-/main.html&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!

Sun, 2004-12-12 03:15
Joined: 2004-10-17
Forum posts: 85
eikctl 42 error in debug emulator but not in release emulato
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???
Wed, 2005-07-13 06:35
Joined: 2005-04-20
Forum posts: 34
Re: eikctl 42 error in debug emulator but not in release emulato
Hi,

In MS VC++ go to BUILD menu and Configurations.

You can find the configurations for both Release and Debug builds

Regards
Pavan

Shoot for the moon. Even if you miss, you'll land among the stars.

Pavan

  • Login to reply to this topic.