Crash + dump - reproducible

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 + dump - reproducible

Postby Krzychu » Sat Apr 30, 2016 6:55 pm

Hi all,

I'm new on this forum so.. please forgive me if I break any rules :)...

I'm using CEFSharp wrapper (http://cefsharp.github.io/) to embede Chromium in my WPF application.
My application is a deficate webbrowser for really nice game: crownofthegods.com

Currently I use version 3.2623.1396.0 of libcef.dll

Browser subprocess crashes regularly (not always but let say 99% chance for crash...) on certain in-game operation. It happens when I try to move some graphical icon from one position to other. This game uses html/canvas to paint game buildings, maps, etc...

Crash finally ends with out of memory exception because CEF trying to allocate huge amount of memory ... (500MB and more on x64 system) for this operation. I guess there is infinite loop somewhere..

Crash dump file:
https://onedrive.live.com/redir?resid=B ... =file%2c7z

OS: Windows 10x mostly, application crashes also on Windows 8 and different configuration, graphics cards than mine...

Do you need any other information?

--
Br, Krzychu
Krzychu
Newbie
 
Posts: 5
Joined: Sat Apr 30, 2016 6:35 pm

Re: Crash + dump - reproducible

Postby magreenblatt » Sat Apr 30, 2016 9:14 pm

Out of memory is usually due to bad JavaScript code. Please post the symbolized stack trace as text.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Crash + dump - reproducible

Postby Krzychu » Sun May 01, 2016 3:38 am

Hi,

I've marked potential problem in my opinion:

