cef crash after windows wake up

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.

cef crash after windows wake up

Postby yong018wu » Fri Feb 14, 2020 2:36 am

hi experts,
I had a cef crash when wake up from sleep, I'm using cef 76.1.9, windows 10. do you ever met this kind of crash

*** Stack trace for last set context - .thread/.cxr resets it
# ChildEBP RetAddr Args to Child
00 08e9f64c 5d68880a 0abad900 0abad938 ffffffc8 libcef!memmove+0x4e [d:\agent\_work\3\s\src\vctools\crt\vcruntime\src\string\i386\MEMCPY.ASM @ 194]
01 08e9f7d0 5d688311 08e9f7e0 07537068 0abad688 libcef!display::win::ScreenWin::UpdateFromDisplayInfos+0xe2 [Y:\work\CEF3_git\chromium\src\ui\display\win\screen_win.cc @ 675]
02 08e9f808 5d6893e6 074fad60 08e9f82c 5befe139 libcef!display::win::ScreenWin::UpdateAllDisplaysAndNotify+0x5b [Y:\work\CEF3_git\chromium\src\ui\display\win\screen_win.cc @ 756]
03 08e9f814 5befe139 001c054c 0000007e 00000020 libcef!display::win::ScreenWin::OnWndProc+0x36 [Y:\work\CEF3_git\chromium\src\ui\display\win\screen_win.cc @ 734]
04 08e9f82c 5d63b529 074bc870 001c054c 0000007e libcef!base::internal::Invoker<base::internal::BindState<bool (media::(anonymous namespace)::UserInputMonitorWinCore::*)(unsigned int, unsigned int, long, long *) __attribute__((thiscall)),base::internal::UnretainedWrapper<media::(anonymous namespace)::UserInputMonitorWinCore> >,bool (unsigned int, unsigned int, long, long *)>::Run+0x1b [Y:\work\CEF3_git\chromium\src\base\bind_internal.h @ 654]
05 08e9f848 5e08b758 001c054c 0000007e 00000020 libcef!gfx::SingletonHwndObserver::OnWndProc+0x15 [Y:\work\CEF3_git\chromium\src\ui\gfx\win\singleton_hwnd_observer.cc @ 32]
06 08e9f8b0 5e0ccab2 001c054c 0000007e 00000020 libcef!gfx::SingletonHwnd::ProcessWindowMessage+0x80 [Y:\work\CEF3_git\chromium\src\ui\gfx\win\singleton_hwnd.cc @ 34]
07 08e9f8e4 5e0ccb56 0000007e 00000020 08700f00 libcef!gfx::WindowImpl::OnWndProc+0x42 [Y:\work\CEF3_git\chromium\src\ui\gfx\win\window_impl.cc @ 263]
08 08e9f90c 5e0cc758 001c054c 0000007e 00000020 libcef!gfx::WindowImpl::WndProc+0x74 [Y:\work\CEF3_git\chromium\src\ui\gfx\win\window_impl.cc @ 299]
09 08e9f94c 75f0438b 001c054c 0000007e 00000020 libcef!base::win::WrappedWindowProc<&gfx::WindowImpl::WndProc>+0x50 [Y:\work\CEF3_git\chromium\src\base\win\wrapped_window_proc.h @ 78]
0a 08e9f978 75ee4f8c 5e0cc708 001c054c 0000007e user32!_InternalCallWinProc+0x2b
0b 08e9fa5c 75ee4b2a 5e0cc708 00000000 0000007e user32!UserCallWinProcCheckWow+0x3ac
0c 08e9fac0 75ef0876 013fd880 00000000 0000007e user32!DispatchClientMessage+0xea
0d 08e9fb00 77d641cd 08e9fb1c 00000020 08e9fd78 user32!__fnEMPTY+0x36
0e 08e9fb38 76cd2bac 75ee9f8e 08e9fbe8 00000000 ntdll!KiUserCallbackDispatcher+0x4d
0f 08e9fb3c 75ee9f8e 08e9fbe8 00000000 00000000 win32u!NtUserPeekMessage+0xc
10 08e9fb90 75ee9f00 00000000 00000000 00000001 user32!_PeekMessage+0x2e
11 08e9fbcc 5d40b4a7 08e9fbe8 00000000 00000000 user32!PeekMessageW+0x160
12 08e9fc1c 5d40ad91 07499ba4 00000000 00000001 libcef!base::MessagePumpForUI::DoRunLoop+0x47 [Y:\work\CEF3_git\chromium\src\base\message_loop\message_pump_win.cc @ 213]
13 08e9fc3c 5de7075a 07499ba4 08e9fc9c 08e9fc58 libcef!base::MessagePumpWin::Run+0x41 [Y:\work\CEF3_git\chromium\src\base\message_loop\message_pump_win.cc @ 77]
14 08e9fc68 5d420f96 00000001 ffffffff 7fffffff libcef!base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::Run+0x8a [Y:\work\CEF3_git\chromium\src\base\task\sequence_manager\thread_controller_with_message_pump_impl.cc @ 466]
15 08e9fcb8 5d420e0f ffffffff 7fffffff 08e9fcf8 libcef!base::RunLoop::RunWithTimeout+0x176 [Y:\work\CEF3_git\chromium\src\base\run_loop.cc @ 161]
16 08e9fcc8 5de2751c 07499ba8 00000000 01000100 libcef!base::RunLoop::Run+0xf [Y:\work\CEF3_git\chromium\src\base\run_loop.cc @ 130]
17 08e9fcf8 5d43e815 0668bb58 000004b8 000004b8 libcef!CefUIThread::ThreadMain+0x7a [Y:\work\CEF3_git\chromium\src\cef\libcef\common\main_delegate.cc @ 351]
18 08e9fd1c 77356359 0668b1a8 77356340 08e9fd88 libcef!base::`anonymous namespace'::ThreadFunc+0x95 [Y:\work\CEF3_git\chromium\src\base\threading\platform_thread_win.cc @ 100]
19 08e9fd2c 77d57b74 0668b1a8 e9e6776d 00000000 kernel32!BaseThreadInitThunk+0x19
1a 08e9fd88 77d57b44 ffffffff 77d78f2d 00000000 ntdll!__RtlUserThreadStart+0x2f
1b 08e9fd98 00000000 5d43e780 0668b1a8 00000000 ntdll!_RtlUserThreadStart+0x1b
yong018wu
Techie
 
Posts: 17
Joined: Wed Nov 01, 2017 1:17 am

Re: cef crash after windows wake up

Postby magreenblatt » Fri Feb 14, 2020 10:28 am

I have not seen this crash. Try a supported CEF version: https://bitbucket.org/chromiumembedded/ ... -supported
magreenblatt
Site Admin
 
Posts: 12408
Joined: Fri May 29, 2009 6:57 pm

Re: cef crash after windows wake up

Postby yong018wu » Tue Feb 18, 2020 3:56 am

thanks for the reply
I am using software rendering by
command_line->AppendSwitch("disable-gpu");
command_line->AppendSwitch("disable-gpu-compositing");

but I still see a gpu process.
yong018wu
Techie
 
Posts: 17
Joined: Wed Nov 01, 2017 1:17 am

Re: cef crash after windows wake up

Postby magreenblatt » Tue Feb 18, 2020 8:51 am

The GPU process is also used for swiftshader software rendering.
magreenblatt
Site Admin
 
Posts: 12408
Joined: Fri May 29, 2009 6:57 pm

Re: cef crash after windows wake up

Postby Czarek » Tue Feb 18, 2020 10:31 am

Add the --in-process-gpu flag to run the GPU process as a thread in the browser process :-)
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: cef crash after windows wake up

Postby yong018wu » Mon Mar 16, 2020 3:45 am

I have noticed that it is happened when a laptop is plugged to a docker, and connected to a external monitor. when the windows falling to sleep or wake up. the display resolution changed very frequently and many times, which might cause the cef crash, but I was wondering if there's way/workaround to avoid this?
yong018wu
Techie
 
Posts: 17
Joined: Wed Nov 01, 2017 1:17 am

Re: cef crash after windows wake up

Postby xiaolong1976 » Tue Sep 15, 2020 4:35 am

I also got this crash when my application is minimizing.
from the stack, it seems the libcef!memmove have not verified the input parameters.
environment :
OS Name: Microsoft Windows 10 Enterprise
OS Version: 10.0.17134 N/A Build 17134
OS Manufacturer: Microsoft Corporation
OS Configuration: Member Workstation
OS Build Type: Multiprocessor Free
Original Install Date: 7/5/2018, 1:12:39 AM
System Boot Time: 9/11/2020, 4:45:45 AM
System Manufacturer: Dell Inc.
System Model: OptiPlex 7050
System Type: x64-based PC
Processor(s): 1 Processor(s) Installed.
[01]: Intel64 Family 6 Model 158 Stepping 9 GenuineIntel ~3408 Mhz
BIOS Version: Dell Inc. 1.5.2, 6/19/2017


stack:
05 0600ec44 77f1697c KERNELBASE!UnhandledExceptionFilter+0x1a0
06 0600ece8 77edce06 ntdll!LdrpLogFatalUserCallbackException+0x4d
07 0600ecf4 77eef352 ntdll!KiUserCallbackExceptionHandler+0x26
08 0600ed18 77eef324 ntdll!ExecuteHandler2+0x26
09 0600ede0 77edcef6 ntdll!ExecuteHandler+0x24
0a 0600ede0 566574ee ntdll!KiUserExceptionDispatcher+0x26
0b 0600f32c 5371880a libcef!memmove(unsigned char * dst = 0x0600f4c0 "", unsigned char * src = 0x04678698 "", unsigned long count = 0x83de200)+0x4e [d:\agent\_work\3\s\src\vctools\crt\vcruntime\src\string\i386\MEMCPY.ASM @ 194]
0c 0600f4b0 53718311 libcef!display::win::ScreenWin::UpdateFromDisplayInfos(class std::__1::vector<display::win::DisplayInfo,std::__1::allocator<display::win::DisplayInfo> > * display_infos = 0x0600f4c0)+0xe2 [Y:\work\CEF3_git\chromium\src\ui\display\win\screen_win.cc @ 675]
0d 0600f4e8 537193e6 libcef!display::win::ScreenWin::UpdateAllDisplaysAndNotify(void)+0x5b [Y:\work\CEF3_git\chromium\src\ui\display\win\screen_win.cc @ 756]
0e 0600f4f4 51f8e139 libcef!display::win::ScreenWin::OnWndProc(struct HWND__ * hwnd = <Value unavailable error>, unsigned int message = 0x7e, unsigned int wparam = 0x20, long lparam = <Value unavailable error>)+0x36 [Y:\work\CEF3_git\chromium\src\ui\display\win\screen_win.cc @ 734]
0f 0600f50c 536cb529 libcef!base::internal::Invoker<base::internal::BindState<bool (class base::internal::BindStateBase * base = 0x04643de8, unsigned int unbound_args = 0x1036c, unsigned int unbound_args = 0x7e, long unbound_args = 0n32, long * unbound_args = 0x04380780)+0x1b [Y:\work\CEF3_git\chromium\src\base\bind_internal.h @ 654]
10 0600f528 5411b758 libcef!gfx::SingletonHwndObserver::OnWndProc(struct HWND__ * hwnd = 0x0001036c, unsigned int message = 0x7e, unsigned int wparam = 0x20, long lparam = 0n70780800)+0x15 [Y:\work\CEF3_git\chromium\src\ui\gfx\win\singleton_hwnd_observer.cc @ 32]
11 0600f590 5415cab2 libcef!gfx::SingletonHwnd::ProcessWindowMessage(struct HWND__ * window = 0x0001036c, unsigned int message = 0x7e, unsigned int wparam = 0x20, long lparam = 0n70780800, long * result = <Value unavailable error>, unsigned long msg_map_id = <Value unavailable error>)+0x80 [Y:\work\CEF3_git\chromium\src\ui\gfx\win\singleton_hwnd.cc @ 34]
12 0600f5c4 5415cb56 libcef!gfx::WindowImpl::OnWndProc(unsigned int message = 0x7e, unsigned int w_param = 0x20, long l_param = 0n70780800)+0x42 [Y:\work\CEF3_git\chromium\src\ui\gfx\win\window_impl.cc @ 263]
13 0600f5ec 5415c758 libcef!gfx::WindowImpl::WndProc(struct HWND__ * hwnd = 0x0001036c, unsigned int message = 0x7e, unsigned int w_param = 0x20, long l_param = 0n70780800)+0x74 [Y:\work\CEF3_git\chromium\src\ui\gfx\win\window_impl.cc @ 299]
14 0600f62c 74c1b86b libcef!base::win::WrappedWindowProc<&gfx::WindowImpl::WndProc>(struct HWND__ * hwnd = <Value unavailable error>, unsigned int message = <Value unavailable error>, unsigned int wparam = <Value unavailable error>, long lparam = <Value unavailable error>)+0x50 [Y:\work\CEF3_git\chromium\src\base\win\wrapped_window_proc.h @ 78]
15 0600f658 74c17bba user32!AddClipboardFormatListener+0x49b
16 0600f740 74c1775a user32!DispatchMessageW+0x97a
17 0600f7a4 74c0ee90 user32!DispatchMessageW+0x51a
18 0600f7e8 77edcead user32!UnregisterPowerSettingNotification+0x60
19 0600f820 74c188db ntdll!KiUserCallbackDispatcher+0x4d
1a 0600f870 74c18874 user32!PeekMessageW+0x19b
1b 0600f8a4 5349b4a7 user32!PeekMessageW+0x134
1c 0600f8f4 5349ad91 libcef!base::MessagePumpForUI::DoRunLoop(void)+0x47 [Y:\work\CEF3_git\chromium\src\base\message_loop\message_pump_win.cc @ 213]
1d 0600f914 53f0075a libcef!base::MessagePumpWin::Run(class base::MessagePump::Delegate * delegate = 0x045d977c)+0x41 [Y:\work\CEF3_git\chromium\src\base\message_loop\message_pump_win.cc @ 77]
1e 0600f940 534b0f96 libcef!base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::Run(bool application_tasks_allowed = <Value unavailable error>, class base::TimeDelta timeout = 9223372036854775807)+0x8a [Y:\work\CEF3_git\chromium\src\base\task\sequence_manager\thread_controller_with_message_pump_impl.cc @ 466]
1f 0600f990 534b0e0f libcef!base::RunLoop::RunWithTimeout(class base::TimeDelta timeout = 9223372036854775807)+0x176 [Y:\work\CEF3_git\chromium\src\base\run_loop.cc @ 161]
20 0600f9a0 53eb751c libcef!base::RunLoop::Run(void)+0xf [Y:\work\CEF3_git\chromium\src\base\run_loop.cc @ 130]
21 0600f9d0 534ce815 libcef!CefUIThread::ThreadMain(void)+0x7a [Y:\work\CEF3_git\chromium\src\cef\libcef\common\main_delegate.cc @ 351]
22 0600f9f4 774f8494 libcef!base::`anonymous namespace'::ThreadFunc(void * params = 0x045d4530)+0x95 [Y:\work\CEF3_git\chromium\src\base\threading\platform_thread_win.cc @ 100]
23 0600fa08 77ed4328 kernel32!BaseThreadInitThunk+0x24
24 0600fa50 77ed42f8 ntdll!__RtlUserThreadStart+0x2f
25 0600fa60 00000000 ntdll!_RtlUserThreadStart+0x1b

