Symbian
Symbian OS Library

FAQ-0900 Why is my application terminated with the panic ViewSrv 11?

[Index][spacer] [Previous] [Next]



 

Classification: C++ Category: Application Architecture
Created: 07/17/2003 Modified: 07/24/2003
Number: FAQ-0900
Platform: Symbian OS v6.0, Symbian OS v6.1, Symbian OS v7.0, Symbian OS v7.0s

Question:
When the system needs to switch the view in my application to another one (perhaps in another application), my app is terminated with a panic, ViewSrv 11. What can I do to prevent this?

Answer:

The View Server has to be able to switch from the view on display in your app, to that in another app for many reasons. In order to provide a responsive experience for the user, it expects your app to respond quickly to such requests at any time.

If your app fails to respond in more than 10 seconds (a very long time for a user to wait for their phone to do what they ask), it is regarded as a code defect in your application, and the app is terminated with the ViewSrv 11 panic (actually defined in the source as "EVwsViewEventTimeOut").

The most common cause of this problem is running computation-intensive code which does not allow other active objects to run (the usual route for this request to reach your app). This means you have a RunL() somewhere that does not return quickly (i.e. less than 10 seconds in this case).

Another common cause is when your app contains code integrated from older libraries that are not designed for use in event driven environments like Symbian OS, and the functions you call do not integrate well with the Active Object framework. In such a case, setting up a new thread (via RThread or Client-Server) to run this code is often the best route forward, if the code cannot be restructured to run in smaller time intervals.