Debug version crashes

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.

Debug version crashes

Postby naoki5 » Tue Aug 27, 2019 4:09 am

I downloaded the binary distributions and built my application in debug configuration.
The application I built crashes when browsing.
For example, if I'm browsing the following site, it will crash frequently when loading the page.

https://www.msn.com/ja-jp

When my application crashes, Debug.log ends with the following message:

Code: Select all
[0826/180507.658:FATAL:request_impl.cc(1572)] Check failed: false.


This issue does not occur in release builds.
When I browse the same site with cefclient, cefclient crashes as well.

The binary distributions I downloaded is "Windows 32-bit Builds CEF 76.1.9".
When I build with CEF 75, it crashes in the same way.
My application is a 32-bit application using MFC.

My environment is
Windows 10 Pro 64bit (1809)
Visual Studio 2017 Version 15.9.13
Windows SDK Version 10.0.17763.0

What should I do if this is the case?
naoki5
Expert
 
Posts: 105
Joined: Wed Jul 17, 2019 2:44 am

Re: Debug version crashes

Postby Czarek » Tue Aug 27, 2019 11:17 am

Maintainer of the CEF Python, PHP Desktop and CEF C API projects. My LinkedIn.
User avatar
Czarek
Virtuoso
 
Posts: 1927
Joined: Sun Nov 06, 2011 2:12 am

Re: Debug version crashes

Postby ndesktop » Tue Aug 27, 2019 11:18 am

This is a typical (D)CHECK message. Sadly, most of the time is not a clear indication of "what went wrong", as in:
Code: Select all
bool result = pObject->DoSomethingVeryComplexWhichMightFail();
DCHECK(result);

This will simply say what you saw - "result failed", "result is false". So read the source code on line 1572 in file request_impl.cc.
You did not say which version you downloaded, so I will take a wild guess and say it's this one and you hit a NOTREACHED() which expands to a DCHECK(false).

If this is what happens, it's void CefPostDataElementImpl::Set(const network::DataElement& element) which attempts to use an element with type() not kBytes and not kFile.
Check with the debugger - type is probably the enumeration DataElementType from src/out/$platform$/gen/services/network/public/mojom/url_loader.mojom-shared.h:
Code: Select all
enum class DataElementType : int32_t {
  kUnknown = -1,
  kDataPipe,
  kChunkedDataPipe,
  kRawFile,
  kBlob,
  kFile,
  kBytes,
  kMinValue = -1,
  kMaxValue = 5,
};


That's all I can say with the data you provided. I might be dead wrong as well.
ndesktop
Master
 
Posts: 750
Joined: Thu Dec 03, 2015 10:10 am

Re: Debug version crashes

Postby magreenblatt » Tue Aug 27, 2019 11:55 am

naoki5 wrote:For example, if I'm browsing the following site, it will crash frequently when loading the page.

https://www.msn.com/ja-jp

I visited that website but it didn't crash for me. Can you list the specific steps (links clicked, forms submitted, etc) that reproduce the crash for you?
magreenblatt
Site Admin
 
Posts: 12383
Joined: Fri May 29, 2009 6:57 pm

Re: Debug version crashes

Postby linuxcef9 » Tue Aug 27, 2019 5:00 pm

You can get the debug symbols too. Launch cefclient, attach debugger and navigate to the website. Post the stacktrace here.
linuxcef9
Expert
 
Posts: 143
Joined: Tue Nov 06, 2018 3:08 pm

Re: Debug version crashes

Postby naoki5 » Wed Aug 28, 2019 12:44 am

I ran cefclient in debugger and checked argument of CefPostDataElementImpl::Set.
kDataPipe(0) is stored in element.type_.

This is contents of Visual Studio call stack window.
Code: Select all
    libcef.dll!logging::LogMessage::~LogMessage() 行 880   C++
