Crashes when used "ActivateLocalViewL()". Why?

Login to reply to this topic.
Thu, 2006-02-23 16:10
Joined: 2005-09-30
Forum posts: 29
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


Fri, 2006-02-24 10:29
Joined: 2004-12-23
Forum posts: 239
Re: Crashes when used "ActivateLocalViewL()". Why?
Hi symbian_ravi,

Could u please code the "Error Code" which u r getting while crashing.

BR

---------------
Bhatt Kavita

Sat, 2006-02-25 14:34
Joined: 2005-09-30
Forum posts: 29
Re: Crashes when used "ActivateLocalViewL()". Why?
Quote from: mesweetie
Hi symbian_ravi,

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


Sat, 2006-02-25 20:32
Joined: 2004-07-10
Forum posts: 364
Re: Crashes when used "ActivateLocalViewL()". Why?
You can't trap a crash, if by crash you mean a panic or an exception, you can only trap a leave.
Tue, 2006-02-28 11:24
Joined: 2004-12-23
Forum posts: 239
Re: Crashes when used "ActivateLocalViewL()". Why?
Hi Symb_ravi

Could u please paste the code here where u r expecting a crash,so that I could be ablt rectify it.

BR

---------------
Bhatt Kavita

Mon, 2006-03-06 11:54
Joined: 2005-09-30
Forum posts: 29
Re: Crashes when used "ActivateLocalViewL()". Why?
Quote from: mesweetie
Hi Symb_ravi

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

Tue, 2006-03-07 09:31
Joined: 2004-12-23
Forum posts: 239
Re: Crashes when used "ActivateLocalViewL()". Why?
Well try to put debug point in first line inside the loop and next debug point for             AppUi()->ActivateLocalViewL(TUid::Uid(ELogViewId ));

and then see whether for first time it is accessing the LOGVIEW without creating any problem.


BR

---------------
Bhatt Kavita

  • Login to reply to this topic.