Regarding the original issue, as I expected this was not due to external messasge loop. After some tinkering I see why my OnPaint stopped being triggered. I failed to notice the obvious - renderer process simply crashes when I try to load anything. Either something changed since 2743 or I build something in wrong way (which is actually possible).
When I attach to the renderer process the following callstack is generated at the moment of the crash:
- Code: Select all
libcef.dll!base::debug::BreakDebugger() Line 21 C++
libcef.dll!logging::LogMessage::~LogMessage() Line 762 C++
> libcef.dll!content::InitializeDWriteFontProxy() Line 89 C++
libcef.dll!content::RendererMainPlatformDelegate::PlatformInitialize() Line 60 C++
libcef.dll!content::RendererMain(const content::MainFunctionParams & parameters) Line 165 C++
libcef.dll!content::RunNamedProcessTypeMain(const std::basic_string<char,std::char_traits<char>,std::allocator<char> > & process_type, const content::MainFunctionParams & main_function_params, content::ContentMainDelegate * delegate) Line 491 C++
libcef.dll!content::ContentMainRunnerImpl::Run() Line 836 C++
libcef.dll!content::ContentMain(const content::ContentMainParams & params) Line 20 C++
libcef.dll!CefExecuteProcess(const CefMainArgs & args, scoped_refptr<CefApp> application, void * windows_sandbox_info) Line 171 C++
libcef.dll!cef_execute_process(const _cef_main_args_t * args, _cef_app_t * application, void * windows_sandbox_info) Line 188 C++
editor.exe!CefExecuteProcess(const CefMainArgs & args, scoped_refptr<CefApp> application, void * windows_sandbox_info) Line 190 C++
The actual line that is problematic is this DCHECK_EQ:
- Code: Select all
// When IDWriteFontFallback is not available (prior to Win8.1) Skia will
// still attempt to use DirectWrite to determine fallback fonts (in
// SkFontMgr_DirectWrite::onMatchFamilyStyleCharacter), which will likely
// result in trying to load the system font collection. To avoid that and
// instead fall back on WebKit's fallback logic, we don't use Skia's font
// fallback if IDWriteFontFallback is not available.
// This flag can be removed when Win8.0 and earlier are no longer supported.
bool fallback_available = font_fallback.Get() != nullptr;
DCHECK_EQ(fallback_available,
base::win::GetVersion() > base::win::VERSION_WIN8);
blink::WebFontRendering::setUseSkiaFontFallback(fallback_available);
Now I am confused and have two problems with it. For once, this probably happens because I build without official_build switch so all those DCHECK's are fatal in builds instead of just log the error (am I right here?). On the other hand I am not sure if it crashed in cefclient (maybe I wasn't checking debug, still need to investigate a bit).
The second thing that confuses me is why this DCHECK fails on my machine since I am running on Windows 10. The base::win::GetVersion() returns VERSION_WIN8 (?).
Anyway, is there an easy way to supress crash from such a dcheck in debug?
I see something promising in ~LogMessage() destructor:
- Code: Select all
// Give any log message handler first dibs on the message.
if (log_message_handler &&
log_message_handler(severity_, file_, line_,
message_start_, str_newline)) {
// The handler took care of it, no further processing.
return;
}
Can this be somehow exploited? Should I care that this dcheck fails? Maybe I have did something terribly wrong while building and this shouldn't happen at all? Any help would be appreciated.