Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WPF application crashes when closing a PDF containing XFA form #4701

Closed
1 task done
abid76 opened this issue Feb 2, 2024 · 5 comments
Closed
1 task done

WPF application crashes when closing a PDF containing XFA form #4701

abid76 opened this issue Feb 2, 2024 · 5 comments
Labels
upstream These issues require fixing in the Chromium Embedded Framework(CEF) or Chromium. wpf

Comments

@abid76
Copy link

abid76 commented Feb 2, 2024

Is there an existing issue for this?

  • I have searched both open/closed issues, no issue already exists.

CefSharp Version

120.2.70

Operating System

Windows 11

Architecture

x64

.Net Version

.Net 4.8

Implementation

WPF

Reproduction Steps

The application CefSharp.Wpf.Example crashes when closing a tab which contains some kind of XFA form. Until now this only occurs when the XFA form triggers a JsDialogHandler (at least I had no issues with forms without a JS-Dialog). Maybe it's also related to PDF version 1.7 (with version 1.6 I had no issues).

I have exactly the same problem in my own application when closing a tab.

Steps to reproduce:

  1. Start CefSharp.Wpf.Example
  2. Open the attached file. Grusi Weiterbewilligungsantrag.pdf (You have to open it from local filesystem, otherwise the file isn't displayed at all, just a file dialog is opened)
  3. Close the tab -> the application crashes. The VS output says: Das Programm "[36100] CefSharp.Wpf.Example.exe" wurde mit Code 3221225477 (0xc0000005) 'Access violation' beendet.

Expected behavior

The tab can be closed without any issues.

Actual behavior

Application crashes.
Das Programm "[36100] CefSharp.Wpf.Example.exe" wurde mit Code 3221225477 (0xc0000005) 'Access violation' beendet.

Log file:
debug.log

Regression?

No response

Known Workarounds

No response

Does this problem also occur in the CEF Sample Application

Yes using WPF/OffScreen command line args

Other information

When using the CEF Sample Application(cefclient) application it already crashes when opening the PDF file.

@amaitland amaitland added the upstream These issues require fixing in the Chromium Embedded Framework(CEF) or Chromium. label Feb 3, 2024
@amaitland
Copy link
Member

Does this problem also occur in the CEF Sample Application
Yes using WPF/OffScreen command line args

Other information
When using the CEF Sample Application(cefclient) application it already crashes when opening the PDF file.

As the problem is within CEF, not directly in CefSharp. You'll need to raise an issue at https://github.com/chromiumembedded/cef/issues (Post a link back here for reference). Closing as upstream

@amaitland amaitland closed this as not planned Won't fix, can't repro, duplicate, stale Feb 3, 2024
@amaitland amaitland added the wpf label Feb 3, 2024
@amaitland
Copy link
Member

Upstream issue chromiumembedded/cef#3644

I'd suggest you add any additional relevant information there.

@abid76
Copy link
Author

abid76 commented Mar 1, 2024

In reference to your answer #4701 (comment)

The issue of crashing cef when opening the PDF form is fixed now.

But my problem still persists: the CefSharp.Wpf.Example application crashes when it's closed or when the tab containing the PDF form is closed. It's still the same like in the issue description above.

This problem does not occur when opening and closing the PDF form in the CefSharp.MinimalExample.Wpf application. The application closes normally without any Access violation message.

As this only seems to occur in a WPF tabbed application I am not sure how to report it in cef issue tracker.

Can you give me any advice? Do you need some additional information?

Output CefSharp.Wpf.Example (starting directly before the PDF form is opened). (debug.log)

"CefSharp.Wpf.Example.exe" (CLR v4.0.30319: CefSharp.Wpf.Example.exe): "C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel.resources\v4.0_4.0.0.0_de_b77a5c561934e089\System.ServiceModel.resources.dll" geladen. Das Modul wurde ohne Symbole erstellt.
Der Thread 0x402c hat mit Code 0 (0x0) geendet.
Der Thread 0x1554 hat mit Code 0 (0x0) geendet.
Der Thread 0x3c58 hat mit Code 0 (0x0) geendet.
Der Thread 0x2fc0 hat mit Code 0 (0x0) geendet.
"CefSharp.Wpf.Example.exe" (CLR v4.0.30319: CefSharp.Wpf.Example.exe): "C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Accessibility\v4.0_4.0.0.0__b03f5f7f11d50a3a\Accessibility.dll" geladen. 
Der Thread 0x8620 hat mit Code 0 (0x0) geendet.
Der Thread 0x46fc hat mit Code 0 (0x0) geendet.
Das Programm "[15912] CefSharp.Wpf.Example.exe" wurde mit Code 3221225477 (0xc0000005) 'Access violation' beendet.

Output CefSharp.MinimalExample.Wpf (starting directly before the PDF form is opened). (debug.log)

"CefSharp.MinimalExample.Wpf.exe" (CLR v4.0.30319: CefSharp.MinimalExample.Wpf.exe): "C:\Windows\system32\WinMetadata\Windows.UI.winmd" geladen. Das Modul wurde ohne Symbole erstellt.
"CefSharp.MinimalExample.Wpf.exe" (CLR v4.0.30319: CefSharp.MinimalExample.Wpf.exe): "C:\Windows\system32\WinMetadata\Windows.Foundation.winmd" geladen. Das Modul wurde ohne Symbole erstellt.
"CefSharp.MinimalExample.Wpf.exe" (CLR v4.0.30319: CefSharp.MinimalExample.Wpf.exe): "C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.InteropServices.WindowsRuntime\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Runtime.InteropServices.WindowsRuntime.dll" geladen. Das Modul wurde ohne Symbole erstellt.
"CefSharp.MinimalExample.Wpf.exe" (CLR v4.0.30319: CefSharp.MinimalExample.Wpf.exe): "C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.WindowsRuntime\v4.0_4.0.0.0__b77a5c561934e089\System.Runtime.WindowsRuntime.dll" geladen. Das Laden von Symbolen wurde übersprungen. Das Modul ist optimiert, und die Debugoption "Nur eigenen Code" ist aktiviert.
[0301/104045.677:ERROR:browser_info_manager.cc(629)] Timeout of new browser info response for frame 30064771076 [7,4]
[0301/104045.840:INFO:CONSOLE(0)] "Unchecked runtime.lastError: Not implemented", source: chrome-extension://mhjfbmdgcfjbbpaeojofohoefgiehjai/index.html (0)
Der Thread 0x18e4 hat mit Code 0 (0x0) geendet.
"CefSharp.MinimalExample.Wpf.exe" (CLR v4.0.30319: CefSharp.MinimalExample.Wpf.exe): "C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Accessibility\v4.0_4.0.0.0__b03f5f7f11d50a3a\Accessibility.dll" geladen. 
Der Thread 0x6974 hat mit Code 0 (0x0) geendet.
Der Thread 0x4c0c hat mit Code 0 (0x0) geendet.
Der Thread 0x8b44 hat mit Code 0 (0x0) geendet.
Das Programm "[10656] CefSharp.MinimalExample.Wpf.exe" wurde mit Code 0 (0x0) beendet.

@abid76
Copy link
Author

abid76 commented Mar 9, 2024

After upgrading to recent version 121.3.130 the problem disappeared :-)
Now, in CefSharp.Wpf.Example a tab containing the file https://github.com/cefsharp/CefSharp/files/14137524/Grusi.Weiterbewilligungsantrag.pdf can be closed without crashing the application.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
upstream These issues require fixing in the Chromium Embedded Framework(CEF) or Chromium. wpf
Projects
None yet
Development

No branches or pull requests

2 participants