libcef.dll!logging::LogMessage::~LogMessage() Line 737 + 0x9 bytes C++
libcef.dll!base::`anonymous namespace'::OnNoMemory(unsigned int size=645767440) Line 42 C++
libcef.dll!`anonymous namespace'::call_new_handler(bool nothrow=true, unsigned int size=645767440) Line 96 + 0x5 bytes C++
libcef.dll!malloc(unsigned int size=645767440) Line 175 + 0x13 bytes C++
libcef.dll!`anonymous namespace'::generic_cpp_alloc(unsigned int size=645767440, bool nothrow=false) Line 108 + 0x8 bytes C++
libcef.dll!operator new[](unsigned int size=645767440) Line 121 + 0xa bytes C++
libcef.dll!std::_Allocate<content::GLHelperReadbackSupport::FormatCacheEntry>(unsigned int _Count=40360465, content::GLHelperReadbackSupport::FormatCacheEntry * __formal=0x00000000) Line 28 + 0x10 bytes C++
libcef.dll!std::vector<webrtc::SimulcastEncoderAdapter::StreamInfo,std::allocator<webrtc::SimulcastEncoderAdapter::StreamInfo> >::_Reallocate(unsigned int _Count=40360465) Line 1588 + 0x5 bytes C++
libcef.dll!std::vector<webrtc::SimulcastEncoderAdapter::StreamInfo,std::allocator<webrtc::SimulcastEncoderAdapter::StreamInfo> >::_Reserve(unsigned int _Count=1) Line 1617 + 0x13 bytes C++
> libcef.dll!std::vector<webrtc::SimulcastEncoderAdapter::StreamInfo,std::allocator<webrtc::SimulcastEncoderAdapter::StreamInfo> >::push_back(webrtc::SimulcastEncoderAdapter::StreamInfo && _Val={...}) Line 882 C++
libcef.dll!skia::ConvolutionFilter1D::AddFilter(int filter_offset=0, const short * filter_values=0x0730efb0, int filter_length=2) Line 320 C++
libcef.dll!skia::`anonymous namespace'::ResizeFilter::ComputeFilters(int src_size=64, int dest_subset_lo=26906977, int dest_subset_size=2147483647, float scale=33554432.0, skia::ConvolutionFilter1D * output=0x0730f170) Line 298 + 0x1d bytes C++
libcef.dll!skia::`anonymous namespace'::ResizeFilter::ResizeFilter(skia::ImageOperations::ResizeMethod method=RESIZE_HAMMING1, int src_full_width=64, int src_full_height=64, int dest_width=2147483647, int dest_height=2147483647, const SkIRect & dest_subset={...}) Line 193 + 0x23 bytes C++
libcef.dll!skia::ImageOperations::Resize(const SkBitmap & source={...}, skia::ImageOperations::ResizeMethod method=RESIZE_BETTER, int dest_width=2147483647, int dest_height=2147483647, const SkIRect & dest_subset={...}, SkBitmap::Allocator * allocator=0x00000000) Line 381 C++
libcef.dll!skia::ImageOperations::Resize(const SkBitmap & source={...}, skia::ImageOperations::ResizeMethod method=RESIZE_BETTER, int dest_width=2147483647, int dest_height=2147483647, SkBitmap::Allocator * allocator=0x00000000) Line 409 + 0x2b bytes C++
libcef.dll!ui::ScaleAndRotateCursorBitmapAndHotpoint(float scale=1.02360102e+13, gfx::Display::Rotation rotation=ROTATE_0, SkBitmap * bitmap=0x0730f300, gfx::Point * hotpoint=0x0730f348) Line 95 + 0x14 bytes C++
libcef.dll!content::WebCursor::CreateScaledBitmapAndHotspotFromCustomData(SkBitmap * bitmap=0x0730f300, gfx::Point * hotspot=0x0730f348) Line 128 + 0x23 bytes C++
libcef.dll!content::WebCursor::GetPlatformCursor() Line 27 C++
libcef.dll!CefRenderWidgetHostViewOSR::UpdateCursor(const content::WebCursor & cursor={...}) Line 771 C++
libcef.dll!ViewHostMsg_SetCursor::Dispatch<content::RenderWidgetHostImpl,content::RenderWidgetHostImpl,void,void (__thiscall content::RenderWidgetHostImpl::*)(content::WebCursor const &)>(const IPC::Message * msg=0x0db4f538, content::RenderWidgetHostImpl * obj=0x056ca260, content::RenderWidgetHostImpl * sender=0x056ca260, void * parameter=0x00000000, void (const content::WebCursor &)* func=0x55150d58) Line 1128 + 0x2e bytes C++
libcef.dll!content::RenderWidgetHostImpl::OnMessageReceived(const IPC::Message & msg={...}) Line 458 + 0x3e bytes C++
libcef.dll!content::RenderProcessHostImpl::OnMessageReceived(const IPC::Message & msg={...}) Line 1721 + 0x5 bytes C++
libcef.dll!IPC::ChannelProxy::Context::OnDispatchMessage(const IPC::Message & message={...}) Line 294 C++
libcef.dll!base::internal::Invoker<base::IndexSequence<0,1>,base::internal::BindState<base::internal::RunnableAdapter<void (__thiscall content::WebFileWriterImpl::WriterBridge::*)(base::Callback<void __cdecl(enum base::File::Error)> const &)>,void __cdecl(content::WebFileWriterImpl::WriterBridge *,base::Callback<void __cdecl(enum base::File::Error)> const &),scoped_refptr<content::WebFileWriterImpl::WriterBridge>,base::Callback<void __cdecl(enum base::File::Error)> >,base::internal::TypeList<base::internal::UnwrapTraits<scoped_refptr<content::WebFileWriterImpl::WriterBridge> >,base::internal::UnwrapTraits<base::Callback<void __cdecl(enum base::File::Error)> > >,base::internal::InvokeHelper<0,void,base::internal::RunnableAdapter<void (__thiscall content::WebFileWriterImpl::WriterBridge::*)(base::Callback<void __cdecl(enum base::File::Error)> const &)>,base::internal::TypeList<content::WebFileWriterImpl::WriterBridge *,base::Callback<void __cdecl(enum base::File::Error)> const &> >,void __cdecl(void)>::Run(base::internal::BindStateBase * base=0x0db4f520) Line 350 + 0x1d bytes C++
libcef.dll!base::debug::TaskAnnotator::RunTask(const char * queue_function=0x563d25d8, const base::PendingTask & pending_task={...}) Line 51 + 0x5 bytes C++
libcef.dll!base::MessageLoop::RunTask(const base::PendingTask & pending_task={...}) Line 482 C++
libcef.dll!base::MessageLoop::DoWork() Line 602 C++
libcef.dll!base::MessagePumpForUI::DoRunLoop() Line 175 C++
libcef.dll!base::MessagePumpWin::Run(base::MessagePump::Delegate * delegate=0x01029e60) Line 58 + 0x31 bytes C++
libcef.dll!base::MessageLoop::RunHandler() Line 445 C++
libcef.dll!base::RunLoop::Run() Line 57 C++
libcef.dll!base::Thread::Run(base::MessageLoop * message_loop=0x01029e60) Line 200 + 0x19 bytes C++
libcef.dll!base::Thread::ThreadMain() Line 255 C++
libcef.dll!base::`anonymous namespace'::ThreadFunc(void * params=0x05658d98) Line 86 C++
kernel32.dll!774938f4()
[Frames below may be incorrect and/or missing, no symbols loaded for kernel32.dll]
ntdll.dll!77e65de3()
ntdll.dll!77e65dae()
Krzychu
Newbie
 
