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

Using Win2D breaks publishing unpackaged app as single file #6400

Closed
1 of 2 tasks
DHancock opened this issue Nov 29, 2021 · 5 comments
Closed
1 of 2 tasks

Using Win2D breaks publishing unpackaged app as single file #6400

DHancock opened this issue Nov 29, 2021 · 5 comments
Labels
Crash whenever user reports a crash or app freeze no-issue-activity product-winui3 WinUI 3 issues team-Rendering Issue for the Rendering team

Comments

@DHancock
Copy link

Describe the bug

The application contains a user control that draws itself using composition drawing which requires the Win2D nuget package. When either the debug or release target is published with PublishSingleFile set to true, the previously working application stops with a fail fast exception after opening the main window but before any controls are loaded.

Steps to reproduce the bug

  1. Open the solution attached below.
  2. Publish the x64 profile using the debug build configuration.
  3. Confirm the exe runs ok.
  4. Edit the x64 publishing profile setting PublishSingleFile to true.
  5. Publish the app again.
  6. Run the exe.

SingleFileIssue.zip

Expected behavior

It should work.

Screenshots

No response

NuGet package version

WinUI 3 - Windows App SDK 1.0 (If you're seeing your issue in older previews of WinUI 3, please try this release)

Windows app type

  • UWP
  • Win32

Device form factor

Desktop

Windows version

May 2021 Update (19043)

Additional context

If I start the published single file using Visual Studio, the output window shows quite a few exception messages. It's difficult to know if these are benign, apart from the last two:

Exception thrown at 0x00007FFB76E44F69 (KernelBase.dll) in SingleFileIssue.exe: 0xE0434352 (parameters: 0xFFFFFFFF80131604, 0x0000000000000000, 0x0000000000000000, 0x0000000000000000, 0x00007FFACE450000).
Exception thrown at 0x00007FFB76E44F69 (KernelBase.dll) in SingleFileIssue.exe: 0xE0434352 (parameters: 0xFFFFFFFF80131604, 0x0000000000000000, 0x0000000000000000, 0x0000000000000000, 0x00007FFACE450000).
Exception thrown at 0x00007FFB76E44F69 (KernelBase.dll) in SingleFileIssue.exe: WinRT originate error - 0x80131604 : 'Exception has been thrown by the target of an invocation.'.
onecore\com\combase\winrt\error\restrictederror.cpp(1016)\combase.dll!00007FFB775BC363: (caller: 00007FFB775C6049) ReturnHr(1) tid(2bc0) 8007007E The specified module could not be found.
onecore\com\combase\winrt\error\restrictederror.cpp(1016)\combase.dll!00007FFB775BC363: (caller: 00007FFB7773D6A7) ReturnHr(2) tid(2bc0) 8007007E The specified module could not be found.
onecore\com\combase\winrt\error\restrictederror.cpp(1016)\combase.dll!00007FFB775BC363: (caller: 00007FFB7773D113) ReturnHr(3) tid(2bc0) 8007007E The specified module could not be found.
Unhandled exception at 0x00007FFB76F1B302 (KernelBase.dll) in SingleFileIssue.exe: 0xC000027B: An application-internal exception has occurred (parameters: 0x00000165D2E5E4B0, 0x0000000000000002).

Unhandled exception at 0x00007FFB76F1B302 (KernelBase.dll) in SingleFileIssue.exe: 0xC0000602:  A fail fast exception occurred. Exception handlers will not be invoked and the process will be terminated immediately.
@ghost ghost added the needs-triage Issue needs to be triaged by the area owners label Nov 29, 2021
@DHancock
Copy link
Author

DHancock commented Dec 8, 2021

You will find a Microsoft.Graphics.Canvas.dll is suspiciously loitering in the publishing folder. It's the Win2D dll. If I remove all the Win2D code from the repro solution, publish as single file works.

(I'd be surprised if this isn't a known issue)

@DHancock DHancock changed the title An unpackaged application that uses Composition drawing traps when published as single file Using Win2D breaks publishing unpackaged app as single file Dec 8, 2021
@StephenLPeters StephenLPeters added product-winui3 WinUI 3 issues team-Rendering Issue for the Rendering team labels Feb 17, 2022
@StephenLPeters
Copy link
Contributor

@codendone FYI

@DHancock
Copy link
Author

Retested with current latest packages:

Windows App SDK 1.1.0-preview3
Microsoft.Graphics.Win2D 1.0.3.1

Still fails with same problem.

@appindus-ibiller
Copy link

It seems like anything with Win2D refs are breaking if not being deployed to official channels. Still happening with Windows App SDK 1.1.1 stable. We're supposed to be able to make unpackaged apps but despite the November 2021 release being over 6 months ago, official Microsoft packages are still not supporting it. Pretty unreal.

@bpulliam bpulliam added the Crash whenever user reports a crash or app freeze label Oct 13, 2022
@bpulliam bpulliam removed the needs-triage Issue needs to be triaged by the area owners label Dec 6, 2022
@github-actions
Copy link

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 5 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Crash whenever user reports a crash or app freeze no-issue-activity product-winui3 WinUI 3 issues team-Rendering Issue for the Rendering team
Projects
None yet
Development

No branches or pull requests

4 participants