[SOLVED] Check failed: fallback_available

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.

[SOLVED] Check failed: fallback_available

Postby digory » Thu Dec 01, 2016 5:22 am

Today I've updated to the latest binary distribution 3.2883.1536.ga8ecb19 Win32. The browser no longer works :(

Code: Select all
[1201/111525:FATAL:dwrite_font_proxy_init_win.cc(91)] Check failed: fallback_available == base::win::GetVersion() > base::win::VERSION_WIN8 (1 vs. 0)


My machine runs Windows 10. The former build 3.2840.1493.g4e029f4 worked perfectly. Interestingly, the new build's cefclient and cefsimple demo applications work fine. Any ideas why my own application causes the above assertion?
Last edited by digory on Mon Dec 05, 2016 8:10 am, edited 1 time in total.
digory
Expert
 
Posts: 118
Joined: Wed Oct 26, 2016 3:13 am

Re: Check failed: fallback_available

Postby digory » Thu Dec 01, 2016 9:56 am

Still no clue why the latest build won't run. The offending assertion in dwrite_font_proxy_init_win.cc is:

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);


(Sources from https://chromium.googlesource.com/chromium/src/+/master/content/child/dwrite_font_proxy/dwrite_font_proxy_init_win.cc)

So, assuming base::win::GetVersion determines the version correctly (Window 10), the version will be > VERSION_WIN8, and fallback_available is expected to be true. The check fails, because it isn't. IDWriteFontFallback is a Windows API function https://msdn.microsoft.com/en-us/library/windows/desktop/dn280474(v=vs.85).aspx and should be available since 8.1. The reason why fallback_available might still be false is if font_fallback.Get() is a nullptr. It's initialized in dwrite_font_proxy_init_win.cc like this:

Code: Select all
 if (SUCCEEDED(factory.As(&factory2)) && factory2.Get()) {
    mswr::MakeAndInitialize<FontFallback>(
        &font_fallback, g_font_collection.Get(), sender);
  }


So why might this fail in my case?
digory
Expert
 
Posts: 118
Joined: Wed Oct 26, 2016 3:13 am

Re: Check failed: fallback_available

Postby Czarek » Thu Dec 01, 2016 10:59 am

Are you using in your app any unusual Windows API such as DirectWrite or COM components?
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: Check failed: fallback_available

Postby digory » Thu Dec 01, 2016 11:06 am

We're certainly not using DirectWrite. There is some legacy COM functionality compiled into it, but I don't think it is actually used.
digory
Expert
 
Posts: 118
Joined: Wed Oct 26, 2016 3:13 am

Re: Check failed: fallback_available

Postby Czarek » Thu Dec 01, 2016 11:13 am

Comment it out and see if that helps.
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: Check failed: fallback_available

Postby digory » Thu Dec 01, 2016 11:17 am

The source code of our application is huge, and I'm not familiar with this part, but I'll try.
digory
Expert
 
Posts: 118
Joined: Wed Oct 26, 2016 3:13 am

Re: Check failed: fallback_available

Postby trybaczek » Sun Dec 04, 2016 5:34 pm

Hi,
I had the same problem.
Solved it by properly targetting executable for windows 8.1/10 version.
Took manifest file from here: https://msdn.microsoft.com/pl-pl/library/windows/desktop/dn481241(v=vs.85).aspx
and added it to the project.
Hope it helps,
Tristan
trybaczek
Newbie
 
Posts: 1
Joined: Sun Dec 04, 2016 4:01 pm

Re: Check failed: fallback_available

Postby verybigbadboy » Mon Dec 05, 2016 4:08 am

Hey digory,

I have absolutely the same issue as you, did you find any possible reason of this? :)
verybigbadboy
Newbie
 
Posts: 2
Joined: Mon Dec 05, 2016 3:47 am

Re: Check failed: fallback_available

Postby digory » Mon Dec 05, 2016 4:18 am

Czarek wrote:Comment it out and see if that helps.


I've commented out all I could find that deals with COM/OLE, to no avail. :(

verybigbadboy wrote:Hey digory,
I have absolutely the same issue as you, did you find any possible reason of this? :)


Not yet, I'm still trying to figure it out.

trybaczek wrote:Hi,
I had the same problem.
Solved it by properly targetting executable for windows 8.1/10 version.
Took manifest file from here: https://msdn.microsoft.com/pl-pl/library/windows/desktop/dn481241(v=vs.85).aspx
and added it to the project.


Ah, thanks, I'll check it out.
digory
Expert
 
Posts: 118
Joined: Wed Oct 26, 2016 3:13 am

Re: Check failed: fallback_available

Postby verybigbadboy » Mon Dec 05, 2016 7:53 am

Hi Tristan
thats work for me too. thank you.
verybigbadboy
Newbie
 
Posts: 2
Joined: Mon Dec 05, 2016 3:47 am

Next

Return to Support Forum

Who is online

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