Posts: 5
Joined: Sat Apr 30, 2016 6:35 pm

Re: Crash + dump - reproducible

Postby amaitland » Sun May 01, 2016 6:00 am

Based on the stack trace I've seen someone else reporting a similar issue, same out of memory issue. OSR and updating the cursor appears to leak. DPI of 2.0 appeared to exacerbated the problem. Will try dig up the stack trace and post when I'm in front of a computer.
Maintainer of the CefSharp project.
amaitland
Virtuoso
 
Posts: 1292
Joined: Wed Jan 14, 2015 2:35 am

Re: Crash + dump - reproducible

Postby Krzychu » Sun May 01, 2016 10:03 am

I observed that this game trying to create bitmap cursor when I try dragging some building on the map (is around 64x64px bitmap).
On Google Chrome this cursor sometimes apears but mostly not - I can only guess than there is exactly the same problem (badly JS) but Chrome somehow handle this issue (cursor is not showing).
Krzychu
Newbie
 
Posts: 5
Joined: Sat Apr 30, 2016 6:35 pm

Re: Crash + dump - reproducible

Postby magreenblatt » Sun May 01, 2016 1:14 pm

Keep in mind that the allocation which fails with out of memory may not be the source of the memory leak -- it's just the first place that fails to allocate. DevTools can be used to debug memory usage.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Crash + dump - reproducible

Postby Krzychu » Sun May 01, 2016 4:55 pm

Hi, I'm just wrapped WinForms CEF control into WPF WindowsFormsHost controll and... problem disapears...

@magreenblatt: look at parameters marked red by me, if I understand it correctly we need to upscale bitmap to quite big... wallpaper :) :) It is not normal situation... :)
Krzychu
Newbie
 
Posts: 5
Joined: Sat Apr 30, 2016 6:35 pm

Re: Crash + dump - reproducible

Postby magreenblatt » Sun May 01, 2016 7:56 pm

Krzychu wrote:Hi, I'm just wrapped WinForms CEF control into WPF WindowsFormsHost controll and... problem disapears...

@magreenblatt: look at parameters marked red by me, if I understand it correctly we need to upscale bitmap to quite big... wallpaper :) :) It is not normal situation... :)

Yes, good point about the image size. It would be interesting to know why/how it fails in Chrome without the out of memory.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Crash + dump - reproducible

Postby Krzychu » Mon May 02, 2016 3:24 pm

magreenblatt wrote:
Krzychu wrote:Hi, I'm just wrapped WinForms CEF control into WPF WindowsFormsHost controll and... problem disapears...

@magreenblatt: look at parameters marked red by me, if I understand it correctly we need to upscale bitmap to quite big... wallpaper :) :) It is not normal situation... :)

Yes, good point about the image size. It would be interesting to know why/how it fails in Chrome without the out of memory.


Are you 100% sure that both browsers uses the same engine source code??
Those parameters looks like max-int values... simple check and ignore bitmap scalling in this case is enought.
Maybe is related to signed/unsigned int somewhere?
It's hard to check for my - but... you can create account in mentioned game I try it :) :) :)

Anyway thanks for support and... I will came back for sure if I found any other issues :)
Krzychu
Newbie
 
Posts: 5
Joined: Sat Apr 30, 2016 6:35 pm

Re: Crash + dump - reproducible

Postby amaitland » Mon May 02, 2016 4:51 pm

