<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://www.newlc.com" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>NewLC - Problem with DoRunL() - Comments</title>
 <link>http://www.newlc.com/forum/problem-dorunl</link>
 <description>Comments for &quot;Problem with DoRunL()&quot;</description>
 <language>en</language>
<item>
 <title>Re: Problem with DoRunL()</title>
 <link>http://www.newlc.com/forum/problem-dorunl#comment-46229</link>
 <description>&lt;p&gt;Hi Isha,&lt;/p&gt;

&lt;p&gt;I have tried to recreate the problem you are facing in a uiq sample application (see the attachment) using the same code you have posted here, but failed &lt;img src=&quot;/sites/all/modules/smileys/packs/example/sad.png&quot; title=&quot;Sad&quot; alt=&quot;Sad&quot; /&gt; , and the sample application is working fine as per expectation. May this sample will help you to sort out your problem and if still problem exist then reproduce your problem by modifying this sample application and post here so that we can know the exact problem you are facing.....&lt;/p&gt;

&lt;p&gt;Br,&lt;br /&gt;
Pankaj&lt;/p&gt;</description>
 <pubDate>Wed, 07 May 2008 14:55:46 +0200</pubDate>
 <dc:creator>dubepankaj1980</dc:creator>
 <guid isPermaLink="false">comment 46229 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: Problem with DoRunL()</title>
 <link>http://www.newlc.com/forum/problem-dorunl#comment-46225</link>
 <description>&lt;p&gt;I have a hard time trying to understand what you write.&lt;br /&gt;
Specially this part confuses me a lot and I can&#039;t make any sense out of it:&lt;/p&gt;

&lt;p&gt;&lt;div class=&quot;bb-quote&quot;&gt;&lt;blockquote class=&quot;bb-quote-body&quot;&gt;&lt;br /&gt;
Let me clear one thing my CPeriodic&#039;s RunL is not calling InvokeTimerL () . I am calling this function at particular event. And this function should call StartMyFunc() and then only Runl() call again and again StartMyFunc() and that will call in turn DosomeThing() until timer will get expired. I think this should be the sequence.&lt;br /&gt;
&lt;/blockquote&gt;&lt;/div&gt;&lt;/p&gt;

&lt;p&gt;I also don&#039;t understand why you step into the acticescheduler code and why you step into the CPeriodic::RunL code...&lt;/p&gt;

&lt;p&gt;What is also weird is that the code you show in your post should work fine, are you really sure it really looks like that?&lt;/p&gt;

&lt;p&gt;What do you really mean by &quot;sequence&quot;? Do you have a few breakpoints in the code, and it stops at these points in this order?&lt;br /&gt;
If so, there could happen a lot of other things too in between, and you need to look more carefully on what really happens.&lt;br /&gt;
I find it very unlikely that you calling InvokeTimerL would result in a call to RunL.&lt;br /&gt;
Though, its very likely that you stop in RunL after calling InvokeTimerL, but it should not be the timer you just invoked, but another of your timers..&lt;/p&gt;

&lt;p&gt;How many timers do you use? &lt;br /&gt;
I&#039;m sure there is some upper limit on how many you can use in a thread, but I don&#039;t know what it is. Maybe that could be cause of your problems...&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;</description>
 <pubDate>Wed, 07 May 2008 13:16:06 +0200</pubDate>
 <dc:creator>alh</dc:creator>
 <guid isPermaLink="false">comment 46225 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: Problem with DoRunL()</title>
 <link>http://www.newlc.com/forum/problem-dorunl#comment-46212</link>
 <description>&lt;p&gt;Hi alh,&lt;/p&gt;

&lt;p&gt;  Thanks for your reply as I was eagerly waiting for some reply. &lt;/p&gt;

&lt;p&gt;  Let me clear one thing my CPeriodic&#039;s RunL is not calling InvokeTimerL () . I am calling this function at particular event. And this function should call  StartMyFunc() and then only Runl() call again and again StartMyFunc() and that will call in turn DosomeThing() until timer will get expired. I think this should be the sequence.&lt;/p&gt;

