Crashes when used "ActivateLocalViewL()". Why?
| Thu, 2006-02-23 16:10 | |
|
Hi,
When i used the following line, AppUi()->ActivateLocalViewL(TUid::Uid(EStatusViewId )); my application crashed. I have faced this in the past and fixed it & forgot the resolution. The error is popping up again. I do not know under what circumstances this is happening. Anybody knows on why and the resolution? Thanks, symbian_ravi |
|






Forum posts: 239
Could u please code the "Error Code" which u r getting while crashing.
BR
---------------
Bhatt Kavita
Forum posts: 29
Could u please code the "Error Code" which u r getting while crashing.
BR
Thanks, mesweetie.
I am yet to trap the line which causes the crash. Because, i am not trapping, the appln just crashes and i am not even able to see the errror message.
Thanks,
symbian_ravi
Forum posts: 364
Forum posts: 239
Could u please paste the code here where u r expecting a crash,so that I could be ablt rectify it.
BR
---------------
Bhatt Kavita
Forum posts: 29
Could u please paste the code here where u r expecting a crash,so that I could be ablt rectify it.
BR
Apologies, mesweetie... for the delay.
Following is the code:
for (TInt i = 0; i < array->Count(); i++)
{
ContentData.Delete(0, ContentData.Length());
ContentData.SetLength(0);
//AppUi()->ActivateLocalViewL(TUid::Uid(ELogViewId ));
iEngine->CopyMessageL(
(*array)[i],
BodyData,
Type,
Type2,
ContentData
);
iClient->IssueHTTPPostL(str1, str2, str3);
textBuffer2.Delete(0, textBuffer2.Length());
textBuffer2.SetLength(0);
textBuffer2.Append( KCopied );
textBuffer2.AppendNum( i + 1 );
textBuffer2.Append(_L(" of "));
textBuffer2.AppendNum( array->Count() );
textBuffer2.Append(KMessages);
iLogView->DrawTextL( textBuffer2 );
AppUi()->ActivateLocalViewL(TUid::Uid(ELogViewId ));
}
What the code does is:
It loops thru an array and HTTP-POST the array content to remote URL. For each array content, it displays the status text on another log window. Pls. bear with me if the variable name is misleading. Also, pls note that the functions:CopyMessageL() and IssueHTTPPostL(), are working fine.
The above code works if i comment the fn:ActivateLocalViewL, and call it outside the loop. Where am i ERRing?
Thanks,
symbian_ravi
Forum posts: 239
and then see whether for first time it is accessing the LOGVIEW without creating any problem.
BR
---------------
Bhatt Kavita