Code: Select all
libcef.dll!logging::LogMessage::~LogMessage() Line 737    C++
libcef.dll!base::`anonymous namespace'::OnNoMemory(unsigned int size) Line 42    C++
libcef.dll!`anonymous namespace'::call_new_handler(bool nothrow, unsigned int size) Line 96    C++
libcef.dll!malloc(unsigned int size) Line 175    C++
libcef.dll!`anonymous namespace'::generic_cpp_alloc(unsigned int size, bool nothrow) Line 108    C++
libcef.dll!operator new[](unsigned int size) Line 121    C++
libcef.dll!std::_Allocate<content::GLHelperReadbackSupport::FormatCacheEntry>(unsigned int _Count, content::GLHelperReadbackSupport::FormatCacheEntry * __formal) Line 28    C++
libcef.dll!std::vector<webrtc::SimulcastEncoderAdapter::StreamInfo,std::allocator<webrtc::SimulcastEncoderAdapter::StreamInfo> >::_Reallocate(unsigned int _Count) Line 1588    C++
libcef.dll!std::vector<webrtc::SimulcastEncoderAdapter::StreamInfo,std::allocator<webrtc::SimulcastEncoderAdapter::StreamInfo> >::_Reserve(unsigned int _Count) Line 1617    C++
libcef.dll!std::vector<webrtc::SimulcastEncoderAdapter::StreamInfo,std::allocator<webrtc::SimulcastEncoderAdapter::StreamInfo> >::push_back(webrtc::SimulcastEncoderAdapter::StreamInfo && _Val) Line 882    C++
libcef.dll!skia::ConvolutionFilter1D::AddFilter(int filter_offset, const short * filter_values, int filter_length) Line 320    C++
libcef.dll!skia::`anonymous namespace'::ResizeFilter::ComputeFilters(int src_size, int dest_subset_lo, int dest_subset_size, float scale, skia::ConvolutionFilter1D * output) Line 298    C++
libcef.dll!skia::`anonymous namespace'::ResizeFilter::ResizeFilter(skia::ImageOperations::ResizeMethod method, int src_full_width, int src_full_height, int dest_width, int dest_height, const SkIRect & dest_subset) Line 193    C++
libcef.dll!skia::ImageOperations::Resize(const SkBitmap & source, skia::ImageOperations::ResizeMethod method, int dest_width, int dest_height, const SkIRect & dest_subset, SkBitmap::Allocator * allocator) Line 381    C++
libcef.dll!skia::ImageOperations::Resize(const SkBitmap & source, skia::ImageOperations::ResizeMethod method, int dest_width, int dest_height, SkBitmap::Allocator * allocator) Line 409    C++
libcef.dll!ui::ScaleAndRotateCursorBitmapAndHotpoint(float scale, gfx::Display::Rotation rotation, SkBitmap * bitmap, gfx::Point * hotpoint) Line 95    C++
libcef.dll!content::WebCursor::CreateScaledBitmapAndHotspotFromCustomData(SkBitmap * bitmap, gfx::Point * hotspot) Line 128    C++
libcef.dll!content::WebCursor::GetPlatformCursor() Line 27    C++
libcef.dll!CefRenderWidgetHostViewOSR::UpdateCursor(const content::WebCursor & cursor) Line 771    C++
libcef.dll!ViewHostMsg_SetCursor::Dispatch<content::RenderWidgetHostImpl,content::RenderWidgetHostImpl,void,void (__thiscall content::RenderWidgetHostImpl::*)(content::WebCursor const &)>(const IPC::Message * msg, content::RenderWidgetHostImpl * obj, content::RenderWidgetHostImpl * sender, void * parameter, void(content::RenderWidgetHostImpl::*)(const content::WebCursor &) func) Line 1128    C++
libcef.dll!content::RenderWidgetHostImpl::OnMessageReceived(const IPC::Message & msg) Line 458    C++
libcef.dll!content::RenderProcessHostImpl::OnMessageReceived(const IPC::Message & msg) Line 1721    C++
libcef.dll!IPC::ChannelProxy::Context::OnDispatchMessage(const IPC::Message & message) Line 294    C++


Similar issue with `CefRenderWidgetHostViewOSR::UpdateCursor`. I believe the user had a `DPI` of 2.0
Maintainer of the CefSharp project.
amaitland
Virtuoso
 
Posts: 1292
Joined: Wed Jan 14, 2015 2:35 am

Next

Return to Support Forum

Who is online

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