Archived:Browser Control interface stops working after delete/reconstruct (Known Issue)
An instance of the Browser Control interface class does not work properly after it has been deleted and reconstructed on S60 3rd Edition.
Article Metadata
Compatibility
Article
Description
When an instance of the Browser Control interface (CBrCtlInterface) is constructed (see CBrCtlInterface::CreateBrowserControlL()), the interface will remain functional until the end of its life cycle. However, if the object is deleted and another one is created in the same session, the Browser Control API stops working. No errors are returned, but Web content will not be rendered onto the parent control anymore.
How to reproduce
This issue can be reproduced with the BrCtlSampleApp example application from the S60 3rd Edition SDK. The example application deletes and reconstructs the CBrCtlInterface object for each test case (whenever the capabilities for browser control are changed).
Solution
Add the following line after every CreateBrowserControlL() function call:
iBrCtlInterface->ActivateL()


For me on 5th Edition v1.0 iBrCtlInterface->ActivateL does not avoid the KERN-EXEC 3 that appears for the thread launched by the browser control interface when it's created a second time.
Is there an official fix for 5th Edition?
I see there are others facing the same issue: http://www.developer.nokia.com/Community/Discussion/showthread.php?166797-Got-kern-exec-3-error-when-creat-CBrCtlInterface-object-at-the-second-time!-in-5800XM&p=582118
My sample code, for reference File:BrCtlSampleApp crash run twice on 5th edition.zip
A workaround of storing the parent Container as a singleton is described here: http://www.developer.nokia.com/Community/Discussion/showthread.php?163606-Problem-using-Browser-Control --nick_richards 17:47, 11 November 2009 (UTC)