crash in chromium (GLES2CommandBufferStub::Initialize)

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.

crash in chromium (GLES2CommandBufferStub::Initialize)

Postby sikor » Tue Feb 05, 2019 1:38 pm

I am using CEF version 3578. The application that I use is configured using below options:
Code: Select all
values.emplace("no-message-box", "");
values.emplace("no-sandbox", "");
values.emplace("enable-smooth-scrolling", "");
values.emplace("disable-spell-checking", "");
values.emplace("autoplay-policy", "no-user-gesture-required");
values.emplace("enable-aggressive-domstorage-flushing", "");
values.emplace("js-flags", "--expose-gc");
values.emplace("disable-gpu", "");
values.emplace("disable-gpu-compositing", "");
values.emplace("single-process", "");

Plus:
Code: Select all
settings.multi_threaded_message_loop = false;
settings.no_sandbox = true;
settings.windowless_rendering_enabled = true;
settings.uncaught_exception_stack_size = 999;
browserSettings.webgl = STATE_ENABLED;
browserSettings.universal_access_from_file_urls = STATE_ENABLED;
browserSettings.javascript_close_windows = STATE_DISABLED;
browserSettings.local_storage = STATE_ENABLED;
browserSettings.application_cache = STATE_ENABLED;

and
Code: Select all
CefEnableHighDPISupport();


With such setup, when I run the application and play an audio (using Audio object) I get a crash:
Code: Select all
>   libcef.dll!gpu::GLES2CommandBufferStub::Initialize(gpu::CommandBufferStub * share_command_buffer_stub, const GPUCreateCommandBufferConfig & init_params, base::UnsafeSharedMemoryRegion shared_state_shm) Line 134   C++
    libcef.dll!gpu::GpuChannel::OnCreateCommandBuffer(const GPUCreateCommandBufferConfig & init_params, int route_id, base::UnsafeSharedMemoryRegion shared_state_shm, gpu::ContextResult * result, gpu::Capabilities * capabilities) Line 627   C++
    libcef.dll!base::DispatchToMethodImpl<gpu::GpuChannel *,void (gpu::GpuChannel::*)(const GPUCreateCommandBufferConfig &, int, base::UnsafeSharedMemoryRegion, gpu::ContextResult *, gpu::Capabilities *) __attribute__((thiscall)),std::tuple<GPUCreateCommandBufferConfig,int,base::UnsafeSharedMemoryRegion>,std::tuple<gpu::ContextResult,gpu::Capabilities>,0,1,2,0,1>(gpu::GpuChannel * const & obj, void(gpu::GpuChannel::*)(const GPUCreateCommandBufferConfig &, int, base::UnsafeSharedMemoryRegion, gpu::ContextResult *, gpu::Capabilities *) method, std::tuple<GPUCreateCommandBufferConfig,int,base::UnsafeSharedMemoryRegion> && in, std::tuple<gpu::ContextResult,gpu::Capabilities> * out, std::integer_sequence<unsigned int,0,1,2>, std::integer_sequence<unsigned int,0,1>) Line 94   C++
    libcef.dll!IPC::MessageT<GpuChannelMsg_CreateCommandBuffer_Meta,std::tuple<GPUCreateCommandBufferConfig,int,base::UnsafeSharedMemoryRegion>,std::tuple<gpu::ContextResult,gpu::Capabilities> >::Dispatch<gpu::GpuChannel,gpu::GpuChannel,void,void (gpu::GpuChannel::*)(const GPUCreateCommandBufferConfig &, int, base::UnsafeSharedMemoryRegion, gpu::ContextResult *, gpu::Capabilities *) __attribute__((thiscall))>(const IPC::Message * msg, gpu::GpuChannel * obj, gpu::GpuChannel * sender, void *, void(gpu::GpuChannel::*)(const GPUCreateCommandBufferConfig &, int, base::UnsafeSharedMemoryRegion, gpu::ContextResult *, gpu::Capabilities *) func) Line 204   C++
    libcef.dll!gpu::GpuChannel::OnControlMessageReceived(const IPC::Message & msg) Line 470   C++
    libcef.dll!gpu::GpuChannel::HandleMessageHelper(const IPC::Message & msg) Line 511   C++
    libcef.dll!base::internal::Invoker<base::internal::BindState<void (net::MDnsClientImpl::Core::*)(const std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short> &) __attribute__((thiscall)),base::WeakPtr<net::MDnsClientImpl::Core>,std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,unsigned short> >,void ()>::Run(base::internal::BindStateBase * base) Line 674   C++
    libcef.dll!base::debug::TaskAnnotator::RunTask(const char * queue_function, base::PendingTask * pending_task) Line 99   C++
    libcef.dll!base::MessageLoop::RunTask(base::PendingTask * pending_task) Line 436   C++
    libcef.dll!base::MessageLoop::DeferOrRunPendingTask(base::PendingTask pending_task) Line 445   C++
    libcef.dll!base::MessageLoop::DoWork() Line 517   C++
    libcef.dll!base::MessagePumpForUI::DoRunLoop() Line 181   C++
    libcef.dll!base::MessagePumpWin::Run(base::MessagePump::Delegate * delegate) Line 55   C++
    libcef.dll!base::MessageLoop::Run(bool) Line 386   C++
    libcef.dll!base::RunLoop::Run() Line 108   C++
    libcef.dll!base::Thread::Run(base::RunLoop * run_loop) Line 263   C++
    libcef.dll!base::Thread::ThreadMain() Line 360   C++
    libcef.dll!base::`anonymous namespace'::ThreadFunc(void * params) Line 103   C++
    [External Code]   


I build the application in windows 10, VisualStudio 2015, x86.


In chromium code:
gles2_command_buffer_stub.cc:
Code: Select all
GLES2CommandBufferStub::Initialize(...)
...
  bool offscreen = (surface_handle_ == kNullSurfaceHandle);
  gl::GLSurface* default_surface = manager->default_offscreen_surface();
...
  gl::GLSurfaceFormat surface_format =
      offscreen ? default_surface->GetFormat() : gl::GLSurfaceFormat();


The 'default_surface' is nullptr.

Any ideas?
sikor
Techie
 
Posts: 12
Joined: Tue Sep 27, 2016 4:08 am

Re: crash in chromium (GLES2CommandBufferStub::Initialize)

Postby magreenblatt » Tue Feb 05, 2019 1:42 pm

Single-process mode is not supported.
magreenblatt
Site Admin
 
Posts: 12408
Joined: Fri May 29, 2009 6:57 pm

Re: crash in chromium (GLES2CommandBufferStub::Initialize)

Postby sikor » Thu Feb 07, 2019 6:08 am

ok, I have figured what was the problem. I have missed copying swiftshader/libGLESv2.dll and swiftshader/libEGL.dll to the application dir. With that added, the crash does not occur anymore.
sikor
Techie
 
Posts: 12
Joined: Tue Sep 27, 2016 4:08 am

Re: crash in chromium (GLES2CommandBufferStub::Initialize)

Postby Czarek » Thu Feb 07, 2019 6:29 am

I saw a commit disabling the single_process option, but turns out you can still set it via command line. Single process mode is not stable and is not recommended for production.
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: crash in chromium (GLES2CommandBufferStub::Initialize)

Postby sikor » Thu Feb 07, 2019 7:16 am

Czarek wrote:I saw a commit disabling the single_process option, but turns out you can still set it via command line. Single process mode is not stable and is not recommended for production.


Yes, I enable it via command line.
sikor
Techie
 
Posts: 12
Joined: Tue Sep 27, 2016 4:08 am


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 46 guests