the heap memory is valid, but the string is zero.

0:009> .x
use x /s 0x10 to specify size, use /f to show function, use /d to show data
prv param 0600f4c0 4 count = 0x83de200
prv param 0600f4bc 4 src = 0x04678698 ""
prv param 0600f4b8 4 dst = 0x0600f4c0 ""
0:009> !address 0x04678698

Usage: Heap
Base Address: 045d0000
End Address: 046cf000
Region Size: 000ff000 (1020.000 kB)
State: 00001000 MEM_COMMIT
Protect: 00000004 PAGE_READWRITE
Type: 00020000 MEM_PRIVATE
Allocation Base: 045d0000
Allocation Protect: 00000004 PAGE_READWRITE
More info: heap owning the address: !heap 0x3800000
More info: heap segment
More info: heap entry containing the address: !heap -x 0x4678698


Content source: 1 (target), length: 56968
0:009> !address 0x0600f4c0

Usage: Stack
Base Address: 06007000
End Address: 06010000
Region Size: 00009000 ( 36.000 kB)
State: 00001000 MEM_COMMIT
Protect: 00000004 PAGE_READWRITE
Type: 00020000 MEM_PRIVATE
Allocation Base: 05f10000
Allocation Protect: 00000004 PAGE_READWRITE
More info: ~9k


Content source: 1 (target), length: b40
xiaolong1976
Newbie
 
Posts: 4
Joined: Tue Sep 15, 2020 4:05 am

Re: cef crash after windows wake up

Postby magreenblatt » Tue Sep 15, 2020 9:17 am

@ xiaolong1976: What CEF version are you using? Does the problem reproduce with the CEF sample apps?
magreenblatt
Site Admin
 
Posts: 12408
Joined: Fri May 29, 2009 6:57 pm

Re: cef crash after windows wake up

Postby ndesktop » Tue Sep 15, 2020 11:43 am

Looks like Electron is suffering something similar as well.
ndesktop
Master
 
Posts: 756
Joined: Thu Dec 03, 2015 10:10 am

Re: cef crash after windows wake up

Postby magreenblatt » Tue Sep 15, 2020 11:50 am

ndesktop wrote:Looks like Electron is suffering something similar as well.

Interesting. The fix associated with that Electron issue is https://github.com/electron/electron/pull/21813
magreenblatt
Site Admin
 
Posts: 12408
Joined: Fri May 29, 2009 6:57 pm

Next

Return to Support Forum

Who is online

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