CefSharp.Cef.Shutdown is crashing PowerPoint 2013
Posted: Mon Jan 25, 2021 3:11 pm
We are using CefSharp in our add-in for Microsoft PowerPoint. When the PowerPoint is shutdown, it will call the DTExtensibility2.OnDisconnection() method. In our implementation of this method we call the Cef.Shutdown(). This call happens on the main UI thread. It may crash the PowerPoint process.
We discovered this issue on this system:
Windows 7 Service Pack 1 32-bit
MS PowerPoint 2013 32-bit (15.0.5301.1000)
CefSharp v86.0.241
Gist with details and a full MHT analysis from DebugDiag is here: https://gist.github.com/jozefizso/01b85 ... 0753317432
This is the .NET callstack:
Full callstack on Thread 0 (main UI thread):
DebugDiag reports the thread 23 has an unhandled exception:
Can we avoid this type of exception in libcef.dll?
Is this a bug which needs to be reported to Chromium Embedded Framework project?
Thanks a lot for your advise and insights.
We discovered this issue on this system:
Windows 7 Service Pack 1 32-bit
MS PowerPoint 2013 32-bit (15.0.5301.1000)
CefSharp v86.0.241
Gist with details and a full MHT analysis from DebugDiag is here: https://gist.github.com/jozefizso/01b85 ... 0753317432
This is the .NET callstack:
- Code: Select all
CefSharp.Cef.Shutdown()+1a8
[[InlinedCallFrame] (.CefShutdown)] .CefShutdown()
Slido.PowerPoint.Addin.ConnectClass_OnDisconnection(NetOffice.Tools.ext_DisconnectMode, System.Array ByRef)+23
NetOffice.PowerPointApi.Tools.COMAddin.RaiseOnDisconnection(NetOffice.Tools.ext_DisconnectMode, System.Array ByRef)+2c
NetOffice.PowerPointApi.Tools.COMAddin.NetOffice.Tools.Native.IDTExtensibility2.OnDisconnection(NetOffice.Tools.ext_DisconnectMode, System.Array ByRef)+27
DomainBoundILStubClass.IL_STUB_COMtoCLR(Int32, IntPtr)+6e
[[ComMethodFrame]]
Full callstack on Thread 0 (main UI thread):
- Code: Select all
MSO!Ordinal8254+25bd
kernel32!WaitForSingleObjectExImplementation+75
kernel32!WaitForSingleObject+12
libcef!cef_string_utf16_to_upper+8aa38
libcef!IsSandboxedProcess+397fdb
libcef!IsSandboxedProcess+3974e3
libcef!IsSandboxedProcess+3973c0
libcef!cef_string_multimap_size+1d00e71
libcef!cef_string_multimap_size+1d00db2
CefSharp.Cef.Shutdown()+1a8
Slido.PowerPoint.Addin.ConnectClass_OnDisconnection(NetOffice.Tools.ext_DisconnectMode, System.Array ByRef)+23
...
DebugDiag reports the thread 23 has an unhandled exception:
- Code: Select all
Entry point: libcef!cef_string_utf16_to_upper+8ab50
KERNELBASE!RaiseException+58
MSO!MsoCrashMainThread+197
PPCORE!Osf::OSFCreateOsfOartGallery+243ae3
MSO!Ordinal8254+2763
kernel32!UnhandledExceptionFilter+127
ntdll!__RtlUserThreadStart+62
ntdll!_EH4_CallFilterFunc+12
ntdll!_except_handler4+8e
ntdll!ExecuteHandler2+26
ntdll!ExecuteHandler+24
ntdll!RtlDispatchException+127
ntdll!KiUserExceptionDispatcher+f
libcef!cef_string_multimap_size+1cfa053
libcef!VR_GetStringForHmdError+2d89b4
user32!InternalCallWinProc+23
user32!UserCallWinProcCheckWow+e0
user32!DispatchClientMessage+cf
user32!__fnNCDESTROY+26
ntdll!KiUserCallbackDispatcher+2e
user32!NtUserPeekMessage+c
user32!_PeekMessage+73
user32!PeekMessageW+fb
libcef!cef_string_utf16_to_upper+85401
libcef!cef_string_utf16_to_upper+85214
libcef!cef_string_utf16_to_upper+849a3
libcef!cef_time_delta+36a11
libcef!cef_string_utf16_to_upper+4a0f6
libcef!IsSandboxedProcess+3975ce
libcef!IsSandboxedProcess+398276
libcef!cef_string_utf16_to_upper+8abfd
kernel32!BaseThreadInitThunk+e
ntdll!__RtlUserThreadStart+70
ntdll!_RtlUserThreadStart+1b
Can we avoid this type of exception in libcef.dll?
Is this a bug which needs to be reported to Chromium Embedded Framework project?
Thanks a lot for your advise and insights.