locked
Internet Exporer Automation throws Unhandled exception in ieframe.dll RRS feed

  • Question

  • Hi Guys,

    I was with this question in two other different MSDN forums and in the WPF forum I was given the hint to place my question here..

    I have an C# WPF Application which talks to Internet Explorer Instance running in parallel to my application.

    My application uses deeplinks to navigate to specific pages of a intranet web application running in IE.

    For this my application iterates through all open IE instances and finds the relavant instance by the web-page title. If there is an IE instance with the title in query running I get the handle and can use this instace to navigate to a specific link. The code is at the very end of my question.

    However in some cases (it's currently not clear at all when this happens) we run into an AccessViolation Exception while iterating over the running IE instances.

    I received a crash dump file which I started to analyze in Visual Studio where I saw this exception occuring.

    Unhandled exception at 0x61726783 (ieframe.dll) in InteractionWorkspace.exe.60764.dmp: 0xC0000005: Access violation writing location 0x72DE43E3.

    To analyze is a bit deeper I started to have a look at the crash dump in WinDebug.

    There I found these lines:

    FAULTING_IP:

    ieframe!CISFBand::_FixupAppDataDirectory+97

    61726783 50              push    eax

    EXCEPTION_RECORD:  ffffffff -- (.exr 0xffffffffffffffff)

    ExceptionAddress: 61726783 (ieframe!CISFBand::_FixupAppDataDirectory+0x00000097)

       ExceptionCode: c0000005 (Access violation)

      ExceptionFlags: 00000000

    NumberParameters: 2

       Parameter[0]: 00000001

       Parameter[1]: 72de43e3

    Attempt to write to address 72de43e3

    I'm not really experienced with WinDebug but I did also find nothing aboutieframe!CISFBand::_FixupAppDataDirectory in the web.

    So currently I have no clue why we run into the access violation when iterating through the running instances of IE (with internal web applications and also external sites running).

    Can anyone help out to understand whats happening here in ieframe.dll? Where can I find any information about the meaning of ieframe!CISFBand::_FixupAppDataDirectory?

    Thank you very much!

    uzayd

    Code: Classes ShellWindows and InternetExplorer are from Interop.SHDocVw.dll

    public InternetExplorer FindIEInstance()
        {       
            InternetExplorer ie = null;
            try
            {
                ShellWindows shellWindows = new ShellWindows();
                // search algorithm: 
                // 1. search for exact name
                // 2. if there is no match when using the exact name, try to find window title that contains the search name
    
                bool matchingNameFound = false;
                foreach (InternetExplorer sw in shellWindows)
                {
                    string title = GetWebPageTitle(sw);
    
                    if ((sw.LocationName != null && sw.LocationName.ToLower().Equals(_name)) || (title != null && title.ToLower().Equals(_name)))
                    {
                        ie = sw;
                        matchingNameFound = true;
                        break;
                    }
                }
    
                if (!matchingNameFound)
                {
                    foreach (InternetExplorer sw in shellWindows)
                    {
                        string title = GetWebPageTitle(sw);
                        if ((sw.LocationName != null && sw.LocationName.ToLower().StartsWith(_name)) || (title != null && title.ToLower().StartsWith(_name)))
                        {
                            ie = sw;
                            matchingNameFound = true;
                            break;
                        }
                    }
    
                    if (!matchingNameFound)
                    {
                        //do logging
                    }
                }
            }
            catch (Exception ex)
            {
               //react to exception
            }
    
            return ie;
        }
    
        private static string GetWebPageTitle(InternetExplorer ie)
        {
            string title = String.Empty;
    
            try
            {
                HTMLDocument doc = ie.Document as HTMLDocument;
                if (doc != null)
                {
                    title = doc.title;
                }
            }
            catch (Exception ex)
            {
                ////react to exception
            }
    
            return title;
        }

    Saturday, December 31, 2016 10:36 AM

All replies

  • No ideas what could lead to this exception or what this might mean:
    ieframe!CISFBand::_FixupAppDataDirectory

    Any more information required from me which can help to analyze this better? I have also the complete dump file for this scenario.

    Are there any other known issues with ieframe.dll and AccessViolation which might occur with the code I pasted?

    Currently I'm really lost as I do not understand what can cause this issue - hopefully some one can again have a look at it.

    Thank you!

    uzayd

    Friday, February 10, 2017 2:48 PM