&lt;p&gt;     I am not very good in depth of Active Objects and I know only the upper layer because of that I think I am not getting the right point.&lt;br /&gt;
 &lt;br /&gt;
   As I told you this is not the only timer that I am using in the same class. All the others are working fine and I am using in the same manner and during debugging I notice this  sequence.&lt;/p&gt;

&lt;p&gt;InvokeTimerL () &lt;br /&gt;
StartMyFunc()                     // at end press F10&lt;br /&gt;
void CPeriodic::RunL()      // at end press F10&lt;br /&gt;
void CActiveScheduler::DoRunL(TLoopOwner* const volatile&amp; aLoop, CActive* volatile &amp; aCurrentObj) // Here pressF5&lt;br /&gt;
StartMyFunc() &lt;br /&gt;
void CPeriodic::RunL()&lt;br /&gt;
void CActiveScheduler::DoRunL(TLoopOwner* const volatile&amp; aLoop, CActive* volatile &amp; aCurrentObj)&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
This is the sequence and it&#039;ll go on until timer will get expire. That only I observe during debug.&lt;/p&gt;

&lt;p&gt;And mine problem is in the sequence when I call InvokeTimer() instead calling StartMyFunc()   its directly going void CPeriodic::RunL()&lt;br /&gt;
void CActiveScheduler::DoRunL(TLoopOwner* const volatile&amp; aLoop, CActive* volatile &amp; aCurrentObj)&lt;br /&gt;
and got struck here no panic also.&lt;/p&gt;

&lt;p&gt;Please give me some pointer as I got struck badly here since last 10 days &lt;img src=&quot;/sites/all/modules/smileys/packs/example/sad.png&quot; title=&quot;Sad&quot; alt=&quot;Sad&quot; /&gt; &lt;/p&gt;

&lt;p&gt;Thanks &amp; Regards&lt;br /&gt;
Isha&lt;br /&gt;
&lt;/p&gt;</description>
 <pubDate>Tue, 06 May 2008 15:14:41 +0200</pubDate>
 <dc:creator>Isha</dc:creator>
 <guid isPermaLink="false">comment 46212 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: Problem with DoRunL()</title>
 <link>http://www.newlc.com/forum/problem-dorunl#comment-46208</link>
 <description>&lt;p&gt;The code you provide and the sequence you claim to get doesn&#039;t make sense, it should not be possible.&lt;/p&gt;

&lt;p&gt;So either you didn&#039;t give your whole code, or you have misunderstood something during debugging, and you don&#039;t really get the results you claim to get...&lt;/p&gt;

&lt;p&gt;&quot;DoRunL&quot; is an internal function in the active scheduler, and is the function that calls the RunLs of your active objects&lt;br /&gt;
So DoRunL will call your RunL but not the other way around.&lt;br /&gt;
the RunL of CPeriodic couldn&#039;t call InvokeTimerL directly with the code you give, neither could InvokeTimerL call RunL...&lt;br /&gt;
RunL of the CPeriodic could only call your callback function, directly calling a member function of an object should not be possible unless you have some linking inconsistency.&lt;/p&gt;

&lt;p&gt;If your &quot;DoSomething&quot; in turn calls &quot;InvokeTimerL&quot; then you might have a problem, I don&#039;t think its a good idea to call Start on the CPeriodic from within the callback handle, but neither should you have to, since the CPeriodic will automatically call RTimer::After internally after your callback has returned.&lt;br /&gt;
I&#039;m not sure that would result in a hang though.&lt;br /&gt;
&lt;/p&gt;</description>
 <pubDate>Tue, 06 May 2008 14:46:23 +0200</pubDate>
 <dc:creator>alh</dc:creator>
 <guid isPermaLink="false">comment 46208 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: Problem with DoRunL()</title>
 <link>http://www.newlc.com/forum/problem-dorunl#comment-46205</link>
 <description>&lt;p&gt;Hi&lt;/p&gt;

&lt;p&gt;  Thanks for your reply. Ya, return type is TInt . Sorry I just pasted sample ruf code. Sorry for that.&lt;/p&gt;

