libcef.DLL,0xc0000005 error when use CefRequestContext

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

Moderator: fddima

libcef.DLL,0xc0000005 error when use CefRequestContext

Postby duoixi » Thu Mar 12, 2015 9:24 am

hi,all

when use the CefRequestContext , the error occurred random(when Right-click or input). and the process exit without any exception report. if not use CefRequestContext ,it is fine.


Code: Select all
protected override void OnHandleCreated(EventArgs e)
        {
             base.OnHandleCreated(e);

                if (DesignMode)
                {
                    if (!_handleCreated) Paint += PaintInDesignMode;
                }
                else
                {

                   
                    var windowInfo = CefWindowInfo.Create();
                    windowInfo.SetAsChild(Handle, new CefRectangle { X = 0, Y = 0, Width = Width, Height = Height });

                    string mulu = DjtPath.GetInstance().getProcessPath("") + "//s_cache//cookies//" + browserid + "//";
                    if (!Directory.Exists(mulu))
                    {
                        Directory.CreateDirectory(mulu);
                    }
                    currentCookie = CefCookieManager.Create(mulu, false);
                    CefRequestContext aloneContext = CefRequestContext.CreateContext(new CefWebRequestContextHandler(this));

                    currentClient = CreateWebClient();
                   
                    var settings = BrowserSettings;

                    if (settings == null) settings = new CefBrowserSettings { };

                    //CefBrowserHost.CreateBrowser(windowInfo, currentClient, settings, StartUrl);
                    CefBrowserHost.CreateBrowser(windowInfo, currentClient, settings, StartUrl, aloneContext);
                   
                }
            _handleCreated = true;
         
        }




public class CefWebRequestContextHandler : CefRequestContextHandler
    {
         private readonly CefWebBrowser _core;

         public CefWebRequestContextHandler(CefWebBrowser core)
       // public CefWebRequestContextHandler()
        {
            _core = core;
        }
         protected override CefCookieManager GetCookieManager()
         {
           
            try
            {
               // Console.WriteLine("GetCookieManager");
                return _core.currentCookie;
            }
            catch (Exception e)
            {
                Console.WriteLine(e.ToString());
            }
             
             
             return null;
         }
    }




error msg:
Code: Select all
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="Application Error" />
    <EventID Qualifiers="0">1000</EventID>
    <Level>2</Level>
    <Task>100</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2015-03-12T14:06:54.000000000Z" />
    <EventRecordID>50122</EventRecordID>
    <Channel>Application</Channel>
    <Computer>USER-20130528DG</Computer>
    <Security />
  </System>
  <EventData>
    <Data>DjtStart.exe</Data>
    <Data>1.0.0.0</Data>
    <Data>55019d59</Data>
    <Data>libcef.DLL</Data>
    <Data>3.2171.1949.0</Data>
    <Data>548209d5</Data>
    <Data>c0000005</Data>
    <Data>00000000014956c8</Data>
    <Data>2594</Data>
    <Data>01d05ccdb572d4fb</Data>
    <Data>E:\bin\Release\DjtStart.exe</Data>
    <Data>E:\bin\Release\libcef.DLL</Data>
    <Data>08d3efb0-c8c1-11e4-b8b6-08606ed510c8</Data>
  </EventData>
</Event>



Many thanks.
duoixi
Techie
 
Posts: 18
Joined: Sat May 18, 2013 8:28 pm

Return to CefGlue Forum

Who is online

Users browsing this forum: No registered users and 17 guests