microsoft / WindowsAppSDK

The Windows App SDK empowers all Windows desktop apps with modern Windows UI, APIs, and platform features, including back-compat support, shipped via NuGet.
https://docs.microsoft.com/windows/apps/windows-app-sdk/
MIT License
3.78k stars 319 forks source link

Unpackaged C# WinAppSdk 1.0.3 app crashes when RivaTuner Statistics server app running #2468

Open stefansjfw opened 2 years ago

stefansjfw commented 2 years ago

Describe the bug

Following https://docs.microsoft.com/en-us/windows/apps/winui/winui3/create-your-first-winui3-app for C# unpackaged app I get:

The program '[20148] App6.exe' has exited with code 3221226107 (0xc000027b)

while trying to run the app and RivaTuner Statistics server app is running ( installed together with MSI afterburner https://www.msi.com/Landing/afterburner/graphics-cards): image

When I set Application detection level to None image

App starts as expected: image

Tried with both Winappsdk 1.0.2 and 1.0.3

Steps to reproduce the bug

  1. Create Blank App, Packaged (WinUI 3 in Desktop) in VS
  2. Add None to csproj file
  3. Change running profile to App(Unpackaged)
  4. try running the app - observe crash
  5. Close (or set application level to None) RivaTuner app
  6. Try running app again - observe it's working

Expected behavior

App is running without crash

Screenshots

No response

NuGet package version

No response

Packaging type

Unpackaged

Windows version

Windows 10 version 21H1 (19043, May 2021 Update)

IDE

Visual Studio 2022

Additional context

No response

ShashankNay commented 2 years ago

There seems to a bug in the RTSS hook process that affects WinUI apps. The hook process returning 1 on a CreateWindow call prevents creation of the window. This is manifesting itself in a ‘Module Not Found’. I suggest following up with Riva Tuner.

riverar commented 2 years ago

Common bug with RivaTuner. If you need help excluding particular apps, this may help https://github.com/File-New-Project/EarTrumpet/issues/1092#issuecomment-1070843085

beeradmoore commented 1 year ago

Hey @stefansjfw , I was never able to replicate this but does this still break for you?

RTSS put out an update which should handle this better but I am still getting some users having the issue even with the updated RTSS.