Accessing body.currentStyle via MSHTML interop causes Edge Content process to crash

Won’t fix Issue #8310727

Details

Created
Jul 28, 2016
Privacy
This issue is public.
Found in
  • Microsoft Edge
Found in build #
38.14393
Reports
Reported by 6 people

Sign in to watch or report this issue.

Steps to reproduce

Accessing the currentStyle property of body (or descendants) via MSHTML interop causes the respective Edge Content Process to crash and a COMException to be thrown in the accessing process.

Software

Operating System: Windows 10 Insider Preview Build 14393

Steps to reproduce

  1. Open any website in Edge
  2. Copy the “EdgeInterop.exe” from the extracted “EdgeInterop.zip” (from folder EdgeInterop\EdgeInterop\bin\Debug) to a secure location, e.g. “%PROGRAMFILES%”
  3. Run the “EdgeInterop.exe” from the secure location
  4. Hit Enter in the EdgeInterop.exe console window when you see the “Time to attach a debugger…” message

Observed behavior

The EdgeInterop executable shows a COMException being thrown and the Edge Content process crashed. You can witness that the page is reloaded.
If you run the EdgeInterop multiple times, Edge shows an error message (see attached EdgeCpCrash.png).

Expected behavior

No exception. The body.currentStyle property returns the correct current style.

Attachments

EdgeInterop.zip

Contains a project to reproduce the problem. In order to compile the project yourself, you have to set the path to a code-signing certificate and its password in the “Post Build Event” of the C# project. This is required since you need UIAccess privileges for Edge interop accessibility.

EdgeCpCrash.png

Shows a screenshot of Edge after running the EdgeInterop executable 2 times.

Attachments

Comments and activity

  • Microsoft Edge Team

    Changed Assigned To to “Brad E.”

    Changed Assigned To to “Bogdan B.”

  • Turns out that Windows 10 Insider Build 14393 is equivalent to the Windows 10 Anniversary update. Consequently, the problem now exists in the stable Windows 10 version delivered to everybody - and is thus even more important to us…

  • FYI: My tests show that UIAccess is not actually needed to reproduce the problem, your program does not need to be signed.

  • Can you provide more details on what the exact error is? Additionnally, I don’t think “EdgeInterop” is something we support officially, so what convinces you we should have a look at this bug? The currentStyle property does not exist anymore in Edge, and it ain’t coming back.

  • We get the following exception when accessing the IHTMLElement2.currentStyle property (you can witness it be following the reproduction steps):
    System.Runtime.InteropServices.COMException (0x800706BE): The remote procedure call failed. (Exception from HRESULT: 0x800706BE)
    at mshtml.IHTMLElement2.get_currentStyle()

    Francois R.:

    Additionnally, I don’t think “EdgeInterop” is something we support officially, so what convinces you we should have a look at this bug? The currentStyle property does not exist anymore in Edge, and it ain’t coming back.
    Well, not sure what I should do with this response. You don’t know whether Interop is supported or not? I don’t, either.
    What I know is, it used to work with Edge on Windows 10 before the anniversary update and it does no longer work now with the anniversary update. So, currentStyle used to work just fine until the last anniversary update.

    As this is a business relevant problem for us, we issued a Support Incident using our Microsoft Partner account and the Microsoft support employee stated that this is a know issue and will be taken care of.

    FYI: Instead of “currentStyle” we tried to use IHTMLWindow7.getComputedStyle, but this caused an AccessViolationException with Edge.

  • Microsoft Edge Team

    Changed Status to “Won’t fix”

  • Can you please explain why this issue will not be fixed?

    We need an explanation for our clients, why we have to cease support for MS Edge and force them to use another browser instead.

    Thank you!

  • Thank you for the report. We no longer support legacy currentStyle through any officially available extensibility mechanism.

    Best regards,
    The MS Edge Team

  • That is definitely a problem for us.

    Is there an alternative to achieve a similar functionality?
    Can you point me to any material or API documentation showing which functionality is provided in Edge via MSHTML interop?

    Thank you very much!

    Regards,
    Alex

  • MSHTML Interop via COM is not a feature we support in this team. If this is an officially supported API, you need to send your feedback to the support entry point for the feature. This website is for reporting issues for the feature available to websites, and currentStyle isn’t one anymore.

You need to sign in to your Microsoft account to add a comment.

Sign in