GeckoFX45 Crash With System.AccessViolationException

136 Views Asked by At

I want to test GeckoFX with the Zoom link. But it throws "System.AccessViolationException" in Program.cs

using System.Diagnostics;
using System.Windows.Forms;
using Gecko;

namespace GeckoFXTest
{
    public partial class webbrowser : Form
    {
        public webbrowser()
        {
            InitializeComponent();
            Initialize();
        }
        public GeckoWebBrowser browser;
        private void Initialize()
        {
            browser = new GeckoWebBrowser();
            Xpcom.Initialize("Firefox");
            browser.Dock = DockStyle.Fill;
            this.Controls.Add(browser);
            browser.Navigate("https://us04web.zoom.us/j/...?pwd=...");
            browser.DocumentCompleted += browser_DocumentCompleted;
        }
        private void browser_DocumentCompleted(object sender, Gecko.Events.GeckoDocumentCompletedEventArgs e)
        {
            Debug.WriteLine(e.Window.Document.Title);
            Debug.WriteLine(e.Window.Document.Uri);
        }
    }
}

Browser opens this page

When I click the "Launch Meeting" button, sometimes it closing with nothing but sometimes it throws "System.AccessViolationException" error.

Note: In first try, it opened Launch App window. I don't check "Always Ask" and clicked "Allow" button and opened Zoom. It didn't work after that.

Tried:

  • Reinstall GeckoFX
  • Removing Debug folder.
  • Changing AnyCPU to x86.
  • Clearing Temp folders.
  • Restarting Visual Studio with ADMIN priveleges.
0

There are 0 best solutions below