>   libcef.dll!CefPostDataElementImpl::Set(const network::DataElement & element) 行 1572   C++
    libcef.dll!CefPostDataImpl::Set(const network::ResourceRequestBody & body) 行 1294   C++
    libcef.dll!CefRequestImpl::Set(const network::ResourceRequest * request, unsigned __int64 identifier) 行 510   C++
    libcef.dll!net_service::`anonymous namespace'::InterceptedRequestHandlerWrapper::MakeRequest(const network::ResourceRequest * request, __int64 request_id, bool read_only) 行 0   C++
    libcef.dll!net_service::`anonymous namespace'::InterceptedRequestHandlerWrapper::GetHandler(const net_service::RequestId & id, network::ResourceRequest * request, bool * intercept_only, scoped_refptr<CefRequestImpl> & requestPtr) 行 1038   C++
    libcef.dll!net_service::`anonymous namespace'::InterceptedRequestHandlerWrapper::OnBeforeRequest(const net_service::RequestId & id, network::ResourceRequest * request, bool request_was_redirected, base::OnceCallback<void (bool, bool)> callback, base::OnceCallback<void (int)> cancel_callback) 行 446   C++
    libcef.dll!net_service::InterceptedRequest::Restart() 行 365   C++
    libcef.dll!net_service::ProxyURLLoaderFactory::CreateLoaderAndStart(mojo::InterfaceRequest<network::mojom::URLLoader> loader, int routing_id, int request_id, unsigned int options, const network::ResourceRequest & request, mojo::InterfacePtr<network::mojom::URLLoaderClient> client, const net::MutableNetworkTrafficAnnotationTag & traffic_annotation) 行 1169   C++
    libcef.dll!network::mojom::URLLoaderFactoryStubDispatch::Accept(network::mojom::URLLoaderFactory * impl, mojo::Message * message) 行 210   C++
    libcef.dll!network::mojom::URLLoaderFactoryStub<mojo::RawPtrImplRefTraits<network::mojom::URLLoaderFactory> >::Accept(mojo::Message * message) 行 127   C++
    libcef.dll!mojo::InterfaceEndpointClient::HandleValidatedMessage(mojo::Message * message) 行 0   C++
    libcef.dll!mojo::FilterChain::Accept(mojo::Message * message) 行 40   C++
    libcef.dll!mojo::InterfaceEndpointClient::HandleIncomingMessage(mojo::Message * message) 行 316   C++
    libcef.dll!mojo::internal::MultiplexRouter::ProcessIncomingMessage(mojo::internal::MultiplexRouter::MessageWrapper * message_wrapper, mojo::internal::MultiplexRouter::ClientCallBehavior client_call_behavior, base::SequencedTaskRunner * current_task_runner) 行 874   C++
    libcef.dll!mojo::internal::MultiplexRouter::Accept(mojo::Message * message) 行 598   C++
    libcef.dll!mojo::FilterChain::Accept(mojo::Message * message) 行 40   C++
    libcef.dll!mojo::Connector::DispatchMessageW(mojo::Message message) 行 524   C++
    libcef.dll!mojo::Connector::ReadAllAvailableMessages() 行 600   C++
    libcef.dll!mojo::Connector::OnHandleReadyInternal(unsigned int result) 行 437   C++
    libcef.dll!base::internal::Invoker<base::internal::BindState<void (network::mojom::CookieManager_DeleteCookies_ProxyToResponder::*)(unsigned int) __attribute__((thiscall)),std::__1::unique_ptr<network::mojom::CookieManager_DeleteCookies_ProxyToResponder,std::__1::default_delete<network::mojom::CookieManager_DeleteCookies_ProxyToResponder> > >,void (unsigned int)>::RunOnce(base::internal::BindStateBase * base, unsigned int unbound_args) 行 645   C++
    libcef.dll!mojo::SimpleWatcher::DiscardReadyState(const base::RepeatingCallback<void (unsigned int)> & callback, unsigned int result, const mojo::HandleSignalsState & state) 行 194   C++
    libcef.dll!base::internal::Invoker<base::internal::BindState<void (*)(const base::RepeatingCallback<void (unsigned int)> &, unsigned int, const mojo::HandleSignalsState &),base::RepeatingCallback<void (unsigned int)> >,void (unsigned int, const mojo::HandleSignalsState &)>::Run(base::internal::BindStateBase * base, unsigned int unbound_args, const mojo::HandleSignalsState & unbound_args) 行 654   C++
    libcef.dll!mojo::SimpleWatcher::OnHandleReady(int watch_id, unsigned int result, const mojo::HandleSignalsState & state) 行 293   C++
    libcef.dll!mojo::SimpleWatcher::Context::Notify(unsigned int result, MojoHandleSignalsState signals_state, unsigned int flags) 行 118   C++
    libcef.dll!mojo::SimpleWatcher::Context::CallNotify(const MojoTrapEvent * event) 行 61   C++
    libcef.dll!mojo::core::WatcherDispatcher::InvokeWatchCallback(unsigned int context, unsigned int result, const mojo::core::HandleSignalsState & state, unsigned int flags) 行 94   C++
    libcef.dll!mojo::core::Watch::InvokeCallback(unsigned int result, const mojo::core::HandleSignalsState & state, unsigned int flags) 行 79   C++
    libcef.dll!mojo::core::RequestContext::~RequestContext() 行 73   C++
    libcef.dll!mojo::core::NodeChannel::OnChannelMessage(const void * payload, unsigned int payload_size, std::__1::vector<mojo::PlatformHandle,std::__1::allocator<mojo::PlatformHandle> > handles) 行 700   C++
    libcef.dll!mojo::core::Channel::TryDispatchMessage(base::span<const char,4294967295> buffer, unsigned int * size_hint) 行 791   C++
    libcef.dll!mojo::core::Channel::OnReadComplete(unsigned int bytes_read, unsigned int * next_read_size_hint) 行 692   C++
    libcef.dll!mojo::core::`anonymous namespace'::ChannelWin::OnIOCompleted(base::MessagePumpForIO::IOContext * context, unsigned long bytes_transfered, unsigned long error) 行 234   C++
    libcef.dll!base::MessagePumpForIO::WaitForIOCompletion(unsigned long timeout, base::MessagePumpForIO::IOHandler * filter) 行 688   C++
    libcef.dll!base::MessagePumpForIO::DoRunLoop() 行 637   C++
    libcef.dll!base::MessagePumpWin::Run(base::MessagePump::Delegate * delegate) 行 77   C++
    libcef.dll!base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::Run(bool application_tasks_allowed, base::TimeDelta timeout) 行 450   C++
    libcef.dll!base::RunLoop::RunWithTimeout(base::TimeDelta timeout) 行 161   C++
    libcef.dll!base::RunLoop::Run() 行 130   C++
    libcef.dll!base::Thread::Run(base::RunLoop * run_loop) 行 242   C++
    libcef.dll!content::BrowserProcessSubThread::IOThreadRun(base::RunLoop * run_loop) 行 177   C++
    libcef.dll!content::BrowserProcessSubThread::Run(base::RunLoop * run_loop) 行 134   C++
    libcef.dll!base::Thread::ThreadMain() 行 312   C++
    libcef.dll!base::`anonymous namespace'::ThreadFunc(void * params) 行 100   C++
    [外部コード]   
    [下のフレームは間違っているか、または見つかりません。kernel32.dll に対して読み込まれたシンボルはありません]   不明
naoki5
Expert
 
Posts: 105
Joined: Wed Jul 17, 2019 2:44 am

Re: Debug version crashes

Postby naoki5 » Wed Aug 28, 2019 12:56 am

magreenblatt wrote:
naoki5 wrote:For example, if I'm browsing the following site, it will crash frequently when loading the page.

https://www.msn.com/ja-jp

I visited that website but it didn't crash for me. Can you list the specific steps (links clicked, forms submitted, etc) that reproduce the crash for you?


1. Open this site.
https://www.msn.com/ja-jp
2. Click a news article link to open the article page.
3. Click "msn" logo in the upper left to return to the top page.

If I do this, it will crash with a high probability.
Even if it doesn't crash, it crashes when I repeat the same operation.
naoki5
Expert
 
Posts: 105
Joined: Wed Jul 17, 2019 2:44 am

Re: Debug version crashes

Postby magreenblatt » Wed Aug 28, 2019 10:10 am

naoki5 wrote:1. Open this site.
https://www.msn.com/ja-jp
2. Click a news article link to open the article page.
3. Click "msn" logo in the upper left to return to the top page.

If I do this, it will crash with a high probability.
Even if it doesn't crash, it crashes when I repeat the same operation.

Thanks for the updated instructions. I'm still unable to reproduce the crash. Can you provide a symbolized stack trace?
magreenblatt
Site Admin
 
Posts: 12383
Joined: Fri May 29, 2009 6:57 pm

Re: Debug version crashes

Postby naoki5 » Thu Aug 29, 2019 2:46 am

magreenblatt wrote:Can you provide a symbolized stack trace?


I wrote the contents of the call stack window in the previous message, is that not enough?
That is the call stack when CEF 75.1.14 cefclient crashes.
What can I do to provide information?
naoki5
Expert
 
Posts: 105
Joined: Wed Jul 17, 2019 2:44 am

Re: Debug version crashes

Postby magreenblatt » Thu Aug 29, 2019 8:42 am

naoki5 wrote:
magreenblatt wrote:Can you provide a symbolized stack trace?


I wrote the contents of the call stack window in the previous message, is that not enough?
That is the call stack when CEF 75.1.14 cefclient crashes.
What can I do to provide information?

Sorry, I missed that. It's enough for now.
magreenblatt
Site Admin
 
Posts: 12383
Joined: Fri May 29, 2009 6:57 pm

Next

Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 52 guests