Hello again, everyone.
I have a problem when canceling a print job. The application closes abruptly.
I am using version 109 of CEF. I don't know if the problem has been fixed in newer versions, but I can't update at the moment for commercial reasons. Anyway, I tested it on versions 111 and 116. The same problem occurred in these versions.
To simulate this, I used the MiniBrowser demo.
- Open any page (I used google.com).
- Click on the Print option in the drop-down menu opened by the button next to the address bar;
- For the destination, I selected 'Microsoft Print to PDF';
- Click on Print (a dialog box will open to select the location);
- In this dialog box, click on Cancel.
At this point, an internal error occurs and the application crashes.
If the operation is not canceled or if it is canceled beforehand, the error does not occur.
In case it's helpful, the last console log message is this:
[0121/113313.017:WARNING:alloy_constrained_window_views_client.cc(63)] No likely focused browser
If this has been fixed in newer versions, could anyone help me apply a fix locally that doesn't require updating CEF and the framework?
If it hasn't been fixed, could anyone help me find a workaround?
Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.
Canceling printing crashes the application (using Microsoft Print to PDF)
- salvadordf
- Posts: 4564
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: Canceling printing crashes the application (using Microsoft Print to PDF)
Hi,
I can't reproduce this issue with the latest CEF4Delphi version which uses CEF 132.
There are some issues related to printing in the CEF project like this one :
https://github.com/chromiumembedded/cef/issues/3772
Search "print" in the CEF repository at GitHub :
https://github.com/chromiumembedded/cef/issues
Perhaps you can find a workaround in those search results to fix this crash.
I can't reproduce this issue with the latest CEF4Delphi version which uses CEF 132.
There are some issues related to printing in the CEF project like this one :
https://github.com/chromiumembedded/cef/issues/3772
Search "print" in the CEF repository at GitHub :
https://github.com/chromiumembedded/cef/issues
Perhaps you can find a workaround in those search results to fix this crash.
Re: Canceling printing crashes the application (using Microsoft Print to PDF)
Thank you, @salvadordf, for your response and time. I will consider your suggestions.