DoMessageLoopWork() is crashing on some websites

Having problems with building or using the CefGlue .NET/Mono binding? Ask your questions here.

Moderator: fddima

DoMessageLoopWork() is crashing on some websites

Postby kungfooman » Mon Feb 02, 2015 5:23 pm

Hi all,

I am trying to get DoMessageLoopWork() to work, but currently it's crashing the sample application CefGlue.Samples.WpfOsr on my website http://killtube.org, while http://google.com e.g. works (often, sometimes crashing also with System.InvalidOperationException).

The real crash looks like this:

cef crash.png
cef crash.png (141.19 KiB) Viewed 8702 times


In Program.cs:

Code: Select all
            var cefSettings = new CefSettings
            {
                // BrowserSubprocessPath = browserSubprocessPath,
                SingleProcess = true,
                WindowlessRenderingEnabled = true,
                MultiThreadedMessageLoop = false,
                LogSeverity = CefLogSeverity.Verbose,
                LogFile = "cef.log",
            };


Then I added the DoMessageLoopWork() in MainWindow.xaml.cs:

Code: Select all
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
         this.MouseMove += MainWindow_MouseMove;
        }

      int i = 5;
      void MainWindow_MouseMove(object sender, MouseEventArgs e)
      {
         if (i == 0)
         {
            CefRuntime.DoMessageLoopWork();
            i = 5;
         }
         i--;
      }

        protected override void OnClosed(EventArgs e)
        {
            browser.Dispose();
            base.OnClosed(e);
        }

        private void addressTextBox_KeyDown_1(object sender, KeyEventArgs e)
        {
            if (e.Key == Key.Return)
            {
                browser.NavigateTo(addressTextBox.Text);
            }
        }
    }


I call DoMessageLoopWork() in every 5th mouse move event. When I call it too often, it throws "System.InvalidOperationException".

cef crash invalid.png
cef crash invalid.png (57.22 KiB) Viewed 8702 times


Does somebody know how to fix this? :|

Kind regards,
kungfooman
kungfooman
Newbie
 
Posts: 2
Joined: Mon Feb 02, 2015 4:59 pm

Re: DoMessageLoopWork() is crashing on some websites

Postby magreenblatt » Tue Feb 03, 2015 2:42 pm

If the crash is in libcef.dll can you provide a symbolized stack trace of the crash using a Debug build of libcef.dll? Debug symbols are available from http://cefbuilds.com.
magreenblatt
Site Admin
 
Posts: 12383
Joined: Fri May 29, 2009 6:57 pm

Re: DoMessageLoopWork() is crashing on some websites

Postby kungfooman » Wed Feb 04, 2015 12:57 pm

Thanks for your reply, but I tried it the "real" way now and it worked out with multiple processes:

Code: Select all
         var cefSettings = new CefSettings
         {
            BrowserSubprocessPath = "G:\\chrome\\Xilium.CefGlue.Samples.WpfOsr.exe",
            SingleProcess = false,
            WindowlessRenderingEnabled = true,
            MultiThreadedMessageLoop = true,
            LogSeverity = CefLogSeverity.Verbose,
            LogFile = "G:\\cef.log",
            //CachePath = "G:\\cache",

         };


Since I am integrating it in Untiy3D, I needed to specify some .exe, so it doesnt tries to clone the Unity3D process (which fails :D).

Some days ago I wanted to get libcef.dll.pdb, but I just found some other .pdb-files. Might try it again later when I need it.
kungfooman
Newbie
 
Posts: 2
Joined: Mon Feb 02, 2015 4:59 pm


Return to CefGlue Forum

Who is online

Users browsing this forum: No registered users and 9 guests