none
WebBrowser control crashes with AccessViolation if opening a PDF without the Adobe plugin installed RRS feed

  • Question

  • Hi all,

    The following app will crash with an AccessViolation every time on Windows 7 if the Adobe IE plugin is not installed. The pdf itself isn't important, it's the same result for any.

    Any ideas?

    namespace WindowsFormsApplication1
    {
        public partial class Form1 : Form
        {
            public Form1()
            {
                InitializeComponent();
                webBrowser1.Navigate("http://www.dfat.gov.au/geo/fs/aust.pdf");
            }
        }
    }

     

    12/06/2012 5:35:12 AM Thread:18 | error: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

       at System.Windows.Forms.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)

       at System.Windows.Forms.NativeWindow.DefWndProc(Message& m)

       at System.Windows.Forms.WebBrowserBase.WebBrowserBaseNativeWindow.WndProc(Message& m)

       at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

       at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)

       at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)

       at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)

       at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)

       at System.Windows.Forms.Application.Run(Form mainForm)

       at ybx.AppMain.StartMessageLoop() in

       at ybx.AppMain.StartApplication(IWebProxy proxy, X509Certificate2 clientCertificate, String uniqueProfileName, String[] commandLineArguments)


    Thursday, June 14, 2012 1:11 AM

Answers

  • Thanks Mike/Joel for trying to reproduce. Unfortunately it working on some computers, but not others is really not sufficient for a control to be distributed to a very wide client base.

    We're currently working around this problem by launching any pdfs in a separate window. It's not ideal, but it's better than an AccessViolation depending the machine, and the state of any Adobe plugins.

    Thursday, June 14, 2012 10:15 PM

All replies

  • The problem you are describing is more an aodbe problem the an IE problem.  The adobe is installed as an addin in the IE application.  The adobe uninstaller is written by adobe and should remove all of its components including any that is used by the IE.  it may not be able to do this if an IE application is runing, but should indicate that with an error message, or instructions to close the IE explorer when you perform an uninstall.  I assume that during your debug you isilated the problem by uninstalling the adove addin.

    You are correct that even if an addin isn't working properly in an IE application, it shouldn't prevent other application from running.  I'm not sure if this is a microsoft problem or an adobe problem.  There may still be portions of the adobe addin still running in the IE that need to be fixed by adobe.


    jdweng

    Thursday, June 14, 2012 4:17 AM
  • Hi Steve,

    Welcome to the MSDN Forum.

    According to your description, I didn't reproduce your scenario. And I got this:

    Would you like to try this on another computer?

    Best regards,


    Mike Feng
    MSDN Community Support | Feedback to us
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, June 14, 2012 10:44 AM
    Moderator
  • Thanks Mike/Joel for trying to reproduce. Unfortunately it working on some computers, but not others is really not sufficient for a control to be distributed to a very wide client base.

    We're currently working around this problem by launching any pdfs in a separate window. It's not ideal, but it's better than an AccessViolation depending the machine, and the state of any Adobe plugins.

    Thursday, June 14, 2012 10:15 PM
  • Hi Steve,

    Thank you for sharing your workaround here.

    Best regards,


    Mike Feng
    MSDN Community Support | Feedback to us
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Friday, June 15, 2012 1:51 AM
    Moderator