Access violation on the finalizer thread (CefGlue 50e94efc4182)

535 views
Skip to first unread message

Alex Forster

unread,
Apr 25, 2013, 9:10:15 PM4/25/13
to cef...@googlegroups.com
Just an FYI: hit an exception while a CefListValue was being garbage collected. First time I've hit it, though, and I've been running CefGlue once every few minutes for the last couple of weeks.

System.AccessViolationException was unhandled
  HResult=-2147467261
  Message=Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
  Source=Xilium.CefGlue
  StackTrace:
       at Xilium.CefGlue.Interop.cef_list_value_t.release(cef_list_value_t* self) in c:\Users\af0020\Desktop\xilium-xilium.cefglue-50e94efc4182\CefGlue\Interop\Classes.g\cef_list_value_t.g.cs:line 238
       at Xilium.CefGlue.CefListValue.Finalize() in c:\Users\af0020\Desktop\xilium-xilium.cefglue-50e94efc4182\CefGlue\Classes.g\CefListValue.g.cs:line 36


Dmitry Azaraev

unread,
Apr 26, 2013, 4:18:51 AM4/26/13
to cef...@googlegroups.com
Hi. Thanks.
Looks strange, or memory corruption.
What exactly you do to reproduce this?




--
You received this message because you are subscribed to the Google Groups "CefGlue" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cefglue+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Best regards,
   Dmitry

Talbot McInnis

unread,
Aug 26, 2014, 9:53:39 AM8/26/14
to cef...@googlegroups.com, dmitry....@gmail.com
We have started to experience the same symptom.  CefGlue from May 25, 2014.  We know this is occurring in one of the worker processes.  Our application access the same webpage in the same way and then just runs a lot of javascript.  This has affected multiple PCs, both new and configured identically.  It's rare.  There are 20 machines run 24-7 and we've had two incidents in a week.  We've been using CefGlue for several months but I just noticed this symptom a couple of weeks ago (but I can't say for sure it just started then).

Exception details are:

Application: Player.exe 
Framework Version: v4.0.30319 
Description: The process was terminated due to an unhandled exception. 
Exception Info: System.AccessViolationException 
Stack: 
   at Xilium.CefGlue.Interop.cef_list_value_t.release(Xilium.CefGlue.Interop.cef_list_value_t*) 
   at Xilium.CefGlue.CefListValue.Finalize() 
  

Faulting application name: Player.exe, version: 10.0.52.0, time stamp: 0x53ebdd97 
Faulting module name: libcef.DLL, version: 3.1916.1721.0, time stamp: 0x539617fa 
Exception code: 0xc0000005 
Fault offset: 0x000b65b2 
Faulting process id: 0x4fc4 
Faulting application start time: 0x01cfb7b8bcfbd518 
Faulting application path: C:\Users\Player\AppData\Local\787 Networks Inc\787 Networks Player\Player.exe 
Faulting module path: C:\Users\Player\AppData\Local\787 Networks Inc\787 Networks Player\libcef.DLL 
Report Id: c13aeaa7-2676-11e4-825e-40a8f0a38c41 
Faulting package full name: 

Junnan Wan

unread,
Mar 1, 2016, 1:25:25 PM3/1/16
to CefGlue
Hi,

I got the same problem, have you fixed the issue. 

 protected virtual void Dispose(bool disposing)
        {
            if (disposing)
            {
                if (_tooltipTimer != null)
                {
                    _tooltipTimer.Stop();
                }

                if (_browserPageImage != null)
                {
                    _browserPageImage.Source = null;
                    _browserPageImage = null;
                }

                if (_browserPageBitmap != null)
                {
                    _browserPageBitmap = null;
                }

                // if (this.browserPageD3dImage != null)
                // this.browserPageD3dImage = null;

                // TODO: What's the right way of disposing the browser instance?
                if (_browserHost != null)
                {
                    _browserHost.CloseBrowser();
                    _browserHost = null;
                }

                if (_browser != null)
                {
                    _browser.Dispose();
                    _browser = null;
                }
            }

            _disposed = true;
        }

This is the sample code in WpfCefBrowser Dispose method, I thought we might need to call the _browserHost.Dispose(0 here. What do you think about that?

Thanks

在 2013年4月25日星期四 UTC-7下午6:10:15,Alex Forster写道:

Dmitry Azaraev

unread,
Mar 1, 2016, 3:27:12 PM3/1/16
to CefGlue
Hello.

Currently you always can .Dispose() on any CEF object, if you no more need in this object. Note, that only managed wrapper actually disposed. So, whenever you work with proxified objects, i.e. objects which provides CEF for you - you always can safely it is call. Bit more complex with other situation, when you create object and CEF consume it. In this case, you can't call Dispose method, unless you absolutely sure, that object really no more needed. But, for this situation GC will do work for you.

It is possible more complex and unclear situations, but it is not about Browser & BrowserHost objects, so try to dispose them immediately. Although real browser closes asynchronously, and best way to handle all things properly - handle this correctly. What means, that after CloseBrowser call, all surrounding stuff still needed.



--
You received this message because you are subscribed to the Google Groups "CefGlue" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cefglue+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages