PDFs fail to load with Allowviews

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.

PDFs fail to load with Allowviews

Postby user394200 » Tue Aug 11, 2026 1:28 am

We recently upgraded our application (macOS + Windows) from CEF 142 to CEF 149 and noticed that PDF files no longer render or load.
When testing with cefclient.exe using default settings (Chrome runtime), PDFs load as expected. However, the issue reproduces consistently in our application, which uses the Alloy style / views runtime.

Are there any known regressions or changes in CEF 143-149 regarding PDF extension initialization or PDFium integration under Alloy views?
user394200
Newbie
 
Posts: 1
Joined: Tue Aug 11, 2026 1:20 am

Re: PDFs fail to load with Allowviews

Postby magreenblatt » Wed Aug 12, 2026 12:41 pm

Does the issue reproduce with "cefclient --use-alloy-style --use-views" at your CEF version?
magreenblatt
Site Admin
 
Posts: 13241
Joined: Fri May 29, 2009 6:57 pm

Re: PDFs fail to load with Allowviews

Postby mic » Wed Aug 12, 2026 5:18 pm

We also have this issue with CEF 149, but in macOS, and without using Views. We cannot get a PDF to load using any technique. The extension always displays a sad face graphic. The navigation events indicate that PDFs are completely and successfully loaded. Whatever happens must happen after that, during rendering.

We cannot reproduce the issue using the CEF demo clients. However, even if it is something in our app, it only started occurring when we upgraded from CEF 142 to CEF 149. Any ideas?
mic
Expert
 
Posts: 102
Joined: Fri Jan 29, 2016 12:59 pm

Re: PDFs fail to load with Allowviews

Postby magreenblatt » Wed Aug 12, 2026 7:57 pm

Sad face would suggest a sub-process is crashing. You can enable crash reporting or run with a debugger attached. See “Automatically attach to child processes” at https://www.chromium.org/developers/how ... n-windows/
magreenblatt
Site Admin
 
Posts: 13241
Joined: Fri May 29, 2009 6:57 pm

Re: PDFs fail to load with Allowviews

Postby mic » Wed Aug 12, 2026 10:24 pm

Between CEF 142 and 149, there must have been changes that affect the operation of PDFium or plugins generally. Nothing in the associated commits jumps out, but there must be something. Any ideas?
mic
Expert
 
Posts: 102
Joined: Fri Jan 29, 2016 12:59 pm

Re: PDFs fail to load with Allowviews

Postby magreenblatt » Wed Aug 12, 2026 10:46 pm

You’re asking about 7 months of Chromium development, which is 40k+ commits. You will need to do some leg work with a debugger.
magreenblatt
Site Admin
 
Posts: 13241
Joined: Fri May 29, 2009 6:57 pm

Re: PDFs fail to load with Allowviews

Postby mic » Thu Aug 13, 2026 9:25 am

Presumably, the issue description would be instrumental in narrowing the list from 40k+ to some manageable number, unless you are saying that any of those commits could be the cause. If you have no ideas on likely commits, perhaps you could recommend a debugging strategy, since all we know is that the failure occurs at some point after the PDF has been completely received, but before it is completely rendered. That is potentially quite a lengthy debugging session, and one in which none of our own code is involved.

Thanks for any help you can provide.
mic
Expert
 
Posts: 102
Joined: Fri Jan 29, 2016 12:59 pm

Re: PDFs fail to load with Allowviews

Postby mic » Wed Aug 19, 2026 10:10 am

As it turns out, for PDFs CEF passes a CefBrowser object to navigation events like OnLoadStart,
OnLoadEnd, etc. which returns null from CefBrowser::GetMainFrame. Trying to dereference this unexpectedly null pointer crashes the associated renderer process.

Presumably this occurs for PDFs because the main frame is now hosted in a different renderer process, and the PDF now resides in a cross-origin sub-frame. This must have happened at some point between CEF 142 and CEF 149.
mic
Expert
 
Posts: 102
Joined: Fri Jan 29, 2016 12:59 pm

Re: PDFs fail to load with Allowviews

Postby ndesktop » Thu Aug 20, 2026 4:43 am

PDF is hosted in a guest view. If a view is in "excluded" (see libcef/renderer/render_manager.cc's MaybeCreateBrowser) probably browser_info_ does not get a browser set AFAIK.
ndesktop
Virtuoso
 
Posts: 1012
Joined: Thu Dec 03, 2015 10:10 am


Return to Support Forum

Who is online

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