Oh, I seemed to find out the causing...
Code:
iSettingsArray->Reset();
HBufC16* item;
item=StringLoader::LoadLC(R_SETTINGS_HIGH);
iSettingsArray->AppendL(*item);
//CleanupStack::PopAndDestroy(item); (1)
If commented (1), there will be no error invoking ActivateL(), but the program collapsed later.
If not commented (1), the program will be down when ActivateL() is invoked.
So, I think the previous code has something wrong.
And, another code bellow seems buggy as well:
Code:
HBufC16* whiteListItem=HBufC16::NewL(50);
HBufC16* formatter=StringLoader::LoadLC(R_SETTINGS_WHITE_LIST);
HBuf16 <50> formattedItem;
formattedItem.Format(*formatter, iWhiteListItemsNumber);
TPtr16 ptr(whiteListItem->Des());
ptr.Copy(formattedItem);
iSettingsArray->AppendL(*whiteListItem);
//CleanupStack::PopAndDestroy(whiteListItem); (2)
CleanupStack::PopAndDestroy(formatter);
Alikely, if I don't comment (2) the program will collapse asap.
So, what's the problem, could you plz figure it out?