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:
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:
CTextListBoxModel* model = iSavedGamesListBox->Model(); // not taking ownership
CDesCArray* savedGamesArray = STATIC_CAST(CDesCArray*, model->ItemTextArray());
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++)
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!