You have a .NET control Hosted in Internet Explorer 8 and it restarts a tab in Internet Explorer

Message: This Tab Has Been Recovered 

Previous versions of IE are fine.

If the control implements IObjectSafety or other interfaces improperly, this could cause this message.  The reasons for this include that you did not implement the IObjectSafety Interface properly.  You must use the PreserveSig attribute in this interface definition:

interface IObjectSafety
   int GetInterfaceSafetyOptions(ref Guid riid, out int pdwSupportedOptions, out int pdwEnabledOptions);
   int SetInterfaceSafetyOptions(ref Guid riid, int dwOptionSetMask, int dwEnabledOptions);

The reason your control may work in IE7 fine and stop working in IE8 without the PreserveSig attribute is because the older code is compiled different.  IE8 is using Stack objects and indexed on ESP.  The incorrect method definition for the interface unbalances the stack and ESP is off and this causes the underlying AV that results in this message.

Fix your code to implement the Interface correctly and this will fix the problem.

Let me know if you find this useful!

Comments (0)

Skip to main content