&lt;p&gt;Regards,&lt;br /&gt;
Isha&lt;/p&gt;</description>
 <pubDate>Tue, 06 May 2008 13:58:53 +0200</pubDate>
 <dc:creator>Isha</dc:creator>
 <guid isPermaLink="false">comment 46205 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: Problem with DoRunL()</title>
 <link>http://www.newlc.com/forum/problem-dorunl#comment-46203</link>
 <description>&lt;p&gt;Just to reconfirm Please check the return type of your callback method, which must be TInt&lt;/p&gt;</description>
 <pubDate>Tue, 06 May 2008 13:52:08 +0200</pubDate>
 <dc:creator>jupitar</dc:creator>
 <guid isPermaLink="false">comment 46203 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: Problem with DoRunL()</title>
 <link>http://www.newlc.com/forum/problem-dorunl#comment-46181</link>
 <description>&lt;p&gt;Hi Eric,&lt;/p&gt;

&lt;p&gt;  at first thanks for your quick reply. If CPeriodic don&#039;t have any DoRunL() then why my control is going there.&lt;/p&gt;

&lt;p&gt;  sample code is&lt;/p&gt;

&lt;p&gt;&lt;pre class=&quot;bb-code-block&quot;&gt;
//**************************************************************************
InvokeTimerL()
 {
 if(!iTimer)
  {
  iTimer= CPeriodic::NewL(CActive::EPriorityHigh);
  }
 if(iTimer-&amp;gt;IsActive())
  {
  iTimer-&amp;gt;Cancel();
  }
  
 iTimer-&amp;gt;Start(1,  
      KSeconds * 1/4,  /* 1/4th Secs */
      TCallBack(StartMyFunc,
      this));
  }

StartMyFunc(TAny* aThis)
 {
  static_cast CMyView*(aThis)-&amp;gt;DoSomeThing();    //have removed brackets as it was not displaying CMyview
  return KErrNone;
 }
DoSomeThing()
{
}

//***************************************************************************
&lt;/pre&gt;&lt;br /&gt;
Here this func StartMyFunc never get called . the sequence is :&lt;/p&gt;

&lt;p&gt;InvokeTimerL()&lt;/p&gt;

&lt;p&gt;void CPeriodic::RunL()&lt;/p&gt;

&lt;p&gt;void CActiveScheduler::DoRunL(TLoopOwner* const volatile&amp; aLoop, CActive* volatile &amp; aCurrentObj)&lt;/p&gt;

&lt;p&gt;Here it got struck.&lt;/p&gt;

&lt;p&gt;Thanks &amp; Regards&lt;br /&gt;
Isha&lt;/p&gt;</description>
 <pubDate>Tue, 06 May 2008 09:25:00 +0200</pubDate>
 <dc:creator>Isha</dc:creator>
 <guid isPermaLink="false">comment 46181 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: Problem with DoRunL()</title>
 <link>http://www.newlc.com/forum/problem-dorunl#comment-46180</link>
 <description>&lt;p&gt;AFAIK CPeriodic don&#039;t have any DoRunL() method. So might be that it would be a good idea to post a bit of code.&lt;br /&gt;
Also check that you are not using User::WaitForRequest() (or at least that you are totally sure that your usage of this function won&#039;t block your thread).&lt;/p&gt;</description>
 <pubDate>Tue, 06 May 2008 09:10:00 +0200</pubDate>
 <dc:creator>eric</dc:creator>
 <guid isPermaLink="false">comment 46180 at http://www.newlc.com</guid>
</item>
<item>
 <title>Problem with DoRunL()</title>
 <link>http://www.newlc.com/forum/problem-dorunl</link>
 <description>&lt;p&gt;Hi ,&lt;/p&gt;

&lt;p&gt;  I am using CPeriodic class. Mine problem is my control got struck in DoRunl() this I came to know through debug.I don&#039;t know how &lt;br /&gt;
 to proceed now as I can&#039;t do more debug. One thing more  I want to tell i.e this is not the only timer that I am using. There are some other &lt;br /&gt;
&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://www.newlc.com/forum/problem-dorunl&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <comments>http://www.newlc.com/forum/problem-dorunl#comments</comments>
 <category domain="http://www.newlc.com/forums/symbian-c">Symbian C++</category>
 <pubDate>Tue, 06 May 2008 09:06:43 +0200</pubDate>
 <dc:creator>Isha</dc:creator>
 <guid isPermaLink="false">20871 at http://www.newlc.com</guid>
</item>
</channel>
</rss>
