CefSchemeHandlerFactoryCppToC error

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

CefSchemeHandlerFactoryCppToC error

Postby nickak2003 » Fri Oct 02, 2015 11:18 pm

When my program is in release mode, it shuts down normally, but in debug mode, I get an error: [1002/220745:FATAL:libcef_dll_wrapper.cc(246)] Check failed: base::AtomicRefCountIsZero( &CefSchemeHandlerFactoryCppToC::DebugObjCt).
nickak2003
Techie
 
Posts: 43
Joined: Fri Apr 10, 2015 6:53 pm

Re: CefSchemeHandlerFactoryCppToC error

Postby nickak2003 » Thu Oct 08, 2015 1:36 pm

So I am pretty sure all cefbrowser instances have been released, everything works fine - google.com. I am using createbrowsersync. My schemehandler code is straight from the examples. This is what the error log looks like:
Code: Select all
[1007/215904:ERROR:renderer_main.cc(200)] Running without renderer sandbox
[1007/215907:WARNING:raw_channel_win.cc(473)] WriteFile: The pipe is being closed. (0xE8)
[1007/215907:WARNING:channel.cc(549)] Failed to send message to ack remove remote endpoint (local ID 1, remote ID 1)
[1007/215907:WARNING:channel.cc(315)] RawChannel write error
[1007/215907:WARNING:raw_channel_win.cc(473)] WriteFile: The pipe is being closed. (0xE8)
[1007/215907:WARNING:channel.cc(549)] Failed to send message to ack remove remote endpoint (local ID 2147483648, remote ID 2)
[1007/215907:WARNING:channel.cc(315)] RawChannel write error
[1007/215907:FATAL:libcef_dll_wrapper.cc(246)] Check failed: base::AtomicRefCountIsZero( &CefSchemeHandlerFactoryCppToC::DebugObjCt).

nickak2003
Techie
 
Posts: 43
Joined: Fri Apr 10, 2015 6:53 pm

Re: CefSchemeHandlerFactoryCppToC error

Postby magreenblatt » Thu Oct 08, 2015 1:40 pm

nickak2003 wrote:When my program is in release mode, it shuts down normally, but in debug mode, I get an error: [1002/220745:FATAL:libcef_dll_wrapper.cc(246)] Check failed: base::AtomicRefCountIsZero( &CefSchemeHandlerFactoryCppToC::DebugObjCt).

This means you're keeping a reference to a CefSchemeHandlerFactory object somewhere.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: CefSchemeHandlerFactoryCppToC error

Postby nickak2003 » Thu Oct 08, 2015 4:42 pm

I don't think so, the code is as follows:
Code: Select all
CefRegisterSchemeHandlerFactory(scheme, domain,  new ClientSchemeHandlerFactory());
nickak2003
Techie
 
Posts: 43
Joined: Fri Apr 10, 2015 6:53 pm

Re: CefSchemeHandlerFactoryCppToC error

Postby magreenblatt » Thu Oct 08, 2015 5:37 pm

What does your ClientSchemeHandlerFactory implementation look like? Is anything keeping a reference to it?
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: CefSchemeHandlerFactoryCppToC error

Postby nickak2003 » Thu Oct 08, 2015 8:01 pm

Code: Select all
// Implementation of the factory for for creating schema handlers.
class ClientSchemeHandlerFactory : public CefSchemeHandlerFactory {
 public:
  // Return a new scheme handler instance to handle the request.
  virtual CefRefPtr<CefResourceHandler> Create(CefRefPtr<CefBrowser> browser,
                                               CefRefPtr<CefFrame> frame,
                                               const CefString& scheme_name,
                                               CefRefPtr<CefRequest> request)
                                               OVERRIDE {
    CEF_REQUIRE_IO_THREAD();
    return new ClientSchemeHandler();
  }

  IMPLEMENT_REFCOUNTING(ClientSchemeHandlerFactory);
};

straight from the examples. I don't think there are any references anywhere as the new is passed into the create function and I don't ever retrieve it anywhere either.
nickak2003
Techie
 
Posts: 43
Joined: Fri Apr 10, 2015 6:53 pm

Re: CefSchemeHandlerFactoryCppToC error

Postby magreenblatt » Thu Oct 08, 2015 8:30 pm

Does the problem reproduce with the cefclient sample application? If not, what is the difference between your application and the sample application?
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: CefSchemeHandlerFactoryCppToC error

Postby nickak2003 » Mon Oct 12, 2015 6:21 pm

Sorry something stupid, everything working!
nickak2003
Techie
 
Posts: 43
Joined: Fri Apr 10, 2015 6:53 pm


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 100 guests