chromiumembedded / cef

Chromium Embedded Framework (CEF). A simple framework for embedding Chromium-based browsers in other applications.
https://bitbucket.org/chromiumembedded/cef/
Other
3.36k stars 467 forks source link

Print functionality throws an error on cancel (and occasionally crashes) in several latest versions. #3468

Closed piscura closed 1 year ago

piscura commented 1 year ago

Describe the bug Print functionality throws an error on cancel (and occasionally crashes) in several latest versions.

I've been using CefSharp, but I could also reproduce this issue in the spotify hosted CEF sample here on latest: https://cef-builds.spotifycdn.com/cef_binary_111.2.6%2Bg491d238%2Bchromium-111.0.5563.65_windows64_client.tar.bz2 I also arbitrarily tested in the 10.0.30 client sample and saw the same behavior.

I upgraded my app from CefSharp v107.1.40 (CEF 107.1.4+geb36a79+chromium-107.0.5304.68) to CefSharp v109.1.110 (CEF 109.1.11+g6d4fdb2+chromium-109.0.5414.87) and found that the print method will either show an error message OR crash the application after selecting a print option to a local file and hitting cancel.

To Reproduce Steps to reproduce the behavior:

  1. Load any webpage with a cef browser.
  2. Right click/print.
  3. Select a print option that would save the file locally (save as pdf).
  4. Cancel out of the name/directory selection dialog.
  5. Observe either the error message or a crash.

Expected behavior I also tested with this build of the sample app in the version of CEF I upgraded from: [cef_binary_107.1.4+geb36a79+chromium-107.0.5304.68_windows64_beta_client.tar.bz2](https://cef-builds.spotifycdn.com/cef_binary_107.1.4%2Bgeb36a79%2Bchromium-107.0.5304.68_windows64_beta_client.tar.bz2 And when I tested with this build, I get no error message or crash.

Screenshots Screenshots using CefSharp minimal example as I had already taken them with that. print1 print2 print3

Versions (please complete the following information):

Additional context Does the problem reproduce with the cefclient or cefsimple sample application at the same version? Yes. See above.

Does the problem reproduce with Google Chrome at the same version? I could reproduce this in Chrome (infrequently) when I tried this a few weeks ago, but trying again now I cannot. I didn't take note of what Chrome version that was at the time, but presently I'm rocking Chrome 111.0.5563.65.

magreenblatt commented 1 year ago

I'm not able to reproduce this issue testing with cefclient at M113. I also don't get the "Print Failed" dialog that you show above.

If you are able to reproduce this issue with cefclient at M113 or later, please provide a symbolized call stack for the crash and we can re-open this issue.