Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Never mix active objects and <code>User::WaitForRequest()</code>.</p> <p>(Well, almost never. When you know exactly what you are doing it can be ok, but the code you posted suggests you still have some learning to do.) </p> <p>You get the stray signal panic when the thread request semaphore is signalled with <code>RThread::RequestComplete()</code> by the asynchronous service provider and the active scheduler that was waiting on the semaphore with <code>User::WaitForAnyRequest()</code> tries to look for an active object that was completed so that its <code>RunL()</code> could be called, but cannot find any in its list of active objects. </p> <p>In this case you have two ongoing requests, neither of which is controlled by the active scheduler (for example, not using <code>CActive::iStatus</code> as the <code>TRequestStatus</code>; issuing <code>SetActive()</code> on an object where <code>CActive::iStatus</code> is not involved in an async request is another error in your code but not the reason for stray signal). You wait for either one of them to complete with <code>WaitForRequest()</code> but don't wait for the other to complete at all. The other request's completion signal will go to the active scheduler's <code>WaitForAnyRequest()</code>, resulting in stray signal. If you cancel a request, you will still need to wait on the thread request semaphore.</p> <p>The best solution is to make the timeout timer an active object as well. Have a look at the <code>CTimer</code> class.</p> <p>Another solution is just to add another <code>WaitForRequest</code> on the request not yet completed.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload